plugins/plugin-dev/commands/create-plugin.md
Guide the user through creating a complete, high-quality Claude Code plugin from initial concept to tested implementation. Follow a systematic approach: understand requirements, design components, clarify details, implement following best practices, validate, and test.
Initial request: $ARGUMENTS
Goal: Understand what plugin needs to be built and what problem it solves
Actions:
Output: Clear statement of plugin purpose and target users
Goal: Determine what plugin components are needed
MUST load plugin-structure skill using Skill tool before this phase.
Actions:
| Component Type | Count | Purpose |
|----------------|-------|---------|
| Skills | 2 | Hook patterns, MCP usage |
| Commands | 3 | Deploy, configure, validate |
| Agents | 1 | Autonomous validation |
| Hooks | 0 | Not needed |
| MCP | 1 | Database integration |
Output: Confirmed list of components to create
Goal: Specify each component in detail and resolve all ambiguities
CRITICAL: This is one of the most important phases. DO NOT SKIP.
Actions:
For each component in the plan, identify underspecified aspects:
Present all questions to user in organized sections (one section per component type)
Wait for answers before proceeding to implementation
If user says "whatever you think is best", provide specific recommendations and get explicit confirmation
Example questions for a skill:
Example questions for an agent:
Output: Detailed specification for each component
Goal: Create plugin directory structure and manifest
Actions:
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
{
"name": "plugin-name",
"version": "0.1.0",
"description": "[brief description]",
"author": {
"name": "[author from user or default]",
"email": "[email or default]"
}
}
Output: Plugin directory structure created and ready for components
Goal: Create each component following best practices
LOAD RELEVANT SKILLS before implementing each component type:
Actions for each component:
.claude/*.local.mdProgress tracking: Update todos as each component is completed
Output: All plugin components implemented
Goal: Ensure plugin meets quality standards and works correctly
Actions:
Run plugin-validator agent:
Fix critical issues:
Review with skill-reviewer (if plugin has skills):
Test agent triggering (if plugin has agents):
Test hook configuration (if plugin has hooks):
Present findings:
Ask user: "Validation complete. Issues found: [count critical], [count warnings]. Would you like me to fix them now, or proceed to testing?"
Output: Plugin validated and ready for testing
Goal: Test that plugin works correctly in Claude Code
Actions:
Installation instructions:
cc --plugin-dir /path/to/plugin-name
.claude-plugin/ for project testingVerification checklist for user to perform:
/help and execute correctlyTesting recommendations:
/plugin-name:command-name with various argumentsclaude --debug to see hook execution/mcp to verify servers and toolsAsk user: "I've prepared the plugin for testing. Would you like me to guide you through testing each component, or do you want to test it yourself?"
If user wants guidance, walk through testing each component with specific test cases
Output: Plugin tested and verified working
Goal: Ensure plugin is well-documented and ready for distribution
Actions:
Verify README completeness:
Add marketplace entry (if publishing):
Create summary:
Suggest improvements (optional):
Output: Complete, documented plugin ready for use or publication
Every component must meet these standards:
"Create a plugin for managing database migrations"
Begin with Phase 1: Discovery