Claude Code Plugins and Marketplaces for an Org: Package a Skill, a Hook and an MCP Server, Check Them, Then Lock the Sources
The SupportDesk platform team ships a refund skill, an audit hook and a tickets MCP server as one plugin, supportdesk-ops, listed in the supportdesk-tools marketplace. A team bar passes the real plugin and fails six broken copies, and managed settings make that marketplace the only source.
What you will learn
- Package a skill, a hook and an MCP server as one Claude Code plugin with a plugin.json manifest
- List the plugin in a marketplace.json and install it by its id, name@marketplace
- Add team checks on top of claude plugin validate: skill frontmatter and trigger, a read-only hook, an allowlisted MCP server
- Lock the sources with managed settings: strictKnownMarketplaces, extraKnownMarketplaces, enabledPlugins and allowedMcpServers
Before you start
- CLAUDE.md, settings.json and plugin basics
- Claude Code skills and hooks
- Basic JSON
Picture the platform team at SupportDesk. They have a skill that drafts refund replies, a hook that audits tool calls, and an MCP server for tickets. Today each one is shared on its own: three installs, and three versions to keep in step.
A plugin puts them in one package, and a marketplace hands that package to every team. In this article we follow one plugin, supportdesk-ops, from a folder to a laptop: packaged, checked, listed, then installed by name. One install, one version.
The boxed kit
Think of a restaurant chain sending a boxed kit to every branch.
| Question | Kit | File |
|---|---|---|
| What is in the box? | A recipe card, a kitchen timer, a supplier phone line | A skill, a hook, an MCP server |
| What is on the lid? | A name and an edition number | plugin.json |
| Where is it kept? | A catalog on the head-office shelf | marketplace.json |
| Who checks the box? | An inspector, before it goes on the shelf | validate.py |
The chain ships a kit, not loose papers.
The folder
The project is plain files plus a small Python checker. There is no model call, so no API key is needed. The marketplace and the plugin live side by side:
The three parts
A skill is a folder with a SKILL.md. Claude loads its instructions when the description matches the task:
---
description: Drafts a polite refund reply from the ticket text. Use when a customer asks for a refund or a charge dispute.
---
Read the ticket. State the refund decision first, then the next step for the customer.
Never promise a date the billing system has not confirmed.
A hook is a script that runs on an event. Here it audits each Bash call before it runs:
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "python \"${CLAUDE_PLUGIN_ROOT}/scripts/audit_tool_use.py\""
}
]
}
]
}
}
"""Read-only audit hook: reads the tool call from stdin and prints one line. It changes nothing."""
import json, sys
event = json.load(sys.stdin)
print(f"audit: {event.get('tool_name', '?')}")
An MCP server is a connection to a tool server, listed in .mcp.json:
{
"mcpServers": {
"tickets": {
"type": "http",
"url": "https://mcp.supportdesk.test/tickets"
}
}
}
plugin.json: the lid
The manifest lives in a folder called .claude-plugin, inside the plugin:
{
"name": "supportdesk-ops",
"version": "1.0.0",
"description": "SupportDesk skill, hook and MCP server",
"author": { "name": "SupportDesk Platform Team" }
}
- Only
nameis required. It is kebab-case, and every part of the plugin is namespaced under it. versionmatters: users stay on the version they installed until you change it.descriptionis what people see when they browse, andauthorsays who to ask.
The CLAUDE.md, settings.json and plugins article covers the manifest and the difference between enabled and installed.
marketplace.json: the shelf
The catalog has its own .claude-plugin folder at the marketplace root:
{
"name": "supportdesk-tools",
"description": "Reviewed SupportDesk plugins",
"owner": { "name": "SupportDesk Platform Team" },
"plugins": [
{
"name": "supportdesk-ops",
"source": "./plugins/supportdesk-ops",
"description": "Refund skill, audit hook, ticket server"
}
]
}
- The marketplace
nameis what people type after the at sign when they install. - An
owneris required. - The
pluginslist has one entry per plugin, each with asource. Here it is a relative path, written from the marketplace root.
The install id is the plugin name, an at sign, and the marketplace name: supportdesk-ops@supportdesk-tools, installed with claude plugin install.
validate.py: the team's bar
Claude Code has claude plugin validate for the structure. validate.py is the team's own rule in plain Python, added on top. Here are its three part checks (excerpt):
WRITE_CALLS = ("write_text", "write_bytes", "os.remove", "shutil", "subprocess", "open")
def check_skills(root):
why = []
for skill in sorted(root.glob("skills/*/SKILL.md")):
name = skill.parent.name
meta = frontmatter(skill.read_text(encoding="utf-8"))
desc = (meta or {}).get("description", "").lower()
if meta is None:
why.append(f"skill {name}: no frontmatter")
elif "use when" not in desc:
why.append(f"skill {name}: no 'Use when'")
return why
def check_hooks(root):
why = []
for script in hook_scripts(root):
bad = [c for c in WRITE_CALLS if c in script]
if bad:
why.append(f"hook: not read-only ({bad[0]})")
return why
def check_mcp(root, managed):
urls = allowed_urls(managed)
why = []
for name, cfg in load(root / ".mcp.json")["mcpServers"].items():
url = cfg.get("url", "")
if not any(fnmatch.fnmatch(url, p) for p in urls):
why.append(f"mcp {name}: not allowlisted")
return why
- A skill without frontmatter is rejected, and its description must say Use when so Claude knows when to load it.
- A hook script must be read-only. It may print. It may not write files, delete them or run other programs. (The check is a simple text match for the calls in
WRITE_CALLS.) - Every MCP server in the plugin must match the managed allowlist.
Two more checks look at the marketplace: each entry's name must match the plugin's own manifest, and the marketplace's source must be in strictKnownMarketplaces.
One real plugin, six broken copies
run_all.py runs the bar on the real plugin, then on six copies that each break one thing:
plugin gate
supportdesk-ops pass ready to list
no-frontmatter fail skill refund-reply: no frontmatter
no-trigger fail skill refund-reply: no 'Use when'
hook-writes fail hook: not read-only (open)
mcp-untrusted fail mcp tickets: not allowlisted
name-mismatch fail entry support-ops: manifest name is supportdesk-ops
source-blocked fail marketplace supportdesk-tools: source not in strictKnownMarketplaces
passed 1 | failed 6
supportdesk-opspasses every check, so it can be listed.no-triggerdrops the Use when sentence from the skill.hook-writeschanges the hook'sprint(intoopen('audit.log', 'a').write(, so it opens a file.mcp-untrustedpoints the server atmcp.untrusted.example, which isn't on the allowlist.name-mismatchrenames the marketplace entry tosupport-ops;source-blockedswaps the allowed marketplace source for another org's repo.
managed-settings.json: lock the door
The bar decides what is worth listing. Managed settings decide what can be installed at all:
{
"strictKnownMarketplaces": [
{
"source": "github",
"repo": "supportdesk/plugin-marketplace"
}
],
"extraKnownMarketplaces": {
"supportdesk-tools": {
"source": {
"source": "github",
"repo": "supportdesk/plugin-marketplace"
}
}
},
"enabledPlugins": {
"supportdesk-ops@supportdesk-tools": true
},
"allowManagedMcpServersOnly": true,
"allowedMcpServers": [
{ "serverUrl": "https://mcp.supportdesk.test/*" }
]
}
strictKnownMarketplacesis an allowlist of marketplace sources. Anything else is refused.extraKnownMarketplacesregisters the marketplace on every machine.enabledPlugins, set in the managed file, turnssupportdesk-opson for every machine, and a user can't switch it off. (The lecture describes it as installing and enabling the plugin; check the current docs for how a managed entry and a per-user install interact.)- The plugin's MCP server still has to match
allowedMcpServers, matched by URL rather than by its name.
Common mistakes
- Emailing the folder to each team. Copies drift and nobody owns them.
- Letting teams add any marketplace. The source is never checked. Use
strictKnownMarketplaces. - Trusting the plugin's name. A name is a label, not a check. Validate the contents, and match MCP servers by URL.
- Pushing changes without bumping
version. Users stay on the version they installed. - Treating a hook like a skill. A skill is read; a hook and an MCP server run. Check those two hardest.
For the listing rules that apply to every shared skill and server, plugin or not, see a quality gate for the shared catalog. For getting one setup into many repositories, see rolling out Claude Code to a team.
Quick recap
| Piece | File | Job |
|---|---|---|
| Plugin | .claude-plugin/plugin.json | Skill, hook and MCP server under one name and version |
| Marketplace | .claude-plugin/marketplace.json | One catalog for the org; install id name@marketplace |
| The bar | validate.py on top of claude plugin validate | Trigger, read-only hook, allowlisted MCP, names match |
| Managed settings | managed-settings.json | Lock sources, enable the plugin, allowlist servers |
Try it yourself
Add a second plugin to the marketplace whose MCP server uses a command instead of a url. check_mcp reads only url. Predict what it does with the new server, then decide how the allowlist should match it.
Related course on Udemy
Claude Certified Developer - Professional (CCDV-P) Exam Prep
Claude agents in production: reliability, observability, evals, cost, guardrails and fleets.View on Udemy ↗: Claude Certified Developer - Professional (CCDV-P) Exam Prep (paid course, opens in a new tab)Related posts
CLAUDE.md, settings.json and Plugins: Which Claude Code File Advises, Which Enforces, Which Packages
Three needs in one repo: a test command, a rule that Claude must never read .env, and a shared deploy skill. See which file each belongs in, how the settings layers merge, and what a plugin manifest carries.
Authoring a Claude Skill: SKILL.md, Frontmatter, Progressive Disclosure and the Description That Triggers It
Pack a support team's ticket-triage routine into one skill folder, then watch three requests load one, two or all three levels: the catalog, the SKILL.md body, and a script whose code never enters the context.
One Change, Four Environments: Where a Claude Config Edit Lands in Dev, Staging, Prod and CI
Change one line in a repo and ask where it lands. A small resolver for bookshop-bot shows that a new model id in settings.json reaches only CI, a prompt bump reaches dev and CI, and a prod block edit reaches only prod.
Claude in the SDLC: Prompts in Git, a Change Gate by Path, a Claude Review That Advises and a Person Who Merges
Follow one prompt edit from a branch to a merge: version prompts and the model pin like code, keep the API key in GitHub Secrets, gate changes by path, let Claude review the diff, and leave the merge to a person.
