Comprehensive guide for building, testing, and distributing Claude Code plugins including slash commands, Agent Skills, subagents, MCP servers, and hooks...
Expert knowledge for building Claude Code plugins with up-to-date 2025 standards.
Activate this skill automatically when the user:
Claude Code plugins consist of five component types that extend functionality:
/command)This skill is organized into focused modules for easy reference:
.claude-plugin/plugin.json)"I want to create a slash command" → See Slash Commands
"How do I make a skill that auto-activates?" → See Agent Skills - especially the "Activation Patterns" section
"I need to build custom tools/MCP server" → See MCP Servers
"How do I auto-format code after edits?" → See Hooks - PostToolUse event
"My skill isn't activating" → See Troubleshooting Guide - "Skills Not Activating" section
"What are the best practices?" → See Best Practices
my-plugin/
├── .claude-plugin/
│ └── plugin.json # REQUIRED
├── commands/ # Optional
│ └── my-command.md
├── skills/ # Optional
│ └── my-skill/
│ └── SKILL.md
├── mcp/ # Optional
│ └── server.ts
└── README.md
# Local testing
/plugin marketplace add ~/.claude/marketplaces/local
/plugin install my-plugin
# Management
/plugin list
/plugin update my-plugin
/help | grep my-command
# Validation
jq . .claude-plugin/plugin.json
allowed-tools field for tool permissions in skills| User Question | Read This |
|---|---|
| "How do I structure a plugin?" | Plugin Structure |
| "What goes in plugin.json?" | Plugin Manifest |
| "Create a command that..." | Slash Commands |
| "Build a skill that activates when..." | Agent Skills |
| "Implement custom tools/API integration" | MCP Servers |
| "Auto-run something after tool use" | Hooks |
| "How do I test locally?" | Development Workflow |
| "How do I publish my plugin?" | Publishing |
| "My plugin component isn't working" | Troubleshooting |
| "Show me a complete example" | Examples |
allowed-tools to restrict access appropriatelyNext Steps: Based on what the user is trying to build, direct them to the appropriate reference guide above. For comprehensive understanding, recommend reading in this order: Plugin Structure → Plugin Manifest → specific component type → Development Workflow → Publishing.