| name | plugin-creator |
| description | Guide for creating and managing Claude Code plugins. Use when creating a new plugin, adding plugin components (commands, agents, skills, hooks, MCP servers), or validating plugin structure and configuration. |
Plugin Creator
This skill provides comprehensive guidance for creating, developing, and managing Claude Code plugins.
About Plugins
Plugins are modular packages that extend Claude Code's capabilities by bundling multiple components into a single installable unit. Unlike individual skills, plugins can include:
- Commands: Custom slash commands for repeatable workflows
- Agents: Specialized subagents for autonomous task handling
- Skills: Model-invoked capabilities that trigger based on context
- Hooks: Event handlers that respond to system events
- MCP Servers: External tool integrations via Model Context Protocol
Plugin Development Workflow
Follow these steps to create a new plugin:
- Understand plugin requirements and scope
- Initialize plugin structure
- Add components (commands, agents, skills, hooks, MCP)
- Validate plugin structure
- Test plugin locally
- Distribute plugin
Step 1: Understanding Plugin Requirements
Before creating a plugin, clarify:
- What capabilities should the plugin provide?
- Which components are needed (commands, agents, skills, hooks, MCP)?
- Who is the target audience (personal, team, public)?
- What existing tools or workflows will it enhance?
Ask questions to gather concrete examples:
- "What tasks should this plugin help with?"
- "Do you need custom slash commands for specific workflows?"
- "Should Claude automatically use these capabilities (skills) or should they be user-invoked (commands)?"
- "Do you need to integrate with external tools (MCP servers)?"
Step 2: Initialize Plugin Structure
Create basic plugin directory with .claude-plugin/plugin.json containing: name, description, version, and author fields.
For detailed initialization steps:
- See references/plugin-structure.md for complete setup instructions and field requirements
Step 3: Add Plugin Components
Based on requirements, add the appropriate components. See references for detailed guidance on each component type:
Adding Skills
Skills are model-invoked capabilities that Claude uses automatically based on task context.
When to use: For capabilities that should activate automatically (e.g., PDF processing, spreadsheet analysis, code review)
How to add:
- Create
skills/directory at plugin root - For each skill, create
skills/skill-name/SKILL.md - Follow skill-creator guidance for SKILL.md structure
Example:
my-plugin/
├── .claude-plugin/
│ └── plugin.json
└── skills/
├── pdf-processor/
│ └── SKILL.md
└── data-analyzer/
└── SKILL.md
See references/skills-in-plugins.md for complete guidance.
Adding Commands
Commands are custom slash commands for repeatable workflows.
When to use: For user-initiated workflows that should be explicitly invoked (e.g., /deploy, /review-pr, /generate-report)
How to add:
- Create
commands/directory at plugin root - For each command, create
commands/command-name.md - Add YAML frontmatter with description
- Write instructions for Claude
Example command file (commands/deploy.md):
---
description: Deploy application to production environment
---
# Deploy Command
When this command is invoked, perform these steps:
1. Run pre-deployment checks
2. Build the application
3. Deploy to production
4. Verify deployment success
Commands support arguments: /deploy staging or /deploy production
See references/commands.md for advanced command features.
Adding Agents
Agents are specialized subagents that Claude can invoke for specific task types.
When to use: For complex multi-step tasks that benefit from dedicated focus (e.g., code review agent, testing agent)
How to add:
- Create
agents/directory at plugin root - For each agent, create
agents/agent-name.md - Define agent's role, capabilities, and workflow
See references/agents.md for agent development patterns.
Adding Hooks
Hooks are event handlers that execute in response to system events.
When to use: For automation triggered by events (e.g., linting after edits, logging tool usage)
How to add:
- Create
hooks/directory at plugin root - Create
hooks/hooks.jsonwith hook configuration - Define event types, matchers, and commands
Note: Hooks are configured through Claude Code settings, not traditionally through plugin files. The hooks.json in plugins primarily serves as documentation or defaults.
See references/hooks.md for available events and configuration.
Adding MCP Servers
MCP servers connect Claude to external tools and services.
When to use: For integrating external APIs, databases, or services (e.g., GitHub API, Slack, database access)
How to add:
- Create
.mcp.jsonat plugin root - Configure MCP server connection details
- Document server capabilities
See references/mcp-integration.md for MCP configuration.
Step 4: Validate Plugin Structure
Use the validation script to check plugin structure:
python3 utils/validate_plugin.py path/to/my-plugin
The validator checks:
- plugin.json format and required fields
- Component directory structure
- SKILL.md frontmatter for skills
- Command file format
- Overall plugin organization
Fix any validation errors before proceeding.
Step 5: Adding Plugin to Marketplace Configuration
After creating and validating a new plugin, check if there is a marketplace configuration file that should be updated to include it:
For marketplace repositories:
- Check if
.claude-plugin/marketplace.jsonexists in the repository - If it exists, the new plugin may need to be added to the
pluginsarray - Each marketplace entry includes: name, source, description, version, and author
Example marketplace.json entry:
{
"name": "my-plugin",
"source": {
"source": "github",
"repo": "username/repo-name"
},
"description": "Plugin description",
"version": "1.0.0",
"author": {
"name": "Author Name"
}
}
Important: Ask the user how they want to handle the newly created plugin:
- Add it to the marketplace configuration for distribution
- Test it out locally first before adding to marketplace
- Keep it as a standalone plugin (not in marketplace)
- Another option
The user's preference will determine whether marketplace configuration updates are needed.
Step 6: Test Plugin Locally
Install the plugin locally for testing:
# Install from local directory
claude plugin install /path/to/my-plugin
Test all components:
- For skills: Trigger tasks that should activate the skills
- For commands: Run slash commands with
/command-name - For agents: Invoke tasks that should use the agents
- For hooks: Trigger events to verify hook execution
Iterate based on testing feedback.
Step 7: Distribute Plugin
Choose distribution method:
Option 1: Git Repository
# Users install from git URL
claude plugin install https://github.com/username/my-plugin
Option 2: Plugin Marketplace
- Submit to marketplace for wider distribution
- Follow marketplace submission guidelines
- Provide documentation and examples
Option 3: Local/Team Distribution
- Share plugin directory with team
- Install from local path or shared network location
Best Practices & Common Patterns
For detailed information:
- See references/plugin-structure.md for:
- Common plugin patterns (single-skill, multi-skill, command-heavy, full-featured)
- Best practices for scope, naming, versioning, and documentation
- Component integration guidelines
Resources
This skill includes detailed reference documentation for each plugin component:
- references/skills-in-plugins.md: Comprehensive guide for adding skills to plugins
- references/commands.md: Advanced command features and patterns
- references/agents.md: Agent development and configuration
- references/hooks.md: Hook events and configuration
- references/mcp-integration.md: MCP server integration guide
- references/plugin-json-schema.md: Complete plugin.json schema reference
Load these references as needed when working on specific components.