Plugin Dev — Plugin Development Toolkit
Plugin Development Toolkit
Comprehensive toolkit for developing Claude Code plugins with 7 specialized skills, 3 expert agents, and an 8-phase guided creation workflow.
🛠️ Development Kit📚 Progressive Disclosure🤖 3 Expert Agents🔌 8-Phase Workflow
📚 What is this & why does it exist?
Plugin Dev is the meta-plugin — it teaches Claude Code how to build other plugins. It provides structured knowledge about every plugin component type (commands, agents, skills, hooks, MCP servers, settings) through progressive disclosure: concise SKILL.md files for quick reference, detailed references for deep understanding, and working examples for implementation. The /create-plugin command orchestrates a guided 8-phase workflow from discovery to documentation.
💡 Real-world analogy
Imagine a master craftsperson's workshop that not only has every tool imaginable, but also comes with apprenticeship programs for each tool. The plugin-dev toolkit is that workshop. The 7 skills are like specialized training manuals (one for woodworking, one for metalwork, etc.), the 3 agents are expert instructors who can review your work, and the /create-plugin command is a guided project plan that walks you from concept to finished product.
Architecture
flowchart LR
subgraph CreatePlugin["8-Phase Workflow"]
P1["Discovery"] --> P2["Planning"]
P2 --> P3["Design"]
P3 --> P4["Structure"]
P4 --> P5["Implementation"]
P5 --> P6["Validation"]
P6 --> P7["Testing"]
P7 --> P8["Documentation"]
end
subgraph Skills["7 Specialized Skills"]
S1["plugin-structure"]
S2["agent-development"]
S3["command-development"]
S4["hook-development"]
S5["mcp-integration"]
S6["plugin-settings"]
S7["skill-development"]
end
subgraph Agents["3 Expert Agents"]
A1["agent-creator"]
A2["plugin-validator"]
A3["skill-reviewer"]
end
P5 --> S1
P5 --> S2
P5 --> S3
P5 --> S4
P5 --> S5
P6 --> A2
P6 --> A3
P5 --> A1
Key Components
| Component | File | Role |
|---|---|---|
create-plugin.md | commands/create-plugin.md | 8-phase guided plugin creation command |
agent-creator | agents/agent-creator.md | Generates agent configurations from descriptions |
plugin-validator | agents/plugin-validator.md | Validates plugin structure, manifest, and security |
skill-reviewer | agents/skill-reviewer.md | Reviews skill quality and trigger effectiveness |
plugin-structure | skills/plugin-structure/SKILL.md | Directory layout, manifest, auto-discovery |
agent-development | skills/agent-development/SKILL.md | Agent file structure, frontmatter, triggering |
command-development | skills/command-development/SKILL.md | Slash commands, YAML frontmatter, arguments |
hook-development | skills/hook-development/SKILL.md | Event hooks, 9 event types, security patterns |
mcp-integration | skills/mcp-integration/SKILL.md | MCP server configuration, authentication |
plugin-settings | skills/plugin-settings/SKILL.md | Per-project YAML frontmatter settings |
skill-development | skills/skill-development/SKILL.md | Skill structure, progressive disclosure |
manifest-reference | skills/plugin-structure/references/manifest-reference.md | Detailed plugin.json field reference |
component-patterns | skills/plugin-structure/references/component-patterns.md | Reusable plugin component patterns |
Data Flow
sequenceDiagram
participant Dev as Developer
participant Cmd as /create-plugin
participant Skills as Skill System
participant Agent as agent-creator
participant Val as plugin-validator
participant Rev as skill-reviewer
Dev->>Cmd: /create-plugin "my-plugin"
Cmd->>Dev: Phase 1: What does your plugin do?
Dev->>Cmd: Description and requirements
Cmd->>Skills: Load plugin-structure skill
Skills-->>Cmd: Directory layout guidance
Cmd->>Agent: Create agent configurations
Agent-->>Cmd: Generated agent files
Cmd->>Skills: Load hook-development skill
Skills-->>Cmd: Hook patterns and examples
Cmd->>Val: Validate plugin structure
Val-->>Cmd: Validation report (issues/warnings)
Cmd->>Rev: Review skill quality
Rev-->>Cmd: Quality assessment
Cmd->>Dev: Phase 8: Summary and README
Skill Progressive Disclosure
stateDiagram-v2
[*] --> Metadata: Plugin loaded
Metadata --> CoreSKILL: Skill triggered
CoreSKILL --> References: Deep knowledge needed
CoreSKILL --> Examples: Implementation needed
References --> Scripts: Validation needed
Examples --> Scripts: Testing needed
Scripts --> [*]: Plugin validated
state Metadata {
[*] --> Name
Name --> Description
Description --> Triggers
}
state CoreSKILL {
[*] --> API_Reference
API_Reference --> Patterns
Patterns --> BestPractices
}
Each skill uses progressive disclosure: metadata is always loaded (trigger matching), the core SKILL.md (1,500–2,000 words) provides essential API reference, references/ holds 2-4 detailed docs, examples/ provides 3-12 working samples, and scripts/ offers validation utilities.
🚶 Step-by-Step: Creating a Plugin from Scratch
Follow a /create-plugin "my-security-scanner" command through the 8-phase workflow:
- Phase 1 — Discovery — The command asks what your plugin does, who it serves, and what problem it solves. You describe a security scanner plugin.
- Phase 2 — Planning — Determines which component types you need: a command for scanning, a hook for real-time monitoring, and a skill for security knowledge.
- Phase 3 — Design — Clarifying questions about scope: which vulnerability patterns, what languages, blocking vs warning behavior.
- Phase 4 — Structure — Creates the directory layout:
.claude-plugin/plugin.json,commands/,hooks/,skills/. Uses theplugin-structureskill for guidance. - Phase 5 — Implementation — The
agent-creatorgenerates agent configurations. Thehook-developmentskill guides PreToolUse hook creation. Thecommand-developmentskill structures the slash command. - Phase 6 — Validation — The
plugin-validatoragent checks manifest fields, directory structure, naming conventions, and security patterns. Reports critical issues vs warnings. - Phase 7 — Testing — You test the plugin in a Claude Code session. The validator verifies hook responses and command behavior.
- Phase 8 — Documentation — Generates README.md with installation instructions, usage examples, and configuration reference. The
skill-reviewerchecks documentation quality.
Code Examples
Plugin Manifest (plugin.json)
{
"name": "my-security-scanner",
"version": "1.0.0",
"description": "Scans code for security vulnerabilities during editing",
"author": { "name": "Developer", "email": "dev@example.com" },
"mcpServers": {}
}
Agent Configuration (agents/scanner.md)
---
name: security-scanner
description: |
Use this agent when reviewing code for security vulnerabilities.
Examples:
<example>scan this file for XSS vulnerabilities</example>
<example>check for SQL injection in the API routes</example>
model: sonnet
color: red
tools:
- Read
- Grep
- Glob
- Bash
---
You are a security scanning expert. Analyze code for vulnerability patterns...
Hook Configuration (hooks/hooks.json)
{
"PreToolUse": [
{
"matcher": "Write|Edit|MultiEdit",
"hooks": [
{
"type": "command",
"command": "python3 hooks/security_check.py"
}
]
}
]
}
Interactions
| Module | Interface | Data Exchanged |
|---|---|---|
| Claude Code CLI | Command registration | Plugin manifest loaded at startup |
| All plugins | Structure guidance | Provides canonical plugin structure knowledge |
| hook-development skill | Hook system | Documents all 9 hook event types |
| mcp-integration skill | MCP protocol | Configures external tool servers |
| GitHub Marketplace | Publishing | Guides marketplace submission process |
Directory Map
Source tree for Plugin Dev
plugin-dev/
├── .claude-plugin/plugin.json ← Role: Plugin manifest
├── README.md ← Role: Plugin documentation
├── commands/
│ └── create-plugin.md ← Role: 8-phase creation workflow
├── agents/
│ ├── agent-creator.md ← Role: Agent file generator
│ ├── plugin-validator.md ← Role: Structure validator
│ └── skill-reviewer.md ← Role: Quality reviewer
└── skills/
├── plugin-structure/ ← Role: Directory layout guidance
├── agent-development/ ← Role: Agent creation guidance
├── command-development/ ← Role: Command patterns
├── hook-development/ ← Role: Hook event handling
├── mcp-integration/ ← Role: MCP server config
├── plugin-settings/ ← Role: Settings patterns
└── skill-development/ ← Role: Skill authoring
Configuration Reference
| Parameter | Default | Description |
|---|---|---|
plugin.json name | (required) | Plugin identifier for command namespacing |
plugin.json version | "1.0.0" | Semantic version string |
plugin.json description | (required) | Brief plugin description |
plugin.json author | {} | Author name and email |
plugin.json mcpServers | {} | MCP server definitions |
agent.model | inherit | AI model: inherit, sonnet, opus, haiku |
agent.color | blue | Terminal color: blue, cyan, green, yellow, magenta, red |
agent.tools | all | Allowed tool list or 'all' |
hook.type | command | Hook type: command or prompt |
hook.matcher | * | Tool name regex for PreToolUse/PostToolUse |
skill.version | "1.0.0" | Skill version for compatibility |