|
| 1 | +--- |
| 2 | +name: plugin-dev-guide |
| 3 | +description: This skill should be used when the user asks about "Claude Code plugins", "plugin development", "how to build a plugin", "what plugin components exist", "plugin architecture", "extending Claude Code", or needs an overview of plugin development capabilities. Acts as a guide to the 9 specialized plugin-dev skills, explaining when to activate each one. Load this skill first when the user is new to plugin development or unsure which specific skill they need. |
| 4 | +--- |
| 5 | + |
| 6 | +# Plugin Development Guide |
| 7 | + |
| 8 | +This meta-skill provides an overview of Claude Code plugin development and routes to specialized skills based on the task at hand. |
| 9 | + |
| 10 | +## Plugin Development Skills Overview |
| 11 | + |
| 12 | +The plugin-dev toolkit provides 9 specialized skills for building Claude Code plugins, plus this guide. Each skill handles a specific domain of plugin development. |
| 13 | + |
| 14 | +### Skill Quick Reference |
| 15 | + |
| 16 | +| Skill | Purpose | |
| 17 | +| ------- | --------- | |
| 18 | +| **plugin-structure** | Directory layout, manifest, component organization | |
| 19 | +| **command-development** | Slash commands with frontmatter | |
| 20 | +| **agent-development** | Autonomous subagents | |
| 21 | +| **skill-development** | Creating skills with progressive disclosure | |
| 22 | +| **hook-development** | Event-driven automation | |
| 23 | +| **mcp-integration** | Model Context Protocol servers | |
| 24 | +| **lsp-integration** | Language Server Protocol for code intelligence | |
| 25 | +| **plugin-settings** | User configuration via .local.md | |
| 26 | +| **marketplace-structure** | Plugin marketplace creation | |
| 27 | + |
| 28 | +## When to Use Each Skill |
| 29 | + |
| 30 | +### Starting a New Plugin |
| 31 | + |
| 32 | +**Skill: `plugin-structure`** |
| 33 | + |
| 34 | +Use when the user needs to: |
| 35 | + |
| 36 | +- Create a new plugin from scratch |
| 37 | +- Understand plugin directory layout |
| 38 | +- Configure plugin.json manifest |
| 39 | +- Learn about component auto-discovery |
| 40 | +- Use ${CLAUDE_PLUGIN_ROOT} for portable paths |
| 41 | + |
| 42 | +### Adding User-Facing Commands |
| 43 | + |
| 44 | +**Skill: `command-development`** |
| 45 | + |
| 46 | +Use when the user needs to: |
| 47 | + |
| 48 | +- Create slash commands (/command-name) |
| 49 | +- Configure command frontmatter (description, allowed-tools, model) |
| 50 | +- Use dynamic arguments ($ARGUMENTS, $1, $2) |
| 51 | +- Reference files with @ syntax |
| 52 | +- Execute bash inline with `[BANG]` backticks |
| 53 | + |
| 54 | +### Creating Autonomous Agents |
| 55 | + |
| 56 | +**Skill: `agent-development`** |
| 57 | + |
| 58 | +Use when the user needs to: |
| 59 | + |
| 60 | +- Create subagents for complex tasks |
| 61 | +- Write agent system prompts |
| 62 | +- Configure agent triggering (description with examples) |
| 63 | +- Choose agent models and colors |
| 64 | +- Restrict agent tool access |
| 65 | + |
| 66 | +### Building Skills |
| 67 | + |
| 68 | +**Skill: `skill-development`** |
| 69 | + |
| 70 | +Use when the user needs to: |
| 71 | + |
| 72 | +- Create skills that extend Claude's capabilities |
| 73 | +- Write SKILL.md with proper frontmatter |
| 74 | +- Organize skill content with progressive disclosure |
| 75 | +- Create references/, examples/, scripts/ directories |
| 76 | +- Write effective trigger phrases |
| 77 | + |
| 78 | +### Implementing Event Hooks |
| 79 | + |
| 80 | +**Skill: `hook-development`** |
| 81 | + |
| 82 | +Use when the user needs to: |
| 83 | + |
| 84 | +- React to Claude Code events (PreToolUse, Stop, SessionStart, etc.) |
| 85 | +- Create prompt-based or command-based hooks |
| 86 | +- Validate tool inputs before execution |
| 87 | +- Enforce completion standards |
| 88 | +- Block dangerous operations |
| 89 | + |
| 90 | +### Integrating External Services via MCP |
| 91 | + |
| 92 | +**Skill: `mcp-integration`** |
| 93 | + |
| 94 | +Use when the user needs to: |
| 95 | + |
| 96 | +- Add MCP servers to plugins |
| 97 | +- Configure stdio, SSE, HTTP, or WebSocket servers |
| 98 | +- Set up authentication (OAuth, tokens) |
| 99 | +- Use MCP tools in commands and agents |
| 100 | +- Discover existing MCP servers on PulseMCP |
| 101 | + |
| 102 | +### Adding Code Intelligence via LSP |
| 103 | + |
| 104 | +**Skill: `lsp-integration`** |
| 105 | + |
| 106 | +Use when the user needs to: |
| 107 | + |
| 108 | +- Add Language Server Protocol servers to plugins |
| 109 | +- Enable go-to-definition and find-references |
| 110 | +- Configure language-specific servers (pyright, gopls, rust-analyzer) |
| 111 | +- Set up extensionToLanguage mappings |
| 112 | +- Enhance Claude's code understanding |
| 113 | + |
| 114 | +### Managing Plugin Configuration |
| 115 | + |
| 116 | +**Skill: `plugin-settings`** |
| 117 | + |
| 118 | +Use when the user needs to: |
| 119 | + |
| 120 | +- Store user-configurable settings |
| 121 | +- Use .claude/plugin-name.local.md pattern |
| 122 | +- Parse YAML frontmatter in hooks |
| 123 | +- Create temporarily active hooks |
| 124 | +- Manage agent state |
| 125 | + |
| 126 | +### Creating Plugin Marketplaces |
| 127 | + |
| 128 | +**Skill: `marketplace-structure`** |
| 129 | + |
| 130 | +Use when the user needs to: |
| 131 | + |
| 132 | +- Create a marketplace for multiple plugins |
| 133 | +- Configure marketplace.json |
| 134 | +- Set up plugin sources (relative, GitHub, git URL) |
| 135 | +- Distribute plugins to teams |
| 136 | +- Organize plugin collections |
| 137 | + |
| 138 | +## Decision Tree for Skill Selection |
| 139 | + |
| 140 | +``` |
| 141 | +User wants to... |
| 142 | +├── Create/organize a plugin structure? → plugin-structure |
| 143 | +├── Add a slash command? → command-development |
| 144 | +├── Create an autonomous agent? → agent-development |
| 145 | +├── Add domain expertise/knowledge? → skill-development |
| 146 | +├── React to Claude Code events? → hook-development |
| 147 | +├── Integrate external service/API? → mcp-integration |
| 148 | +├── Add code intelligence/LSP? → lsp-integration |
| 149 | +├── Make plugin configurable? → plugin-settings |
| 150 | +└── Distribute multiple plugins? → marketplace-structure |
| 151 | +``` |
| 152 | + |
| 153 | +## Common Multi-Skill Workflows |
| 154 | + |
| 155 | +### Building a Complete Plugin |
| 156 | + |
| 157 | +1. **Start**: Load `plugin-structure` skill to create directory layout |
| 158 | +2. **Add features**: Load `command-development` for user-facing commands |
| 159 | +3. **Automation**: Load `hook-development` for event-driven behavior |
| 160 | +4. **Configuration**: Load `plugin-settings` if user configuration needed |
| 161 | +5. **Validation**: Use plugin-validator agent to validate structure |
| 162 | + |
| 163 | +### Creating an MCP-Powered Plugin |
| 164 | + |
| 165 | +1. **Start**: Load `plugin-structure` for basic structure |
| 166 | +2. **Integration**: Load `mcp-integration` to configure MCP servers |
| 167 | +3. **Commands**: Load `command-development` to create commands that use MCP tools |
| 168 | +4. **Agents**: Load `agent-development` for autonomous MCP workflows |
| 169 | + |
| 170 | +### Building a Code Intelligence Plugin |
| 171 | + |
| 172 | +1. **Start**: Load `plugin-structure` for basic structure |
| 173 | +2. **LSP**: Load `lsp-integration` to configure language servers |
| 174 | +3. **Commands**: Load `command-development` for commands using LSP features |
| 175 | + |
| 176 | +### Building a Skill-Focused Plugin |
| 177 | + |
| 178 | +1. **Start**: Load `plugin-structure` for basic structure |
| 179 | +2. **Skills**: Load `skill-development` to create specialized skills |
| 180 | +3. **Validation**: Use skill-reviewer agent to validate skill quality |
| 181 | + |
| 182 | +## Available Agents |
| 183 | + |
| 184 | +The plugin-dev plugin also provides 3 agents: |
| 185 | + |
| 186 | +| Agent | Purpose | |
| 187 | +|-------|---------| |
| 188 | +| **plugin-validator** | Validates plugin structure and manifests | |
| 189 | +| **skill-reviewer** | Reviews skill quality and triggering | |
| 190 | +| **agent-creator** | Generates new agents from descriptions | |
| 191 | + |
| 192 | +Use agents proactively after creating components to ensure quality. |
| 193 | + |
| 194 | +## Available Commands |
| 195 | + |
| 196 | +| Command | Purpose | |
| 197 | +|---------|---------| |
| 198 | +| `/plugin-dev:start` | Entry point - choose plugin or marketplace creation | |
| 199 | +| `/plugin-dev:create-plugin` | 8-phase guided plugin creation workflow | |
| 200 | +| `/plugin-dev:create-marketplace` | 8-phase guided marketplace creation workflow | |
| 201 | + |
| 202 | +--- |
| 203 | + |
| 204 | +## User Request |
| 205 | + |
| 206 | +$ARGUMENTS |
| 207 | + |
| 208 | +If the user provided a request above, analyze it and either: |
| 209 | + |
| 210 | +1. **Route to a specific skill** if the request clearly matches one domain |
| 211 | +2. **Answer directly** using this guide's overview information |
| 212 | +3. **Ask for clarification** if the request is ambiguous |
| 213 | + |
| 214 | +If no request was provided, summarize the available plugin development capabilities and ask what the user wants to build or learn about. |
0 commit comments