Use before creating or editing plugin.json manifests, organizing .claude-plugin directories, or when user asks about plugin structure, versioning, or distribution. Provides expert guidance on manifest configuration, component organization, semantic versioning, and shareable plugin best practices. Invoke when working with any plugin files or discussing plugin architecture to ensure correct structure and discoverability.
Provides expert guidance on creating Claude Code plugins with proper manifest structure, component organization, and semantic versioning. Use when working with plugin.json files, organizing .claude-plugin directories, or discussing plugin architecture to ensure correct structure and discoverability.
/plugin marketplace add bbrowning/bbrowning-claude-marketplace/plugin install bbrowning-claude@bbrowning-marketplaceThis skill inherits all available tools. When active, it can use any tool Claude has access to.
reference/best-practices.mdreference/plugin-structure.mdreference/review-checklist.mdtemplates/README.mdtemplates/hooks.jsontemplates/plugin-minimal.jsontemplates/plugin.jsonThis skill provides comprehensive guidance for creating Claude Code plugins that extend Claude with shareable, discoverable functionality.
Plugins are packages of functionality that can be shared across projects and teams. They can contain:
Plugins are discoverable through plugin marketplaces and easy to install with /plugin install.
Every plugin requires exactly one file: .claude-plugin/plugin.json
Minimum valid plugin:
{
"name": "my-plugin",
"version": "1.0.0"
}
All other components (commands, agents, skills, hooks, MCP servers) are optional.
mkdir my-pluginmkdir my-plugin/.claude-plugin/plugin install /path/to/my-pluginFor complete templates, see templates/plugin.json and templates/README.md.
The plugin.json file defines your plugin's metadata and component locations.
name: Unique identifier in kebab-caseversion: Semantic versioning (MAJOR.MINOR.PATCH)description: Brief plugin purposeauthor: Object with name (required) and email (optional)homepage: Documentation URLrepository: Source code linklicense: Open source license identifierkeywords: Array of discovery tagsSpecify where Claude should find each component type:
{
"name": "my-plugin",
"version": "1.0.0",
"commands": ["./commands"],
"agents": ["./agents"],
"skills": ["./skills"],
"hooks": "./hooks/hooks.json",
"mcpServers": "./.mcp.json"
}
Path rules:
./${CLAUDE_PLUGIN_ROOT} variable for flexible resolutionSee reference/plugin-structure.md for detailed structure information.
Custom slash commands users invoke directly.
commands field/my-commandSpecialized agent behaviors with custom capabilities.
agents fieldReusable capabilities agents can invoke autonomously.
skills fieldSKILL.mdEvent handlers triggered by specific events.
hooks field (points to hooks.json)External tool integrations via Model Context Protocol.
mcpServers field (points to .mcp.json)CRITICAL: When a plugin contains both slash commands and skills that work together, they must provide consistent instructions. Inconsistencies cause Claude to follow the wrong workflow.
Slash commands execute first and provide initial instructions. If the command has different instructions than a skill it invokes, Claude will follow the command's approach instead of the skill's approach.
Example issue:
gh repo clone"git worktree add"Slash command approach:
## 1. Setup
Create git worktree following the standard workflow:
[Include essential setup instructions]
## 2. Launch New Session
Provide user with complete context to continue:
- What PR/task they're working on
- Where the code is located
- Which skill to invoke
- What steps to skip (already completed)
Skill approach:
## 1. Setup (if needed)
[Same setup instructions as command]
## 2. Continue workflow
[Rest of the process]
DON'T hardcode machine-specific paths:
# Bad: Assumes all users organize code the same way
cd ~/src/<repo_name>
DO use adaptable instructions:
# Good: Adapts to any user's setup
First, check if the repository exists locally.
Ask the user where they keep repositories if not found.
This keeps plugins portable across different users and environments.
When creating or reviewing plugins with both commands and skills:
Single-purpose plugin (one component type):
my-command-plugin/
├── .claude-plugin/
│ └── plugin.json
└── commands/
└── my-command.md
Skills-focused plugin (most common):
my-skills-plugin/
├── .claude-plugin/
│ └── plugin.json
└── skills/
├── skill-one/
│ └── SKILL.md
└── skill-two/
└── SKILL.md
Full-featured plugin:
enterprise-plugin/
├── .claude-plugin/
│ └── plugin.json
├── commands/
├── agents/
├── skills/
├── hooks/
│ └── hooks.json
└── .mcp.json
See reference/plugin-structure.md for more patterns and examples.
Start minimal, add metadata as needed:
{
"name": "data-processor",
"version": "1.0.0",
"description": "Tools for processing and analyzing data files",
"author": {
"name": "Your Name"
},
"keywords": ["data", "analysis", "processing"],
"skills": ["./skills"]
}
Key points:
For comprehensive best practices, see reference/best-practices.md. Key highlights:
/plugin install /path/to/pluginclaude --debug./When reviewing plugins (your own or others') before sharing or adding to marketplaces, use this systematic approach to ensure quality and adherence to best practices.
Follow these five steps for thorough plugin review:
Step 1: Initial Inspection
.claude-plugin/plugin.jsonStep 2: Component Verification
Step 3: Local Testing
/plugin install /path/to/plugin/plugin shows pluginclaude --debugStep 4: Quality Assessment
Step 5: Final Validation
For a comprehensive checklist covering all aspects of plugin review, see reference/review-checklist.md. Key areas to review:
The detailed checklist in reference/review-checklist.md provides specific items to verify for each category, common issues to flag (critical, important, minor), and decision criteria for determining if a plugin is ready to share.
claude --debug reveals loading issues# Install locally
/plugin install /path/to/my-plugin
# Check installation
/plugin
# Verify components loaded
/help # Check for new commands
claude --debug # See plugin loading details
# Update plugin after making changes
/plugin # Select plugin to update (easiest)
# OR manually uninstall/reinstall:
/plugin uninstall my-plugin@local
/plugin install /path/to/my-plugin
Validation steps:
/plugin listclaude --debug output/help (if plugin has commands).claude-plugin/plugin.jsonUse claude --debug to see detailed plugin loading information.
/plugin marketplace add <url>/plugin install my-plugin@marketplace-nameUsers can install directly without a marketplace:
/plugin install /path/to/plugin
# or
/plugin install https://github.com/user/repo
Each plugin should have one clear purpose. Don't create catch-all plugins.
Use descriptive kebab-case names that indicate purpose:
git-workflow, data-analyzer, react-toolkithelpers, utils, miscOnly include what you need. Start with name and version, add components as needed.
All paths must be relative to plugin root and start with ./
Version strictly: breaking changes = MAJOR, features = MINOR, fixes = PATCH
reference/plugin-structure.md: Complete structure details and patternsreference/best-practices.md: Comprehensive development guidetemplates/plugin.json: Starting template for plugin manifesttemplates/README.md: Starting template for plugin documentationCreating a plugin? Ask:
./ from plugin rootRemember: Plugins package related functionality for easy sharing. Start simple, test thoroughly, and iterate based on real usage.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.