Plugin Creation Workflow
Guide end-to-end plugin creation from initial concept through component design, implementation, validation, and testing. Follow a systematic multi-phase approach to produce high-quality Claude Code plugins.
Core Principles
- Ask clarifying questions: Identify all ambiguities about plugin purpose, triggering, scope, and components before implementing.
- Load relevant skills: Use the Skill tool to load plugin-dev skills when needed (plugin-structure, hook-development, agent-development, skill-development, mcp-integration, plugin-settings).
- Use specialized agents: Leverage agent-creator, plugin-validator, and skill-reviewer agents.
- Follow best practices: Apply patterns from plugin-dev's own implementation.
- Use TodoWrite: Track progress throughout all phases.
Phase 1: Discovery
Goal: Understand the plugin's purpose and target users.
- Create a todo list with all phases
- If plugin purpose is clear, summarize understanding and identify plugin type (integration, workflow, analysis, toolkit)
- If unclear, ask:
- What problem does this plugin solve?
- Who will use it and when?
- What should it do?
- Any similar plugins to reference?
- Confirm understanding with the user before proceeding
Phase 2: Component Planning
Goal: Determine which plugin components are needed.
Load plugin-structure skill before this phase.
Analyze requirements and determine needed components:
- Skills: Specialized knowledge? (hooks API, MCP patterns)
- Commands: User-initiated actions? (deploy, configure, analyze)
- Agents: Autonomous tasks? (validation, generation, analysis)
- Hooks: Event-driven automation? (validation, notifications)
- MCP: External service integration? (databases, APIs)
- Settings: User configuration? (.local.md files)
Present a component plan table to the user and get confirmation.
Phase 3: Detailed Design
Goal: Specify each component in detail and resolve all ambiguities.
CRITICAL: Do not skip this phase.
For each component, identify underspecified aspects:
- Skills: Trigger conditions, knowledge scope, detail level
- Commands: Arguments, tools, interactive vs automated
- Agents: Trigger mode (proactive/reactive), tools, output format
- Hooks: Events, prompt vs command type, validation criteria
- MCP: Server type, authentication, tools exposed
- Settings: Fields, required vs optional, defaults
Present all questions organized by component type. Wait for answers.
Phase 4: Plugin Structure Creation
Goal: Create the directory structure and manifest.
- Determine plugin name (kebab-case, descriptive)
- Choose plugin location (ask the user)
- Create directory structure:
mkdir -p plugin-name/.claude-plugin
mkdir -p plugin-name/skills # if needed
mkdir -p plugin-name/commands # if needed
mkdir -p plugin-name/agents # if needed
mkdir -p plugin-name/hooks # if needed
- Create
plugin.json manifest
- Create README.md template
- Initialize git repo if creating new directory
Phase 5: Component Implementation
Goal: Create each component following best practices.
Load relevant skills before implementing each component type:
- Skills: Load skill-development skill
- Commands: Load command-development skill
- Agents: Load agent-development skill
- Hooks: Load hook-development skill
- MCP: Load mcp-integration skill
- Settings: Load plugin-settings skill
Skills Implementation
- Plan resources (scripts/, references/, examples/)
- Write SKILL.md with third-person description and specific trigger phrases
- Lean body (1,500-2,000 words) in imperative form
- Create reference files for detailed content
- Validate with skill-reviewer agent
Commands Implementation
- Write markdown with frontmatter (description, argument-hint, allowed-tools)
- Instructions written FOR Claude, not TO the user
- Reference relevant skills if applicable
Agents Implementation
- Use agent-creator agent to generate: identifier, whenToUse with examples, systemPrompt
- Create agent markdown with frontmatter (name, description, model, color, tools)
- Validate with validate-agent.sh
Hooks Implementation
- Create hooks/hooks.json with hook configuration
- Prefer prompt-based hooks for complex logic
- Use
${CLAUDE_PLUGIN_ROOT} for portability
- Test with validate-hook-schema.sh and test-hook.sh
MCP Implementation
- Create .mcp.json with server configuration
- Use
${CLAUDE_PLUGIN_ROOT} in command paths
- Document required environment variables
Phase 6: Validation
Goal: Ensure the plugin meets quality standards.
- Run plugin-validator agent (checks manifest, structure, naming, components, security)
- Fix critical issues
- Run skill-reviewer for each skill
- Run validate-agent.sh on agent files
- Run validate-hook-schema.sh on hooks configuration
- Present findings and ask the user whether to fix now or proceed
Phase 7: Testing
Goal: Test that the plugin works correctly in Claude Code.
Provide installation instructions:
cc --plugin-dir /path/to/plugin-name
Verification checklist:
- Skills load when triggered (test with trigger phrases from descriptions)
- Commands appear in /help and execute correctly
- Agents trigger on appropriate scenarios
- Hooks activate on events
- MCP servers connect
- Settings files work
Phase 8: Documentation
Goal: Ensure complete documentation and distribution readiness.
- Verify README completeness (overview, features, installation, usage)
- Add marketplace entry if publishing (marketplace.json)
- Create summary: components created, files, structure, next steps
Key Decision Points (Wait for User)
- After Phase 1: Confirm plugin purpose
- After Phase 2: Approve component plan
- After Phase 3: Proceed to implementation
- After Phase 6: Fix issues or proceed
- After Phase 7: Continue to documentation
1---2name: creating-plugins3description: This skill should be used when the user asks to "create a plugin", "build a new plugin", "scaffold a plugin", "make a Claude Code plugin", "design a plugin", or needs guidance on the end-to-end plugin creation workflow including discovery, component planning, design, implementation, validation, and testing.4---56# Plugin Creation Workflow78Guide end-to-end plugin creation from initial concept through component design, implementation, validation, and testing. Follow a systematic multi-phase approach to produce high-quality Claude Code plugins.910## Core Principles1112- **Ask clarifying questions**: Identify all ambiguities about plugin purpose, triggering, scope, and components before implementing.13- **Load relevant skills**: Use the Skill tool to load plugin-dev skills when needed (plugin-structure, hook-development, agent-development, skill-development, mcp-integration, plugin-settings).14- **Use specialized agents**: Leverage agent-creator, plugin-validator, and skill-reviewer agents.15- **Follow best practices**: Apply patterns from plugin-dev's own implementation.16- **Use TodoWrite**: Track progress throughout all phases.1718## Phase 1: Discovery1920**Goal**: Understand the plugin's purpose and target users.21221. Create a todo list with all phases232. If plugin purpose is clear, summarize understanding and identify plugin type (integration, workflow, analysis, toolkit)243. If unclear, ask:25 - What problem does this plugin solve?26 - Who will use it and when?27 - What should it do?28 - Any similar plugins to reference?294. Confirm understanding with the user before proceeding3031## Phase 2: Component Planning3233**Goal**: Determine which plugin components are needed.3435**Load plugin-structure skill** before this phase.3637Analyze requirements and determine needed components:38- **Skills**: Specialized knowledge? (hooks API, MCP patterns)39- **Commands**: User-initiated actions? (deploy, configure, analyze)40- **Agents**: Autonomous tasks? (validation, generation, analysis)41- **Hooks**: Event-driven automation? (validation, notifications)42- **MCP**: External service integration? (databases, APIs)43- **Settings**: User configuration? (.local.md files)4445Present a component plan table to the user and get confirmation.4647## Phase 3: Detailed Design4849**Goal**: Specify each component in detail and resolve all ambiguities.5051**CRITICAL**: Do not skip this phase.5253For each component, identify underspecified aspects:54- **Skills**: Trigger conditions, knowledge scope, detail level55- **Commands**: Arguments, tools, interactive vs automated56- **Agents**: Trigger mode (proactive/reactive), tools, output format57- **Hooks**: Events, prompt vs command type, validation criteria58- **MCP**: Server type, authentication, tools exposed59- **Settings**: Fields, required vs optional, defaults6061Present all questions organized by component type. Wait for answers.6263## Phase 4: Plugin Structure Creation6465**Goal**: Create the directory structure and manifest.66671. Determine plugin name (kebab-case, descriptive)682. Choose plugin location (ask the user)693. Create directory structure:70 ```bash71 mkdir -p plugin-name/.claude-plugin72 mkdir -p plugin-name/skills # if needed73 mkdir -p plugin-name/commands # if needed74 mkdir -p plugin-name/agents # if needed75 mkdir -p plugin-name/hooks # if needed76 ```774. Create `plugin.json` manifest785. Create README.md template796. Initialize git repo if creating new directory8081## Phase 5: Component Implementation8283**Goal**: Create each component following best practices.8485**Load relevant skills** before implementing each component type:86- Skills: Load skill-development skill87- Commands: Load command-development skill88- Agents: Load agent-development skill89- Hooks: Load hook-development skill90- MCP: Load mcp-integration skill91- Settings: Load plugin-settings skill9293### Skills Implementation94- Plan resources (scripts/, references/, examples/)95- Write SKILL.md with third-person description and specific trigger phrases96- Lean body (1,500-2,000 words) in imperative form97- Create reference files for detailed content98- Validate with skill-reviewer agent99100### Commands Implementation101- Write markdown with frontmatter (description, argument-hint, allowed-tools)102- Instructions written FOR Claude, not TO the user103- Reference relevant skills if applicable104105### Agents Implementation106- Use agent-creator agent to generate: identifier, whenToUse with examples, systemPrompt107- Create agent markdown with frontmatter (name, description, model, color, tools)108- Validate with validate-agent.sh109110### Hooks Implementation111- Create hooks/hooks.json with hook configuration112- Prefer prompt-based hooks for complex logic113- Use `${CLAUDE_PLUGIN_ROOT}` for portability114- Test with validate-hook-schema.sh and test-hook.sh115116### MCP Implementation117- Create .mcp.json with server configuration118- Use `${CLAUDE_PLUGIN_ROOT}` in command paths119- Document required environment variables120121## Phase 6: Validation122123**Goal**: Ensure the plugin meets quality standards.1241251. Run **plugin-validator** agent (checks manifest, structure, naming, components, security)1262. Fix critical issues1273. Run **skill-reviewer** for each skill1284. Run validate-agent.sh on agent files1295. Run validate-hook-schema.sh on hooks configuration1306. Present findings and ask the user whether to fix now or proceed131132## Phase 7: Testing133134**Goal**: Test that the plugin works correctly in Claude Code.135136Provide installation instructions:137```bash138cc --plugin-dir /path/to/plugin-name139```140141Verification checklist:142- Skills load when triggered (test with trigger phrases from descriptions)143- Commands appear in /help and execute correctly144- Agents trigger on appropriate scenarios145- Hooks activate on events146- MCP servers connect147- Settings files work148149## Phase 8: Documentation150151**Goal**: Ensure complete documentation and distribution readiness.1521531. Verify README completeness (overview, features, installation, usage)1542. Add marketplace entry if publishing (marketplace.json)1553. Create summary: components created, files, structure, next steps156157## Key Decision Points (Wait for User)1581591. After Phase 1: Confirm plugin purpose1602. After Phase 2: Approve component plan1613. After Phase 3: Proceed to implementation1624. After Phase 6: Fix issues or proceed1635. After Phase 7: Continue to documentation