Create Plugin
Scaffold a new plugin in a local marketplace and register it.
User's intention
$ARGUMENTS
References
Consult the relevant doc(s) before making structural decisions:
docs/plugins.md — plugin structure, manifest, hooks and relative paths
docs/marketplace.md — marketplace structure, registration, publishing, versioning, auto-updates
docs/skills.md — skill format, popular repositories, skills CLI
docs/subagents.md — subagent usage, AGENTS.md format, coordination tips
docs/hooks.md — hook lifecycle, PreToolUse / PostToolUse, hook scripts
docs/rules.md — rules format and scope
docs/mcp.md — MCP server configuration
docs/memory.md — memory system, persistent memory for subagents
docs/skills-cli.md — skills CLI commands
docs/claude-code.md — Claude Code settings, commands, IDE integrations
Workflow
The form data submitted by the user was injected into your context as additionalContext by the UserPromptExpansion hook. Parse the JSON object { name, description, keywords, marketplacePath } and proceed:
Create plugin directory structure
<marketplacePath>/plugins/<name>/
├── .claude-plugin/
│ └── plugin.json
├── skills/
└── README.md
Write plugin.json
Read <marketplacePath>/.claude-plugin/marketplace.json to get the owner name and email, then write <marketplacePath>/plugins/<name>/.claude-plugin/plugin.json:
{
"name": "<name>",
"version": "0.1.0",
"description": "<description>",
"author": {
"name": "<owner.name from marketplace.json>",
"email": "<owner.email from marketplace.json>"
},
"homepage": "<metadata.homepage from marketplace.json>",
"keywords": ["<keyword1>", "<keyword2>"]
}
Write README.md
Create <marketplacePath>/plugins/<name>/README.md with a minimal header and the plugin description.
Register in marketplace
Edit <marketplacePath>/.claude-plugin/marketplace.json and append to the plugins array:
{
"name": "<name>",
"source": "./plugins/<name>",
"description": "<description>"
}
Hooks
If the plugin needs event hooks, add them to hooks/hooks.json in the plugin root (or inline in plugin.json) rather than user settings. See Hooks and Relative Paths.
Report to user
<marketplacePath>/plugins/<name>/.claude-plugin/plugin.json created
<marketplacePath>/plugins/<name>/skills/ created
<marketplacePath>/plugins/<name>/README.md created
- Entry added to
<marketplacePath>/.claude-plugin/marketplace.json
- Next steps:
- Use
/create-skill or /create-subagent to populate the plugin with tools
- Test locally:
claude --plugin-dir <marketplacePath>/plugins/<name>
- Once satisfied with the result, update the marketplace so the plugin becomes visible:
claude plugin marketplace update
1---2name: create-plugin3description: Scaffolds a new plugin in a local marketplace repository: creates the plugin directory, plugin.json manifest, skills/ folder, and registers it in marketplace.json. Use when the user asks to add a new plugin, create a plugin, or register a plugin in the marketplace.4---56# Create Plugin78Scaffold a new plugin in a local marketplace and register it.910## User's intention1112$ARGUMENTS1314## References1516Consult the relevant doc(s) before making structural decisions:1718- [`docs/plugins.md`](${CLAUDE_SKILL_DIR}/../../../../docs/plugins.md) — plugin structure, manifest, hooks and relative paths19- [`docs/marketplace.md`](${CLAUDE_SKILL_DIR}/../../../../docs/marketplace.md) — marketplace structure, registration, publishing, versioning, auto-updates20- [`docs/skills.md`](${CLAUDE_SKILL_DIR}/../../../../docs/skills.md) — skill format, popular repositories, skills CLI21- [`docs/subagents.md`](${CLAUDE_SKILL_DIR}/../../../../docs/subagents.md) — subagent usage, AGENTS.md format, coordination tips22- [`docs/hooks.md`](${CLAUDE_SKILL_DIR}/../../../../docs/hooks.md) — hook lifecycle, PreToolUse / PostToolUse, hook scripts23- [`docs/rules.md`](${CLAUDE_SKILL_DIR}/../../../../docs/rules.md) — rules format and scope24- [`docs/mcp.md`](${CLAUDE_SKILL_DIR}/../../../../docs/mcp.md) — MCP server configuration25- [`docs/memory.md`](${CLAUDE_SKILL_DIR}/../../../../docs/memory.md) — memory system, persistent memory for subagents26- [`docs/skills-cli.md`](${CLAUDE_SKILL_DIR}/../../../../docs/skills-cli.md) — skills CLI commands27- [`docs/claude-code.md`](${CLAUDE_SKILL_DIR}/../../../../docs/claude-code.md) — Claude Code settings, commands, IDE integrations2829## Workflow3031The form data submitted by the user was injected into your context as `additionalContext` by the `UserPromptExpansion` hook. Parse the JSON object `{ name, description, keywords, marketplacePath }` and proceed:32331. **Create plugin directory structure**34 ```35 <marketplacePath>/plugins/<name>/36 ├── .claude-plugin/37 │ └── plugin.json38 ├── skills/39 └── README.md40 ```41422. **Write plugin.json**43 Read `<marketplacePath>/.claude-plugin/marketplace.json` to get the owner name and email, then write `<marketplacePath>/plugins/<name>/.claude-plugin/plugin.json`:44 ```json45 {46 "name": "<name>",47 "version": "0.1.0",48 "description": "<description>",49 "author": {50 "name": "<owner.name from marketplace.json>",51 "email": "<owner.email from marketplace.json>"52 },53 "homepage": "<metadata.homepage from marketplace.json>",54 "keywords": ["<keyword1>", "<keyword2>"]55 }56 ```57583. **Write README.md**59 Create `<marketplacePath>/plugins/<name>/README.md` with a minimal header and the plugin description.60614. **Register in marketplace**62 Edit `<marketplacePath>/.claude-plugin/marketplace.json` and append to the `plugins` array:63 ```json64 {65 "name": "<name>",66 "source": "./plugins/<name>",67 "description": "<description>"68 }69 ```70715. **Hooks**72 If the plugin needs event hooks, add them to `hooks/hooks.json` in the plugin root (or inline in `plugin.json`) rather than user settings. See [Hooks and Relative Paths](${CLAUDE_SKILL_DIR}/../../../../docs/plugins.md#hooks-and-relative-paths).73746. **Report to user**75 - `<marketplacePath>/plugins/<name>/.claude-plugin/plugin.json` created76 - `<marketplacePath>/plugins/<name>/skills/` created77 - `<marketplacePath>/plugins/<name>/README.md` created78 - Entry added to `<marketplacePath>/.claude-plugin/marketplace.json`79 - Next steps:80 - Use `/create-skill` or `/create-subagent` to populate the plugin with tools81 - Test locally: `claude --plugin-dir <marketplacePath>/plugins/<name>`82 - Once satisfied with the result, update the marketplace so the plugin becomes visible: `claude plugin marketplace update`