Guides creation of Claude Code plugins including skills, commands, agents, hooks, MCP servers, and configuration. Use for 'create plugin', 'make skill', scaffolding structures.
From plugin-creation-toolsnpx claudepluginhub camoa/claude-skills --plugin plugin-creation-toolsThis skill uses the workspace's default tool permissions.
examples/full-featured-plugin/README.mdexamples/full-featured-plugin/commands/review.mdexamples/full-featured-plugin/commands/status.mdexamples/full-featured-plugin/hooks/hooks.jsonexamples/full-featured-plugin/hooks/post-edit.shexamples/full-featured-plugin/hooks/run-hook.cmdexamples/full-featured-plugin/hooks/session-start.shexamples/full-featured-plugin/skills/code-helper/references/patterns.mdexamples/simple-greeter-plugin/README.mdreferences/01-overview/component-comparison.mdreferences/01-overview/what-are-agents.mdreferences/01-overview/what-are-commands.mdreferences/01-overview/what-are-hooks.mdreferences/01-overview/what-are-mcp.mdreferences/01-overview/what-are-plugins.mdreferences/01-overview/what-are-skills.mdreferences/02-philosophy/anti-patterns.mdreferences/02-philosophy/core-philosophy.mdreferences/02-philosophy/decision-frameworks.mdreferences/03-skills/anthropic-skill-standards.mdSearches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Executes pre-written implementation plans: critically reviews, follows bite-sized steps exactly, runs verifications, tracks progress with checkpoints, uses git worktrees, stops on blockers.
Create complete Claude Code plugins with any combination of components.
| Component | Location | Invocation | Best For |
|---|---|---|---|
| Skills | skills/name/SKILL.md | Model-invoked (auto) | Complex workflows with resources |
| Commands | commands/name.md | User (/command) | Quick, frequently used prompts |
| Agents | agents/name.md | Auto + Manual | Task-specific expertise |
| Hooks | hooks/hooks.json | Event-triggered | Automation and validation |
| MCP | .mcp.json | Auto startup | External tool integration |
references/01-overview/component-comparison.md to decide which components neededWhen creating any plugin, also consider:
.claude/rules/ with modular project rules (path-scoped if needed for different component directories)CLAUDE.md at plugin root for project conventionsAll plugin documentation should follow lean principles:
references/02-philosophy/core-philosophy.md for full philosophyWhen user says "create plugin", "initialize plugin", "new plugin":
Option A - Use init script:
python scripts/init_plugin.py my-plugin --path ./plugins --components skill,command,hook
Option B - Manual creation:
Create plugin directory structure:
plugin-name/
├── .claude-plugin/
│ └── plugin.json
├── commands/ # if needed
├── agents/ # if needed
├── skills/ # if needed
│ └── skill-name/
│ └── SKILL.md
├── hooks/ # if needed
│ └── hooks.json
└── .mcp.json # if needed
Copy template from templates/plugin.json.template
Ask user which components they need
When user says "add skill", "create skill", "make skill":
references/03-skills/writing-skillmd.md for structuretemplates/skill/SKILL.md.templateCritical: SKILL.md files are INSTRUCTIONS for Claude, not documentation. Write imperatives telling Claude what to do.
| Documentation (WRONG) | Instructions (CORRECT) |
|---|---|
| "This skill helps with PDF processing" | "Process PDF files using this workflow" |
| "The description field is important" | "Write the description starting with 'Use when...'" |
Consider these optional frontmatter fields:
model: haiku for simple lookup/formatting skills, opus for complex reasoningcontext: fork with agent: <type> for heavy operations that would pollute main contextdisable-model-invocation: true for command-only skills (no auto-trigger)user-invocable: false to hide from / menu (Claude can still invoke via Skill tool)Dynamic context injection: Use !`command` in the skill body to inject runtime state (git status, file contents, etc.) when the skill loads.
Extended thinking: Include "ultrathink" in the skill body for tasks requiring deep reasoning.
When user says "add command", "create command", "slash command":
references/04-commands/writing-commands.mdtemplates/command/command.md.template$ARGUMENTS, $1, $2 for argumentsWhen user says "add agent", "create agent", "make agent":
references/05-agents/writing-agents.mdtemplates/agent/agent.md.templateConsider these agent-specific features:
memory: project for agents that benefit from cross-session learning (architecture decisions, code review patterns)memory: user for personal preferences that carry across projectsmodel: matched to task complexity — haiku for lookup/formatting, sonnet for balanced tasks, opus for complex reasoningtools restriction to minimum needed (reduces cost and attack surface)disallowedTools to block specific tools (e.g., Edit, Write for read-only agents)hooks in agent frontmatter for scoped validation (runs only when that agent is active)Agent teams: For tasks benefiting from multiple perspectives or parallel research, consider agent teams (competing perspectives, hypothesis investigation, parallel tasks). See references/05-agents/agent-patterns.md for team patterns. Requires CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1.
When user says "add hooks", "setup hooks", "event handlers":
references/06-hooks/writing-hooks.mdreferences/06-hooks/hook-events.md for all 18 eventstemplates/hooks/hooks.json.templatePreToolUse - before tool execution (can block)PostToolUse - after tool execution (formatting, logging)SessionStart - setup, output directoriesSessionEnd - cleanupUserPromptSubmit - validation, context injection (can block)SubagentStart/SubagentStop - agent lifecyclePreCompact - inject context before compactionNotification, Stop, TaskCompleted, TeammateIdleThree handler types — choose the right one:
command — shell script, fastest, no LLM cost. Use for logging, file ops, env setup.prompt — single-turn LLM evaluation, zero script overhead. Use for lightweight validation.agent — multi-turn subagent with tools (Read, Grep, Glob). Use for complex verification.Async execution: Add "async": true on command hooks for background operations (logging, analytics) that shouldn't block the main flow.
MCP tool matching: Use mcp__<server>__<tool> pattern in matchers for PreToolUse/PostToolUse.
When user says "configure plugin", "setup plugin.json":
references/08-configuration/plugin-json.md for full schemanameversion, description, author, licensecommands, agents, hooks, mcpServersWhen user says "configure settings", "setup output", "output directory":
references/08-configuration/settings.md for settings hierarchyreferences/08-configuration/output-config.md for output patterns${CLAUDE_PLUGIN_ROOT} - plugin installation directory${CLAUDE_PROJECT_DIR} - project root${CLAUDE_ENV_FILE} - persistent env vars (SessionStart only)When user says "test plugin", "validate plugin":
references/09-testing/testing.mdclaude --debug to see plugin loading/command-name/agents listingWhen user says "package plugin", "publish plugin", "marketplace":
references/10-distribution/packaging.mdmarketplace.json in repository rootBefore creating a component, verify it's the right choice:
| Component | Use When |
|---|---|
| Skill | Complex workflow, needs resources, auto-triggered by context |
| Command | User should trigger explicitly, quick one-off prompts |
| Agent | Specialized expertise, own context window, proactive delegation |
| Hook | Event-based automation, validation, logging |
| MCP | External API/service, custom tools, database access |
The 5-10 Rule: Done 5+ times? Will do 10+ more? Create a skill or command.
references/01-overview/what-are-plugins.md - Plugin overviewreferences/01-overview/what-are-skills.md - Skills overviewreferences/01-overview/what-are-commands.md - Commands overviewreferences/01-overview/what-are-agents.md - Agents overviewreferences/01-overview/what-are-hooks.md - Hooks overviewreferences/01-overview/what-are-mcp.md - MCP overviewreferences/01-overview/component-comparison.md - When to use whatreferences/02-philosophy/core-philosophy.md - Design principlesreferences/02-philosophy/decision-frameworks.md - Decision treesreferences/02-philosophy/anti-patterns.md - What to avoidreferences/03-skills/anthropic-skill-standards.md - Official Anthropic skill standards and checklistreferences/03-skills/skill-patterns.md - Five skill patterns (Sequential, Multi-MCP, Iterative, Context-Aware, Domain-Specific)references/03-skills/ - Skill creation guidesreferences/04-commands/ - Command creation guidesreferences/05-agents/ - Agent creation guidesreferences/06-hooks/ - Hook creation guidesreferences/06-hooks/cross-platform-hooks.md - Windows/macOS/Linux supportreferences/07-mcp/ - MCP overviewreferences/08-configuration/plugin-json.md - Plugin manifestreferences/08-configuration/marketplace-json.md - Marketplace configreferences/08-configuration/settings.md - Settings hierarchyreferences/08-configuration/output-config.md - Output configurationreferences/09-testing/testing.md - Testing guide (all components)references/09-testing/debugging.md - Debugging guidereferences/09-testing/cli-reference.md - CLI commands referencereferences/10-distribution/packaging.md - Packaging guidereferences/10-distribution/marketplace.md - Marketplace guidereferences/10-distribution/versioning.md - Version strategyreferences/10-distribution/complete-examples.md - Full plugin examplesWorking example plugins in examples/:
examples/simple-greeter-plugin/ - Minimal plugin with one skillexamples/full-featured-plugin/ - Complete plugin with skill, commands, hooksAll templates are in the templates/ directory:
templates/skill/SKILL.md.templatetemplates/command/command.md.templatetemplates/agent/agent.md.templatetemplates/hooks/hooks.json.templatetemplates/hooks/run-hook.cmd.template - Cross-platform hook wrappertemplates/plugin.json.templatetemplates/marketplace.json.templatetemplates/settings.json.templatetemplates/mcp.json.templatescripts/init_plugin.py - Initialize new plugin with selected componentsscripts/init_skill.py - Initialize standalone skillscripts/validate_skill.py - Validate skill structurescripts/package_skill.py - Package skill for distribution