This skill should be used when creating plugins, publishing to marketplaces, or when "plugin.json", "marketplace", "create plugin", or "distribute plugin" are mentioned.
Develops Claude plugins from initialization through marketplace distribution and validation.
/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.
references/distribution.mdreferences/marketplace.mdreferences/structure.mdscripts/create-marketplace.shscripts/scaffold-plugin.shComplete lifecycle for developing, validating, and distributing Claude Code plugins.
# 1. Scaffold plugin
./scripts/scaffold-plugin.sh my-plugin --with-commands
# 2. Add components (commands, agents, hooks, skills)
# 3. Test locally
/plugin marketplace add ./my-plugin
/plugin install my-plugin@my-plugin
# 4. Distribute
git push origin main --tags
Discovery -> Init -> Components -> Validate -> Distribute -> Marketplace
| | | | | |
v v v v v v
Purpose Scaffold Commands Structure Package Catalog
Scope plugin.json Agents Testing Version Publish
Type README Hooks Quality Release Share
Before creating a plugin, clarify:
| Question | Impact |
|---|---|
| What problem does this solve? | Plugin scope and features |
| Who will use it? | Distribution method |
| What components are needed? | Commands, agents, hooks, MCP servers |
| Where will it live? | Personal, project, or marketplace |
my-plugin/
├── plugin.json # Required: metadata
├── README.md # Required for distribution
└── commands/ # Optional components
{
"name": "my-plugin",
"version": "1.0.0",
"description": "Brief description of what this plugin does",
"author": {
"name": "Your Name",
"email": "you@example.com"
},
"license": "MIT"
}
./scripts/scaffold-plugin.sh my-plugin \
--author "Your Name" \
--with-commands \
--with-agent \
--with-hooks
See references/structure.md for complete plugin structure and plugin.json schema.
Add components based on plugin needs. For detailed component authoring, load the appropriate skill:
Create custom commands in commands/ directory.
Example: commands/review.md
---
description: "Review code for quality issues"
---
Review the following code: {{0}}
Check for:
- Code style and formatting
- Potential bugs
- Performance issues
- Security concerns
For complex commands, load the claude-command-authoring skill.
Define specialized agents in agents/ directory.
Example: agents/security-reviewer.md
---
name: security-reviewer
description: "Security-focused code reviewer"
---
You are a security expert. When reviewing code:
1. Check for vulnerabilities
2. Verify input validation
3. Review authentication flows
4. Report issues with severity levels
For agent design patterns, load the claude-agent-development skill.
React to Claude Code events via plugin.json:
{
"hooks": {
"PreToolUse": [
{
"matcher": "Write|Edit",
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/validate.sh"
}
]
}
]
}
}
Hook types: PreToolUse, PostToolUse, PrePromptSubmit, PostPromptSubmit
For hook implementation, load the claude-hook-authoring skill.
Add reusable methodology patterns in skills/ directory.
For skill authoring, load the skills-development skill.
Integrate MCP servers for external capabilities:
{
"mcpServers": {
"my-server": {
"command": "${CLAUDE_PLUGIN_ROOT}/servers/my-server",
"args": ["--config", "${CLAUDE_PLUGIN_ROOT}/config.json"],
"env": {
"API_KEY": "${MY_API_KEY}"
}
}
}
}
Path variables:
${CLAUDE_PLUGIN_ROOT} - Plugin installation directory${MY_API_KEY} - Environment variable expansionBefore distribution, validate the plugin:
Structure:
Commands:
Agents:
Hooks:
chmod +x)Documentation:
# Validate JSON
jq empty plugin.json
# Check command frontmatter
for f in commands/**/*.md; do
head -n 5 "$f" | grep -q '^---$' || echo "Missing: $f"
done
# Verify scripts executable
for f in hooks/**/*.sh; do
test -x "$f" || echo "Not executable: $f"
done
# Add as local marketplace
/plugin marketplace add ./my-plugin
# Install and test
/plugin install my-plugin@my-plugin
# Test commands
/my-command arg1 arg2
Follow semver (MAJOR.MINOR.PATCH):
# 1. Update version in plugin.json
# 2. Update CHANGELOG.md
# 3. Commit
git add plugin.json CHANGELOG.md
git commit -m "chore: release v1.0.0"
# 4. Tag
git tag v1.0.0
# 5. Push
git push origin main --tags
# 6. Create GitHub release
gh release create v1.0.0 \
--title "v1.0.0" \
--notes "Initial release"
| Method | Best For | Setup |
|---|---|---|
| GitHub repo | Public/team plugins | Push to GitHub |
| Git URL | GitLab, Bitbucket | Full URL in source |
| Local path | Development/testing | Relative path |
| ZIP package | Offline distribution | Create archive |
See references/distribution.md for packaging, CI/CD, and release automation.
A catalog of plugins defined in .claude-plugin/marketplace.json that enables discovery, installation, and version management.
mkdir -p .claude-plugin
.claude-plugin/marketplace.json:
{
"name": "my-marketplace",
"owner": {
"name": "Team Name",
"email": "team@example.com"
},
"plugins": [
{
"name": "my-plugin",
"source": "./plugins/my-plugin",
"description": "Plugin description",
"version": "1.0.0"
}
]
}
Relative path:
{"source": "./plugins/my-plugin"}
GitHub:
{
"source": {
"source": "github",
"repo": "owner/plugin-repo",
"ref": "v1.0.0"
}
}
Git URL:
{
"source": {
"source": "url",
"url": "https://gitlab.com/team/plugin.git"
}
}
Configure automatic marketplace installation in .claude/settings.json:
{
"extraKnownMarketplaces": {
"team-tools": {
"source": {
"source": "github",
"repo": "company/claude-plugins"
}
}
}
}
# Add marketplace
/plugin marketplace add owner/repo
/plugin marketplace add ./local-path
# List available
/plugin marketplace list
# Install from marketplace
/plugin install plugin-name@marketplace-name
# Update
/plugin marketplace update marketplace-name
See references/marketplace.md for full schema, team setup, and hosting strategies.
dev-tools)review-pr)security-reviewer)validate.sh)Plugin not loading:
jq empty plugin.jsonCommands not appearing:
commands/ directoryHooks not executing:
chmod +xMCP servers failing:
~/Library/Logs/Claude/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.