Create and manage Claude Code plugins including commands, agents, skills, hooks, and MCP servers. This skill should be used when building new plugins, debugging plugin issues, understanding plugin structure, or working with plugin marketplaces.
/plugin marketplace add GGPrompts/TabzBeads/plugin install meta@tabz-beadsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
references/components.mdreferences/manifest-schema.mdreferences/marketplace-schema.mdreferences/plugin-structure.mdThis skill provides guidance for creating, structuring, and debugging Claude Code plugins.
This skill should be used when:
Claude Code supports two patterns:
| Pattern | Manifest Location | Use Case |
|---|---|---|
| Standalone | .claude-plugin/plugin.json | Entire repo IS one plugin |
| Marketplace | plugin.json at plugin root | Multiple plugins in one repo |
Choose ONE approach - having both may cause conflicts.
When your repo contains multiple plugins via a marketplace:
my-marketplace/
├── .claude-plugin/
│ └── marketplace.json # Lists all plugins
└── plugins/
├── tool-a/
│ ├── plugin.json # AT PLUGIN ROOT (not .claude-plugin/)
│ ├── commands/
│ ├── agents/
│ └── skills/
│ └── my-skill/
│ └── SKILL.md
└── tool-b/
├── plugin.json
└── skills/
Key: .claude-plugin/ is ONLY at marketplace root, NOT inside each plugin.
Only use when your entire repo IS the plugin (no marketplace wrapper):
my-plugin/ # Repo root = plugin root
├── .claude-plugin/
│ └── plugin.json # Standalone uses .claude-plugin/
├── commands/
├── agents/
├── skills/
├── hooks/
└── .mcp.json
For marketplace plugins:
plugins/my-plugin/
├── plugin.json # AT ROOT (not in .claude-plugin/)
├── commands/ # Slash commands (.md files)
├── agents/ # Subagents (.md files)
├── skills/ # Agent skills (dirs with SKILL.md)
│ └── skill-name/
│ └── SKILL.md # ONE level deep - no nesting!
├── hooks/
│ └── hooks.json # Hook configurations
├── .mcp.json # MCP server definitions
└── scripts/ # Utility scripts for hooks
Minimal manifest:
{
"name": "my-plugin",
"version": "1.0.0",
"description": "What this plugin does"
}
Full manifest - see references/manifest-schema.md.
Commands - Create commands/name.md:
---
description: Brief description for autocomplete
---
# Command Name
Instructions for the command...
Agents - Create agents/name.md:
---
description: What this agent specializes in
capabilities: ["task1", "task2"]
---
# Agent Name
Agent instructions...
Skills - Create skills/name/SKILL.md:
---
name: skill-name
description: What the skill does
---
# Skill Name
Skill instructions...
Hooks - Create hooks/hooks.json or inline in plugin.json:
{
"hooks": {
"PostToolUse": [{
"matcher": "Write|Edit",
"hooks": [{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/scripts/lint.sh"
}]
}]
}
}
MCP Servers - Create .mcp.json or inline in plugin.json:
{
"mcpServers": {
"server-name": {
"command": "npx",
"args": ["@company/mcp-server"],
"cwd": "${CLAUDE_PLUGIN_ROOT}"
}
}
}
plugin.json at plugin root - NOT in .claude-plugin/.claude-plugin/plugin.json - Only when entire repo = one pluginskills/name/SKILL.md NOT skills/parent/skills/child/SKILL.md./${CLAUDE_PLUGIN_ROOT} - For absolute paths in hooks/MCP configschmod +x script.shplugin.json per skill - Only one per plugin, not per skill directoryRun claude --debug to see:
| Issue | Cause | Solution |
|---|---|---|
| Plugin not loading | Invalid plugin.json | Validate JSON syntax |
| Skills not discovered | Nested skills (skills/a/skills/b/) | Flatten to skills/b/SKILL.md |
| Skills not showing | Missing from marketplace skills array | Add explicit skill paths to marketplace.json |
| Commands not appearing | Wrong directory structure | Ensure commands/ at plugin root |
| Marketplace plugin.json wrong location | plugins/X/.claude-plugin/plugin.json | Move to plugins/X/plugin.json |
| Hooks not firing | Script not executable | Run chmod +x script.sh |
| MCP server fails | Missing CLAUDE_PLUGIN_ROOT | Use ${CLAUDE_PLUGIN_ROOT} variable |
| Path errors | Absolute paths used | All paths must be relative with ./ |
references/plugin-structure.md - Complete directory layout and file locationsreferences/manifest-schema.md - Full plugin.json schema with all fieldsreferences/marketplace-schema.md - Marketplace bundles, categories, and installationreferences/components.md - Detailed specs for commands, agents, skills, hooks, MCPassets/templates/ - Template files for creating new plugins| Approach | Manifest | Use Case |
|---|---|---|
| Standalone | plugin.json | Single focused plugin |
| Marketplace | marketplace.json | Bundle multiple plugins |
Choose ONE - having both may cause conflicts. Categories in marketplaces are metadata only (no visual grouping in UI).
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.