Create Claude Code plugins, skills, commands, agents, hooks, MCP servers, and marketplace files. Use when building a plugin, packaging skills for sharing, creating a marketplace, converting standalone config to a plugin, or deciding between plugin vs skill vs MCP vs standalone.
Guide for creating Claude Code plugins. For full reference, see references/plugins-reference.md.
Ask the user these questions to determine the right approach:
Q1: Will this be used in one project or shared across projects/team?
.claude/ directory) or skillQ2: Should Claude use it automatically or should the user invoke it explicitly?
/command) → command (markdown file)Q3: Does it need to connect to external services/APIs?
Q4: Should it run code automatically on events (file save, tool use, etc.)?
Q5: Does it need a specialized AI agent with its own system prompt?
| Need | Solution | Location |
|---|---|---|
| Personal, one project, auto-triggered | Standalone skill | .claude/skills/<name>/SKILL.md |
| Personal, one project, user-invoked | Standalone command | .claude/commands/<name>.md |
| Shared, auto-triggered | Plugin with skill | plugin/skills/<name>/SKILL.md |
| Shared, user-invoked | Plugin with command | plugin/commands/<name>.md |
| External API access | MCP server | .mcp.json (standalone or plugin) |
| Event automation | Hook | hooks/hooks.json (standalone or plugin) |
| Specialized AI role | Agent | agents/<name>.md |
| Multiple of the above | Plugin combining components | See plugin structure below |
| Scope | File | Visibility |
|---|---|---|
user | ~/.claude/settings.json | You only, all projects |
project | .claude/settings.json | Team via git, this project |
local | .claude/settings.local.json | You only, this project (gitignored) |
managed | Admin-controlled | Org-wide, read-only |
my-plugin/
├── .claude-plugin/
│ └── plugin.json # Only this file goes here
├── skills/ # Auto-triggered by context
│ └── skill-name/
│ └── SKILL.md
├── commands/ # User-invoked via /plugin:command
│ └── command-name.md
├── agents/ # Specialized subagents
│ └── agent-name.md
├── hooks/
│ └── hooks.json # Event handlers
├── bin/ # Executables added to PATH
├── settings.json # Default settings
├── .mcp.json # MCP server configs
└── .lsp.json # LSP server configs
Critical rules:
.claude-plugin/SKILL.md (exact case){
"name": "my-plugin",
"description": "What the plugin does",
"version": "1.0.0"
}
{
"name": "my-plugin",
"version": "1.0.0",
"description": "What the plugin does",
"author": { "name": "Name", "email": "[email protected]" },
"homepage": "https://docs.example.com",
"repository": "https://github.com/user/plugin",
"license": "MIT",
"keywords": ["keyword1"],
"userConfig": {
"api_key": { "description": "API key", "sensitive": true }
}
}
User config values available as ${user_config.KEY} in configs and CLAUDE_PLUGIN_OPTION_<KEY> env vars.
---