Complete Claude Code plugin development system. PROACTIVELY activate when users want to: (1) Create/build/make plugins, (2) Add/create skills/commands/agents, (3) Package existing code as plugins, (4) Publish to marketplace, (5) Validate plugin structure, (6) Get plugin development guidance, (7) Export skills for claude.ai web app. Autonomously creates complete, production-ready plugins with: plugin.json manifest, slash commands, specialized agents, agent skills, hooks, MCP server integration, and comprehensive README. ALWAYS fetches latest official documentation to ensure correct structure. Includes plugin-architect agent for design review and optimization.
This skill inherits all available tools. When active, it can use any tool Claude has access to.
MANDATORY: Always Use Backslashes on Windows for File Paths
When using Edit or Write tools on Windows, you MUST use backslashes (\) in file paths, NOT forward slashes (/).
Examples:
D:/repos/project/file.tsxD:\repos\project\file.tsxThis applies to:
Plugin Creation Exception: This plugin's purpose IS to create documentation files.
When creating plugins (the core purpose of this plugin):
For other scenarios:
This skill provides comprehensive, step-by-step guidance for creating Claude Code plugins, from your very first plugin to publishing it for the world to use. No prior plugin experience required!
Complete Beginners ā Start with What is Claude Code? First Plugin ā Jump to Your First Plugin in 10 Minutes Create Plugin Now ā See Creating Plugin Output Ready to Publish ā Go to Publishing Your Plugin Looking for Advanced ā See Advanced Plugin Development
IMPORTANT: When users ask to create a plugin, don't just teach them - actually create the files for them!
CRITICAL: BE AUTONOMOUS - Create comprehensive output immediately with sensible defaults. Don't ask questions unless the request is genuinely ambiguous.
BEFORE creating any plugin, fetch the latest documentation from docs.claude.com:
WebFetch: https://docs.claude.com/en/docs/claude-code/plugins-reference
WebFetch: https://docs.claude.com/en/docs/claude-code/plugin-marketplaces
Official docs are the source of truth. Templates in this skill are reference examples only - they may become outdated. Always verify structure against fetched documentation.
Workflow:
Agent-First, Minimal Commands:
Users want domain experts, not command menus. The 2025 plugin design prioritizes conversational interaction with expert agents over memorizing slash commands.
Core Principles:
Good Plugin Structure:
ā
dotnet-microservices-master:
- 1 agent: dotnet-microservices-expert (predictable name)
- 0 commands (all interaction conversational)
ā
docker-master:
- 1 agent: docker-expert (follows {domain}-expert pattern)
- 0 commands (expert handles everything)
ā OLD: 10+ commands + multiple agents
- Overwhelming menu of commands
- Unpredictable agent names
- Breaks conversational flow
Agent Naming Standard (CRITICAL):
{domain}-expertterraform-master ā terraform-experttest-master ā test-expertazure-master ā azure-expertWhen to Create Commands:
/terraform:init-workspace - sets up complete environment)/docker:cleanup-all - removes unused resources)/git:safe-rebase - interactive with guardrails)Default: When creating plugins, create 1 expert agent + 0 commands unless automation workflows are explicitly needed.
Convention over configuration: Commands, agents, and Agent Skills are auto-discovered from their respective directories. Custom paths optional via plugin.json. See advanced-features-2025 skill for complete details.
.claude-plugin/marketplace.json exists in the repo root.User says: "Create a plugin for Git workflows" Claude does: Immediately creates git-workflow-master with:
["git", "workflow", "pullrequest", "commit", "branch", "review", "automation"]User says: "Make a deployment plugin" Claude does: Creates deployment-master with:
["deployment", "deploy", "release", "rollback", "production", "staging", "automation"]User says: "Build a .NET microservices expert" Claude does: Creates dotnet-microservices-master with:
[".net", "microservices", "docker", "containers", "kubernetes", "ddd", "cqrs", "architecture"]When to ask: "Create a plugin" (no context) ā Ask what it should do
This skill enables Claude to:
Create actual plugin files when users say things like:
BE AUTONOMOUS BY DEFAULT - Don't ask questions unless the request is truly ambiguous. Infer intent and create comprehensive output with sensible defaults.
Step 0: šØ CRITICAL - Detect Repository Context FIRST
BEFORE doing anything else, detect the repository context to use correct values:
# 1. Check if in a marketplace repo
if [[ -f .claude-plugin/marketplace.json ]]; then
echo "ā
IN MARKETPLACE REPO - Must update marketplace.json after creating plugin"
IN_MARKETPLACE=true
else
echo "ā¹ļø Not in marketplace repo - Will create standalone marketplace structure"
IN_MARKETPLACE=false
fi
# 2. Extract git repository information (if available)
if git rev-parse --git-dir > /dev/null 2>&1; then
AUTHOR_NAME=$(git config user.name || echo "Unknown Author")
AUTHOR_EMAIL=$(git config user.email || echo "")
REPO_URL=$(git config --get remote.origin.url || echo "")
echo "ā
Git repo detected - Author: $AUTHOR_NAME"
else
AUTHOR_NAME="Unknown Author"
AUTHOR_EMAIL=""
REPO_URL=""
echo "ā¹ļø Not in a git repo - will use placeholder values"
fi
# 3. Extract owner/repo from marketplace.json (if exists)
if [[ -f .claude-plugin/marketplace.json ]]; then
MARKETPLACE_OWNER=$(cat .claude-plugin/marketplace.json | jq -r '.owner.name' || echo "$AUTHOR_NAME")
echo "ā
Marketplace owner: $MARKETPLACE_OWNER"
fi
Use these detected values for:
author.name in plugin.json ā Use $AUTHOR_NAME from git configauthor.email in plugin.json ā Use $AUTHOR_EMAIL from git configauthor.name in marketplace.json entry ā Use $MARKETPLACE_OWNER or $AUTHOR_NAME$REPO_URL if availableIf marketplace.json exists:
Step 1: Fetch Latest Documentation & Infer Requirements
First, ALWAYS fetch the latest plugin documentation:
web_fetch: https://docs.claude.com/en/docs/claude-code/plugins-reference
web_fetch: https://docs.claude.com/en/docs/claude-code/plugin-marketplaces
Then, from the user's request, automatically determine:
Only ask questions if:
Default approach: Create comprehensive plugin with all relevant components
Step 2: Create Directory Structure in Correct Location
šØ CRITICAL: Detect marketplace repo and create plugin in correct location!
Based on the marketplace detection from Step 0, create the plugin in the appropriate location:
# If in marketplace repo (marketplace.json exists), create in plugins/ subdirectory
if [[ -f .claude-plugin/marketplace.json ]]; then
echo "ā
Marketplace repo detected - creating plugin in plugins/ directory"
PLUGIN_DIR="plugins/PLUGIN_NAME"
else
echo "ā¹ļø Not in marketplace repo - creating plugin in current directory"
PLUGIN_DIR="PLUGIN_NAME"
fi
# Create the plugin directory structure
mkdir -p $PLUGIN_DIR/.claude-plugin
mkdir -p $PLUGIN_DIR/commands
mkdir -p $PLUGIN_DIR/agents
mkdir -p $PLUGIN_DIR/skills
mkdir -p $PLUGIN_DIR/hooks
mkdir -p $PLUGIN_DIR/scripts
IMPORTANT: Always use $PLUGIN_DIR as the base path for all subsequent file operations to ensure files are created in the correct location.
Step 3: Create All Necessary Files
Based on what you learned from the fetched documentation, use file_create to generate:
.claude-plugin/plugin.json (manifest) structured according to the official docs
commands/agents/skills/README.md (documentation)Key principle: Use the structure you learned from the fetched documentation, not assumptions from templates.
Step 4: Create GitHub-Ready Marketplace Structure AND Update Existing Marketplace
CRITICAL: Always update the existing marketplace.json if working in a marketplace repository!
First, check if you're in a marketplace repo:
# Check if marketplace.json exists in the repo root
if [[ -f .claude-plugin/marketplace.json ]]; then
echo "In marketplace repo - will update marketplace.json"
fi
If in a marketplace repository:
.claude-plugin/marketplace.json to add the new plugin entryā ļø CRITICAL: Synchronize Keywords and Descriptions
marketplace.json and plugin.json have SEPARATE keywords and descriptions - they don't automatically inherit from each other:
Best practice: Explicitly copy the comprehensive description and keywords from plugin.json into the marketplace.json entry.
Why this matters:
Example of updating marketplace.json with synchronized metadata:
{
"plugins": [
// ... existing plugins ...
{
"name": "new-plugin-name",
"source": "./plugins/new-plugin-name",
"description": "Complete [domain] expertise system. PROACTIVELY activate for: (1) ANY [primary task], (2) [Secondary task], (3) [Additional scenarios]. Provides: [key features, capabilities]. Ensures [value proposition].",
"version": "1.0.0",
"author": {
"name": "Author Name"
},
"keywords": [
"domain",
"primary",
"secondary",
"technical",
"terms",
"naturally",
"use"
]
}
]
}
Synchronization Checklist:
Also create a standalone marketplace-ready version:
# Create marketplace structure in working directory
mkdir -p PLUGIN_NAME-marketplace/.claude-plugin
mkdir -p PLUGIN_NAME-marketplace/plugins
cp -r PLUGIN_NAME PLUGIN_NAME-marketplace/plugins/
Copy plugin into marketplace structure and create standalone marketplace.json.
Step 5: Provide Installation Instructions Guide the user on how to use the plugin:
Step 6: šØ FINAL VERIFICATION - JSON Schema & Marketplace Check
Before finalizing, verify JSON schema correctness and marketplace registration:
Repository Context Validation (Run Step 0 checks first!):
$AUTHOR_NAME and $AUTHOR_EMAIL?.claude-plugin/marketplace.json existence?$MARKETPLACE_OWNER from marketplace.json if it exists?plugins/PLUGIN_NAME/ if marketplace.json exists?JSON Schema Validation (CRITICAL - Most common failure point!):
author is an object { "name": "..." } (NOT a string!)author.name uses $AUTHOR_NAME from git config (NOT "Author Name" placeholder!)author.email uses $AUTHOR_EMAIL from git config (if available)$MARKETPLACE_OWNER for consistency (NOT different name!)version is a string like "1.0.0" (NOT a number!)keywords is an array ["word1", "word2"] (NOT a comma-separated string!)cat plugin.json | jq .)homepage or repository (these cause issues - remove them)Marketplace Registration Checklist:
./plugins/PLUGIN_NAME (NOT ./PLUGIN_NAME)?If you answered NO to any of these, STOP and fix it immediately before proceeding!
After creating the plugin files, provide this format:
# ā
Plugin Created: [Plugin Name]
## š What's Included
- **Commands:** [list commands]
- **Agents:** [list agents]
- **Skills:** [list skills]
## š Installation Instructions
### Option 1: GitHub Marketplace (Recommended)
**Why GitHub?**
- Works reliably across all platforms (Windows/Mac/Linux)
- Easy updates and version control
- Shareable with your team
- Professional distribution
**Steps:**
1. **Create a new GitHub repository:**
- Go to github.com
- Click "New repository"
- Name it something like "claude-plugins" or "my-claude-marketplace"
- Make it **public**
- Don't initialize with README
2. **Upload your plugin:**
- The marketplace structure has been created in `PLUGIN_NAME-marketplace/`
- Upload all files from this directory to your GitHub repository
- Commit with message "Add PLUGIN_NAME plugin"
3. **Add the marketplace in Claude Code:**
```bash
/plugin marketplace add YOUR_USERNAME/YOUR_REPO
/plugin install PLUGIN_NAME@YOUR_USERNAME
ā ļø Windows users: Local path resolution may have issues. GitHub installation is recommended.
For local development/testing:
# Copy plugin to Claude Code plugins directory
cp -r PLUGIN_NAME ~/.local/share/claude/plugins/
# Or create a symlink for active development
ln -s /path/to/PLUGIN_NAME ~/.local/share/claude/plugins/PLUGIN_NAME
Then verify with /help to see your new commands.
If the user wants to use the plugin's skills in the claude.ai web application:
Skills can be exported as ZIP files for upload to claude.ai:
# Navigate to the skill directory
cd PLUGIN_NAME/skills/SKILL_NAME
# Create a ZIP file (skill folder must be the root of the ZIP)
zip -r SKILL_NAME.zip .
# Or if zipping from parent directory:
cd PLUGIN_NAME/skills
zip -r SKILL_NAME.zip SKILL_NAME/
To upload to claude.ai:
SKILL_NAME.zip fileImportant notes about skill exports:
skills/ directory contents can be used in claude.ai web/help to see commands/agents to see available agents
### Output Templates
**ā ļø IMPORTANT:** These templates are REFERENCE EXAMPLES ONLY. Always verify against the official documentation you fetched. Requirements may have changed since these examples were written.
**Use these templates as:**
- Starting points for structure
- Examples of what fields typically exist
- Reference for markdown format
**DO NOT use these templates as:**
- The definitive structure (use fetched docs for that)
- A substitute for reading the official documentation
- Assumed to be current (always verify)
#### How to Write Effective plugin.json Descriptions and Keywords
**CRITICAL:** The quality of your description and keywords determines when Claude will activate your plugin. Follow these principles:
##### Description Best Practices
**Structure:** Use this formula for maximum activation:
[Type of system]. PROACTIVELY activate for: (1) [Primary use case], (2) [Secondary use case], (3) [Additional scenarios...]. Provides: [key features/capabilities]. [Value proposition/benefits].
**Guidelines:**
1. **Start with system type** - "Complete [domain] expertise system", "Universal [purpose] system", "Expert [area] system"
2. **Use "PROACTIVELY activate"** - Signals to Claude this should be used universally
3. **Numbered list of use cases** - Include 5-8 specific activation scenarios
4. **Use "ANY" for broad activation** - "ANY Docker task", "ANY bash script", etc.
5. **Highlight ALL capabilities** - Don't just list primary features, include everything the plugin does
6. **Emphasize production-ready** - "Ensures professional-grade", "production-ready", "secure", "optimized"
7. **Reference standards** - "Google Shell Style Guide", "CIS Benchmark", "Microsoft best practices", etc.
**Examples of Good Descriptions:**
"Complete Docker expertise system across ALL platforms (Windows/Linux/macOS). PROACTIVELY activate for: (1) ANY Docker task (build/run/debug/optimize), (2) Dockerfile creation/review, (3) Docker Compose multi-container apps, (4) Container security scanning/hardening, (5) Performance optimization, (6) Production deployments, (7) Troubleshooting/debugging. Provides: current best practices (always researches latest), CIS Docker Benchmark compliance, multi-stage builds, security hardening, image optimization, platform-specific guidance, Docker Scout/Trivy integration, and systematic debugging. Ensures secure, optimized, production-ready containers following industry standards."
"Universal context management and planning system. PROACTIVELY activate for: (1) ANY complex task requiring planning, (2) Multi-file projects/websites/apps, (3) Architecture decisions, (4) Research tasks, (5) Refactoring, (6) Long coding sessions, (7) Tasks with 3+ sequential steps. Provides: optimal file creation order, context-efficient workflows, extended thinking delegation (23x context efficiency), passive deep analysis architecture, progressive task decomposition, and prevents redundant work. Saves 62% context on average. Essential for maintaining session performance and analytical depth."
##### Keyword Best Practices
**Guidelines:**
1. **Simple words only** - No hyphens unless it's a product name (e.g., "docker-compose")
2. **No overly generic terms** - Avoid "automation", "build", "make", "new", "create" alone
3. **Domain-specific terms** - Include technical keywords users would naturally use
4. **Compound words without spaces** - "fullstack", "crossplatform", "cicd", "devops"
5. **6-10 keywords total** - Enough for discovery, not so many it dilutes focus
6. **Avoid false positives** - Don't use keywords that could match unrelated tasks
**Good keyword examples:**
```json
// Context management plugin
"keywords": ["planning", "context", "strategy", "workflow", "thinking", "decision", "research", "refactoring", "optimization", "session"]
// Docker plugin
"keywords": ["docker", "container", "dockerfile", "compose", "containerize", "production", "security", "optimize", "debug", "deploy"]
// Bash scripting plugin
"keywords": ["bash", "shell", "script", "automation", "devops", "shellcheck", "posix", "crossplatform", "cicd", "deployment"]
Bad keyword examples:
// Too generic - would activate for non-plugin tasks
"keywords": ["build", "create", "make", "new", "automation", "tool"]
// Too many hyphens - users don't type these
"keywords": ["bash-scripting", "shell-script", "docker-container", "multi-file"]
// Too narrow - misses common use cases
"keywords": ["website", "webapp", "multifile"]
Agent frontmatter description:
---
agent: true
description: "Complete [domain] expertise system. PROACTIVELY activate for: (1) [use cases]. Provides: [capabilities]. Ensures [value proposition]."
---
Skill frontmatter description:
---
name: skill-name
description: "Complete [domain] system. PROACTIVELY activate for: (1) [use cases]. Provides: [capabilities]. Ensures [value proposition]."
---
Apply the same principles:
šØ CRITICAL JSON SCHEMA REQUIREMENTS:
Common validation errors to avoid:
author MUST be an object - Never a string
"author": { "name": "Author Name" }"author": "Author Name"version MUST be a string - Semantic versioning format
"version": "1.0.0""version": 1.0keywords MUST be an array of strings
"keywords": ["terraform", "aws"]"keywords": "terraform, aws"2025 Recommended Fields:
{
"name": "plugin-name",
"version": "1.0.0",
"description": "Complete [domain] expertise system. PROACTIVELY activate for: (1) ANY [primary task], (2) [Secondary task], (3) [Additional scenarios]. Provides: [key features, capabilities, standards compliance]. Ensures [value proposition].",
"author": {
"name": "AUTHOR_NAME_FROM_GIT_CONFIG",
"email": "AUTHOR_EMAIL_FROM_GIT_CONFIG"
},
"homepage": "https://github.com/user/repo/tree/main/plugins/plugin-name",
"repository": "https://github.com/user/repo",
"license": "MIT",
"keywords": ["domain", "primary", "secondary", "technical", "terms", "users", "naturally", "use"]
}
šØ CRITICAL: Use detected values from Step 0!
$AUTHOR_NAME from git config for author.name$AUTHOR_EMAIL from git config for author.email$MARKETPLACE_OWNER for marketplace.json entries (consistency with existing plugins)VALIDATION CHECKLIST - Run BEFORE completing plugin creation:
author is an object with name field (not a string!)author.name uses value from git config (not a placeholder!)author.email uses value from git config (if available)version is a string in semantic format (e.g., "1.0.0")keywords is an array of strings (not a comma-separated string!)cat plugin.json | jq . to verify valid JSONNote: Components (commands, agents, skills) are discovered automatically from their respective directories - no registration needed in plugin.json.
Before using: Check the fetched documentation to confirm this structure is still current and includes all required fields.
---
description: Brief description of what this command does
---
# Command Name
## Purpose
Explain what this command accomplishes and when to use it.
## Instructions
1. Step-by-step instructions for Claude
2. Be specific and clear
3. Include examples
## Examples
Show how to use this command.
# Plugin Name
Brief description of what this plugin does.
## Installation
### Via Marketplace (Recommended)
\`\`\`bash
/plugin marketplace add your-username/repo-name
/plugin install plugin-name@your-username
\`\`\`
### Local Installation (Mac/Linux)
ā ļø **Windows users:** Use marketplace installation method instead.
\`\`\`bash
# Extract ZIP to plugins directory
unzip plugin-name.zip -d ~/.local/share/claude/plugins/
\`\`\`
## Features
- Feature 1
- Feature 2
- Feature 3
## Usage
Examples of how to use the plugin.
## Platform Notes
- **macOS/Linux:** All installation methods supported
- **Windows:** GitHub marketplace installation recommended (local paths may have issues)
## License
MIT
{
"name": "your-username",
"description": "My Claude Code plugins",
"owner": {
"name": "Your Name",
"email": "[email protected]"
},
"plugins": [
{
"name": "plugin-name",
"source": "./plugins/plugin-name",
"description": "Complete [domain] expertise system. PROACTIVELY activate for: (1) ANY [primary task], (2) [Secondary task], (3) [Additional scenarios]. Provides: [key features, capabilities]. Ensures [value proposition].",
"version": "1.0.0",
"author": {
"name": "Author Name"
},
"keywords": ["domain", "primary", "secondary", "technical", "terms", "naturally", "use"]
}
]
}
ā ļø CRITICAL REMINDER: marketplace.json keywords and descriptions are SEPARATE from plugin.json - they don't automatically sync. Always copy the comprehensive description and keywords from plugin.json to marketplace.json entries for optimal marketplace discovery.
Before using: Verify this structure against the fetched marketplace documentation. Check for any additional required fields or changed formats.
User: "Create a plugin that helps with deployment"
Claude should:
web_fetch: https://docs.claude.com/en/docs/claude-code/plugins-reference
web_fetch: https://docs.claude.com/en/docs/claude-code/plugin-marketplaces
Infer and create autonomously:
Create the structure in working directory:
# Create plugin structure
mkdir -p deployment-helper/.claude-plugin
mkdir -p deployment-helper/commands
mkdir -p deployment-helper/agents
Generate files based on fetched documentation:
plugin.json structured according to what you learned from the docs{
"name": "deployment-helper",
"version": "1.0.0",
"description": "Streamline deployment workflows with automated commands",
"author": {
"name": "Your Name",
"email": "[email protected]"
},
"keywords": ["deployment", "devops", "automation"],
"license": "MIT"
}
commands/deploy-staging.md with deployment instructionscommands/deploy-production.md with production deploymentcommands/rollback.md with rollback proceduresagents/deployment-troubleshooter.md with troubleshooting agentREADME.md with platform notesCreate marketplace structure:
mkdir -p deployment-helper-marketplace/.claude-plugin
mkdir -p deployment-helper-marketplace/plugins
cp -r deployment-helper deployment-helper-marketplace/plugins/
{
"name": "your-username",
"description": "Deployment assistance plugins",
"owner": {
"name": "Your Name",
"email": "[email protected]"
},
"plugins": [
{
"name": "deployment-helper",
"source": "./plugins/deployment-helper",
"description": "Streamline deployment workflows",
"version": "1.0.0",
"keywords": ["deployment", "devops", "automation"]
}
]
}
# Create both ZIPs
zip -r deployment-helper.zip deployment-helper/
zip -r deployment-helper-marketplace.zip deployment-helper-marketplace/
# Move to outputs
mv deployment-helper.zip /mnt/user-data/outputs/
mv deployment-helper-marketplace.zip /mnt/user-data/outputs/
# ā
Plugin Created: Deployment Helper
## š¦ Download Your Plugin
### For GitHub Publishing (Recommended)
[Download deployment-helper-marketplace.zip](computer:///mnt/user-data/outputs/deployment-helper-marketplace.zip)
**Why GitHub first?**
- Works reliably on Windows, Mac, and Linux
- Easy sharing with your team
- Simple updates and version control
**Quick Start:**
1. Download the marketplace ZIP above
2. Extract and upload to a new GitHub repository
3. Make the repo public
4. Run: `/plugin marketplace add YOUR_USERNAME/YOUR_REPO`
5. Install: `/plugin install deployment-helper@YOUR_USERNAME`
### For Local Testing (Mac/Linux)
[Download deployment-helper.zip](computer:///mnt/user-data/outputs/deployment-helper.zip)
ā ļø **Windows users:** Local paths may not work. Use GitHub method instead.
## š What's Included
- **Commands:**
- `/deploy-staging` - Deploy to staging environment
- `/deploy-production` - Deploy to production with safety checks
- `/rollback` - Quick rollback to previous version
- **Agents:**
- Deployment Troubleshooter - Diagnoses and fixes deployment issues
## š Next Steps
1. Download the marketplace ZIP
2. Upload to GitHub
3. Add marketplace and install
4. Try `/deploy-staging` to test!
DO:
author is an object, NOT a string (most common validation error!)version is a string "1.0.0", NOT a number (required format!)keywords is an array, NOT a comma-separated string (required format!)DON'T:
./plugins/PLUGIN_NAME NOT ./PLUGIN_NAME!)"author": "Name" as a string (MUST be an object: { "name": "Name" })"version": 1.0 as a number (MUST be a string: "1.0.0")"keywords": "word1, word2" as a string (MUST be an array: ["word1", "word2"])Windows Users:
Git Bash/MinGW Users (Windows):
echo $MSYSTEM (MINGW64/MINGW32 indicates Git Bash)cygpath for path conversion if needed: cygpath -w "/c/path" ā C:\path$MSYSTEM environment variable (MINGW64, MINGW32, MSYS)Mac/Linux Users:
When creating marketplace ZIP, ensure it contains this structure:
plugin-name-marketplace/
āāā .claude-plugin/
ā āāā marketplace.json # Marketplace manifest
āāā plugins/
ā āāā plugin-name/ # The actual plugin
ā āāā .claude-plugin/
ā ā āāā plugin.json
ā āāā commands/
ā āāā agents/
ā āāā README.md
āāā README.md # Marketplace README
Users can extract this ZIP and upload directly to GitHub!
Think of it like having an AI pair programmer in your terminal who can:
Plugins extend Claude Code by adding new commands, agents, and capabilities. If you're new to coding or command-line tools, don't worry - this guide starts from the very beginning. </introduction>
Plugins let you:
You don't need to be a programmer to create useful plugins!
<first_plugin_tutorial> Let's create a simple plugin that helps with git commits. No prior plugin experience needed!
A plugin with a single command: /commit-smart that helps write better commit messages.
Just say:
"Create a plugin that helps me write better git commit messages"
Claude will:
In Claude Code:
/plugin marketplace add YOUR_USERNAME/YOUR_REPO
/plugin install commit-helper@YOUR_USERNAME
/commit-smart
Claude will now help you write a great commit message!
You created, published, and installed your first plugin! Here's what you made:
/commit-smart that Claude can useThat's it! You're now a plugin creator. Everything else in this guide builds on these basics. </first_plugin_tutorial>
Only .claude-plugin/plugin.json is required. Optional components: commands/, agents/, skills/, hooks/, MCP servers.
Commands: Custom slash commands in commands/*.md
Agents: Specialized subagents in agents/*.md with frontmatter
Agent Skills: Dynamic knowledge using progressive disclosure (three-tier: frontmatter ā SKILL.md body ā linked files). Claude autonomously loads only relevant content when needed.
Hooks: Automated workflows with nine event types (PreToolUse, PostToolUse, SessionStart, SessionEnd, PreCompact, UserPromptSubmit, Notification, Stop, SubagentStop)
MCP Servers: External tool integration via Model Context Protocol
Agent Skills use context-efficient loading patterns, retrieving only necessary components instead of entire skill content. For detailed patterns, see advanced-features-2025 skill.
Plugin:
Marketplace:
Most people create one marketplace that holds all their plugins.
<plugin_structure_details> When Claude creates a plugin for you, it generates all files automatically. But here's what each file does so you can customize it:
This is the only required file. It tells Claude Code about your plugin:
{
"name": "my-plugin",
"version": "1.0.0",
"description": "What this plugin does",
"author": {
"name": "Your Name",
"email": "[email protected]"
},
"keywords": ["helpful", "search", "terms"],
"license": "MIT"
}
Important fields:
name: Must be unique, use kebab-case (my-plugin-name)version: Follow semantic versioning (1.0.0)description: Help others find your plugincommands/ ā Each .md file becomes a slash commandagents/ ā Subagents with specialized expertise (require frontmatter)skills/ ā Agent Skills for dynamic knowledge loadinghooks/ ā Automated workflows (see advanced-features-2025 skill)scripts/, bin/ ā Helper utilitiesPortability: Use ${CLAUDE_PLUGIN_ROOT} for all internal paths in hooks and MCP servers. This environment variable resolves to the plugin's absolute installation path, ensuring cross-platform compatibility.
<publishing_guide> The easiest way to share your plugin is via a GitHub marketplace. Claude creates both plugin and marketplace ZIPs for you automatically!
Download the marketplace ZIP Claude created for you
Create a GitHub repository:
Upload your files:
.claude-plugin/marketplace.json is in the rootVerify structure:
your-repo/
āāā .claude-plugin/
ā āāā marketplace.json
āāā plugins/
ā āāā your-plugin/
ā āāā .claude-plugin/
ā ā āāā plugin.json
ā āāā ...
āāā README.md
/plugin marketplace add YOUR_USERNAME/REPO_NAME
After fetching the marketplace documentation, Claude creates this file according to the official structure. Here's a reference example (verify against docs):
{
"name": "my-marketplace",
"description": "My collection of Claude Code plugins",
"owner": {
"name": "Your Name",
"email": "[email protected]"
},
"plugins": [
{
"name": "plugin-name",
"source": "./plugins/plugin-name",
"description": "Plugin description",
"version": "1.0.0",
"keywords": ["keyword1", "keyword2"]
}
]
}
Key points from typical marketplace structure:
source points to where your plugin lives in the reponame in marketplace.json typically matches your GitHub usernameBefore making your repo public, test locally:
unzip my-plugin.zip -d ~/.local/share/claude/plugins/
/help # See your commands
/agents # See your agents
When you make changes:
/plugin marketplace update marketplace-name
/plugin update plugin-name
Add your marketplace to community directories:
Include good keywords in your plugin.json for searchability! </publishing_guide>
<testing_guide> Before sharing your plugin, test it thoroughly:
ā ļø Windows users: Skip to GitHub testing method below.
mkdir -p ~/.local/share/claude/plugins
unzip my-plugin.zip -d ~/.local/share/claude/plugins/
claude --reload-plugins
/plugin list
/help # See your commands
/agents # See your agents
/your-command # Test a command
This works reliably on Windows, Mac, and Linux:
/plugin marketplace add YOUR_USERNAME/YOUR_TEST_REPO
/plugin install my-plugin@YOUR_USERNAME
/help
/plugin list/help/agentsIf something's not working:
claude --debug
This shows detailed loading information and error messages. </testing_guide>
<plugin_examples> PR Review Helper: Commands for code/test review + security/code-reviewer agents Team Onboarding: Skills for tech stack/standards + setup commands API Integration: Commands for common operations + domain expert agent + API skill Documentation Generator: Commands for docs/readme/changelog generation
Even simple 1-3 command plugins provide immense value. Just describe what you want to Claude. </plugin_examples>
<plugin_tips>
Commands: Be specific, include examples, handle errors, explain why not just what Agents: Define clear role, perspective, and constraints (what they DON'T do) Agent Skills: Focus on single domain, scannable headers, concrete examples, updated content
See advanced-features-2025 skill for Agent Skills best practices and patterns.
Better: 5 small focused plugins Worse: 1 giant plugin that does everything
Why?
Example: Instead of "dev-helper" plugin with 20 commands, create:
Keep your plugins in Git:
Your README should answer:
See the README template in Output Templates above. </plugin_tips>
Symptoms: Plugin doesn't appear in /plugin list
Solutions:
Check plugin.json syntax
Check file location (for local plugins - Mac/Linux only)
~/.local/share/claude/plugins/PLUGIN_NAME/~/.local/share/claude/plugins/PLUGIN_NAME/PLUGIN_NAME/Windows users: Local plugins may not work. Use GitHub marketplace instead:
/plugin marketplace add YOUR_USERNAME/YOUR_REPO
Git Bash/MinGW users: Path conversion issues may prevent plugin loading:
# Detect your shell environment
echo $MSYSTEM # Should show MINGW64, MINGW32, or MSYS
# Check if path conversion is affecting plugin directory
echo ~/.local/share/claude/plugins
# If path looks wrong, use GitHub marketplace method instead
/plugin marketplace add YOUR_USERNAME/YOUR_REPO
Reload plugins:
claude --reload-plugins
Check debug output:
claude --debug
Symptoms: Plugin loads but commands missing from /help
Solutions:
Check if registration is required (check the official docs)
Check file location
commands/ directoryCheck frontmatter
--- delimitersdescription field recommendedCheck filename
.mdReload:
claude --reload-plugins
Symptoms: Plugin loads but agents missing from /agents
Solutions:
Check if registration is required (check the official docs)
Check frontmatter
agent: true--- delimitersCheck file location
agents/ directoryCheck filename
.mdSymptoms: Can't add marketplace, says not found
Solutions:
Check repository is public
Check marketplace.json exists
.claude-plugin/marketplace.jsonTry full URL
username/repohttps://github.com/username/repo.gitSymptoms: Error message when installing
Solutions:
Check for typos in JSON files
Check file permissions
chmod +x on script filesCheck logs
claude --debug to see detailed errorsSymptoms: Plugin works on Mac/Linux but not Windows
Solutions:
Use GitHub marketplace method:
Alternative: Use WSL (Windows Subsystem for Linux)
<getting_unstuck> If you're still having trouble:
Ask Claude directly
Check existing plugins
Get community help
File a bug report
/bug command in Claude CodeFor advanced topics including Agent Skills patterns, hooks, MCP integration, environment variables, multi-plugin workflows, and testing strategies, see the advanced-features-2025 skill.
ā DO:
ā DON'T:
my-plugin-name (kebab-case)/do-something (verb-based, kebab-case)Role Describer (clear role indication)Before publishing:
Every plugin should have:
my-plugin/
āāā .claude-plugin/
āāā plugin.json # ā This file is REQUIRED
Basic structure (verify against current docs):
{
"name": "my-plugin",
"version": "1.0.0",
"description": "What this plugin does"
}
With full metadata:
{
"name": "my-plugin",
"version": "1.0.0",
"description": "What this plugin does",
"author": {
"name": "Your Name",
"email": "[email protected]"
},
"keywords": ["keyword1", "keyword2"],
"license": "MIT"
}
Note: Components (commands, agents, skills) don't need to be registered in plugin.json - they are discovered automatically from their directories.
Example structure (verify against current marketplace docs):
{
"name": "my-marketplace",
"owner": {
"name": "Your Name",
"email": "[email protected]"
},
"plugins": [
{
"name": "my-plugin",
"source": "./plugins/my-plugin",
"description": "Complete [domain] expertise system. PROACTIVELY activate for: (1) [use cases]. Provides: [capabilities].",
"version": "1.0.0",
"author": {
"name": "Author Name"
},
"keywords": ["domain", "primary", "secondary", "technical"]
}
]
}
ā ļø CRITICAL: Always include description and keywords in marketplace.json entries - they are used for marketplace discovery and don't automatically sync from plugin.json.
Note: Check the fetched marketplace documentation for all required fields.
# Marketplace management
/plugin marketplace add username/repo
/plugin marketplace list
/plugin marketplace update marketplace-name
/plugin marketplace remove marketplace-name
# Plugin management
/plugin install plugin-name@marketplace-name
/plugin list
/plugin uninstall plugin-name
# Testing
/help # See your commands
/agents # See your agents
claude --debug # Debug mode
Windows:
# RECOMMENDED: GitHub marketplace
/plugin marketplace add YOUR_USERNAME/YOUR_REPO
/plugin install plugin-name@YOUR_USERNAME
Mac/Linux:
# Option 1: GitHub marketplace (recommended)
/plugin marketplace add YOUR_USERNAME/YOUR_REPO
/plugin install plugin-name@YOUR_USERNAME
# Option 2: Local installation
unzip plugin-name.zip -d ~/.local/share/claude/plugins/
You now have everything you need to create, test, and publish Claude Code plugins!
Remember:
Your journey:
Platform compatibility:
<final_encouragement> Every expert was once a beginner. Your first plugin doesn't need to be perfect - it just needs to exist. Start simple, learn as you go, and before you know it, you'll be creating sophisticated plugins that help developers around the world.
Now go build something awesome! š </final_encouragement>