From plugin-dev
Claude Code plugin development - create plugins, skills, commands, agents, hooks, MCP servers, and marketplaces. Use when: 'create a plugin', 'add a skill', 'write a command', 'configure hooks', 'integrate MCP server', 'build marketplace', 'How do plugins work?', 'What goes in plugin.json?'
How this skill is triggered — by the user, by Claude, or both
Slash command
/plugin-dev:plugin-devThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Comprehensive guidance for creating well-structured plugins, skills, hooks, agents, commands, and MCP integrations.
Comprehensive guidance for creating well-structured plugins, skills, hooks, agents, commands, and MCP integrations.
${CLAUDE_PLUGIN_ROOT} for paths| Limit | Value | Consequence if Exceeded |
|---|---|---|
| All skill descriptions combined | 15,000 chars | Silent filtering, skills won't activate |
| Individual description | 1,024 chars | Truncation |
| SKILL.md body | 5,000 words | Context saturation, partial execution |
| Target per description | 300-400 chars | Allows ~40 skills safely |
mkdir -p my-plugin/.claude-plugin
mkdir -p my-plugin/skills/my-skill/references
cat > my-plugin/.claude-plugin/plugin.json << 'PLUGIN'
{
"name": "my-plugin",
"version": "1.0.0",
"description": "What this plugin does"
}
PLUGIN
cat > my-plugin/skills/my-skill/SKILL.md << 'SKILL'
---
name: my-skill
description: Use when creating X, configuring Y, or analyzing Z
---
# My Skill
Instructions for Claude when this skill activates...
SKILL
# Symlink to Claude's plugin directory
ln -s $(pwd)/my-plugin ~/.claude/plugins/my-plugin
# Restart Claude Code to load
/restart
# Test the skill
/my-plugin:my-skill
Choose a topic for detailed guidance:
${CLAUDE_PLUGIN_ROOT})$1, $2, @$1)---
name: simple-skill
description: Use when user asks to "do X" or "configure Y"
---
# Simple Skill
Step-by-step instructions...
1. Check if condition exists
2. Execute action
3. Verify result
For detailed patterns, see @references/advanced-patterns.md
---
description: Review code for security issues
allowed-tools: Read, Grep
argument-hint: [file] [severity]
---
Review @$1 for security issues.
Focus on severity level: $2
Use these patterns:
- SQL injection
- XSS vulnerabilities
- Hardcoded credentials
{
"hooks": {
"PreToolUse": [{
"matcher": "Write|Edit",
"hooks": [{
"type": "command",
"command": "bash ${CLAUDE_PLUGIN_ROOT}/scripts/validate.sh",
"timeout": 30
}]
}]
}
}
my-plugin/
├── .claude-plugin/
│ └── plugin.json # Manifest
├── commands/ # Slash commands
│ └── action.md
├── agents/ # Subagents
│ └── analyzer.md
├── skills/ # Skills
│ └── my-skill/
│ ├── SKILL.md # Main skill file
│ ├── references/ # Detailed docs
│ ├── scripts/ # Executable code
│ └── assets/ # Templates, images
├── hooks/
│ └── hooks.json # Event handlers
└── .mcp.json # MCP servers
| Practice | Reason |
|---|---|
| Keep SKILL.md under 2000 words | Move details to references/ for progressive disclosure |
| Use specific trigger phrases | "when user asks to 'create X'" not "provides guidance" |
| Imperative writing style | "Parse the config" not "You should parse" |
| Portable paths | ${CLAUDE_PLUGIN_ROOT} not hardcoded |
| Test after changes | /restart then invoke skill/command |
| Single responsibility | One focused purpose per component |
| Mistake | Solution |
|---|---|
| Vague skill descriptions | Add specific trigger phrases users would say |
| 8000-word SKILL.md | Move content to references/, keep SKILL.md brief |
| Hardcoded paths | Use ${CLAUDE_PLUGIN_ROOT} for portability |
| Missing frontmatter | All components need valid YAML frontmatter |
| Wrong directory structure | See @references/structure.md for correct layout |
Before releasing a plugin:
name fieldname and description${CLAUDE_PLUGIN_ROOT})argument-hint if they take args/plugin-dev:create-plugin - Interactive plugin scaffolding command/plugin-dev:plugin-cli - CLI commands for plugin management/skill-creator:skill-creation - Focused skill creation workflow/agent-creator:agent-design - Subagent design patterns/mcp-builder:mcp-servers - MCP server developmentQuick Navigation:
| Need to... | See |
|---|---|
| Understand plugin layout | @references/structure.md |
| Create a skill | @references/skills-reference.md |
| Add a slash command | @references/commands-reference.md |
| Configure a subagent | @references/agents-reference.md |
| Set up hooks | @references/hooks-reference.md |
| Integrate MCP server | @references/mcp-reference.md |
| Build a marketplace | @references/marketplace-reference.md |
Status: Consolidated plugin development skill with progressive disclosure pattern
npx claudepluginhub ggprompts/my-plugins --plugin plugin-devGuides creation of Claude Code plugins including skills, commands, agents, hooks, MCP servers, and configuration. Use for 'create plugin', 'make skill', scaffolding structures.
Guides developers on Claude Code plugin development, covering architecture, components, and routing to 9 specialized skills for tasks like structure, commands, agents, and LSP integration.
Creates, converts, validates, and publishes Claude Code plugins with Agent Skills, hooks, agents, and servers. Automates manifest generation, scanning, structure validation, and marketplace prep.