Creates complete Claude Code plugins with proper structure, configuration, and best practices. Handles plugin.json metadata, slash commands, agent configurations, event hooks, and MCP server integration. Use when building Claude Code plugins, extending Claude Code capabilities, creating custom commands or agents for Claude Code, or setting up plugin project structure.
/plugin marketplace add outfitter-dev/agents/plugin install agent-kit@outfitterThis skill inherits all available tools. When active, it can use any tool Claude has access to.
EXAMPLES.mdREFERENCE.mdscripts/scaffold-plugin.shCreates production-ready Claude Code plugins with proper directory structure, configuration files, and all necessary components.
A Claude Code plugin requires this minimal structure:
my-plugin/
├── plugin.json # Required: Plugin metadata
├── .claude-plugin/ # Optional: Marketplace config
│ └── marketplace.json
├── commands/ # Optional: Slash commands
│ └── my-command.md
├── agents/ # Optional: Custom agents
│ └── my-agent.md
└── hooks/ # Optional: Event hooks
└── pre-tool-use.sh
Step 1: Create plugin directory
mkdir my-plugin && cd my-plugin
Step 2: Create plugin.json
{
"name": "my-plugin",
"version": "1.0.0",
"description": "Brief description of what this plugin does",
"author": {
"name": "Your Name",
"email": "your.email@example.com"
},
"license": "MIT"
}
Step 3: Add components (all optional):
commands/agents/hooks/Step 4: Test locally
/plugin marketplace add ./path/to/my-plugin
/plugin install my-plugin@my-plugin
The metadata file that defines your plugin:
Required fields:
name: Plugin identifier (kebab-case)version: Semantic version (e.g., "1.0.0")description: Brief plugin descriptionRecommended fields:
author: Creator informationlicense: SPDX identifier (e.g., "MIT")homepage: Documentation URLrepository: Source code URLExample:
{
"name": "dev-tools",
"version": "1.0.0",
"description": "Development workflow automation tools",
"author": {
"name": "DevTools Team",
"email": "dev@example.com"
},
"license": "MIT",
"homepage": "https://github.com/example/dev-tools",
"repository": "https://github.com/example/dev-tools",
"keywords": ["development", "automation", "workflow"]
}
Create custom commands in commands/ directory. Each command is a markdown file.
File: commands/review-pr.md
---
description: "Review a pull request with comprehensive analysis"
---
Review the pull request: {{0}}
Analyze:
- Code quality and style
- Potential bugs or issues
- Performance considerations
- Security concerns
Provide specific, actionable feedback.
Usage:
/review-pr 123
Define specialized agents in agents/ directory.
File: agents/security-reviewer.md
---
name: security-reviewer
description: "Specialized agent for security code reviews"
---
You are a security-focused code reviewer. When reviewing code:
1. Identify potential security vulnerabilities
2. Check for common security anti-patterns
3. Verify input validation and sanitization
4. Review authentication and authorization
5. Check for hardcoded secrets
Provide specific recommendations with code examples.
React to Claude Code events. Configure in plugin.json:
{
"hooks": {
"PreToolUse": [
{
"matcher": "Write|Edit",
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/validate-changes.sh"
}
]
}
],
"PostToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/log-command.sh"
}
]
}
]
}
}
Available hook types:
PreToolUse: Before tool executionPostToolUse: After tool executionPrePromptSubmit: Before user prompt processingPostPromptSubmit: After prompt processingIntegrate MCP servers directly in plugin.json:
{
"mcpServers": {
"my-server": {
"command": "${CLAUDE_PLUGIN_ROOT}/servers/my-server",
"args": ["--config", "${CLAUDE_PLUGIN_ROOT}/config.json"],
"env": {
"API_KEY": "${MY_API_KEY}"
}
}
}
}
Note: ${CLAUDE_PLUGIN_ROOT} automatically resolves to plugin installation directory.
Initialize plugin structure
mkdir my-plugin
cd my-plugin
Create plugin.json
Add components
Test locally
/plugin marketplace add .
/plugin install my-plugin@my-plugin
Iterate and refine
Prepare for distribution
dev-tools)review-pr)security-reviewer)validate-changes.sh)my-plugin/
├── plugin.json
├── README.md
├── CHANGELOG.md
├── LICENSE
├── commands/
│ ├── core/ # Core commands
│ └── advanced/ # Advanced features
├── agents/
│ └── specialized/ # Domain-specific agents
├── hooks/
│ ├── pre-tool/
│ └── post-tool/
└── servers/ # MCP server binaries
---
description: "Deploy application to environment"
---
Deploy the application to {{0:environment}} environment.
Steps:
1. Validate environment configuration
2. Run pre-deployment checks
3. Deploy application
4. Run post-deployment verification
5. Update deployment logs
---
name: read-only-analyzer
description: "Analyzes code without making changes"
allowed-tools: Read, Grep, Glob
---
You are a code analyzer that never modifies files. Analyze the codebase and provide insights.
{
"hooks": {
"PreToolUse": [
{
"matcher": "Write.*\\.ts$",
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/typescript-check.sh"
}
]
}
]
}
}
Plugin not loading:
Commands not appearing:
commands/ directoryHooks not executing:
${CLAUDE_PLUGIN_ROOT}MCP servers failing:
~/Library/Logs/Claude/scripts/ for plugin scaffolding and validationThis 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.