Directory Structure
Every plugin follows a consistent structure that Claude recognizes automatically:Key Principles
.claude-plugin/plugin.jsonis always required- Component directories (
commands/,skills/) go at the plugin root, not inside.claude-plugin/ - Only create directories for components your plugin actually uses
- Use kebab-case for all directory and file names
- Everything is markdown and JSON — no build steps required
plugin.json Manifest
The manifest file at.claude-plugin/plugin.json defines your plugin’s metadata. Only the name field is required:
Name Rules
- Use kebab-case (lowercase with hyphens)
- No spaces or special characters
- Should be descriptive of the plugin’s purpose
sales, product-management, customer-support
Version Format
Versions use semantic versioning (semver):MAJOR.MINOR.PATCH
- MAJOR: Breaking changes
- MINOR: New features, backward compatible
- PATCH: Bug fixes
0.1.0 or 1.0.0.
Optional Fields
Skills Directory
Skills live in subdirectories underskills/. Each skill is a separate directory containing a SKILL.md file:
Skill Structure
Each skill directory can contain:- SKILL.md (required): The main skill definition with frontmatter and instructions
- references/ (optional): Detailed reference content, schemas, examples
- examples/ (optional): Working examples and sample outputs
Progressive Disclosure
Keep the main SKILL.md concise (under 3,000 words) with core knowledge. Put detailed content in reference files. This helps Claude load skills efficiently.Commands Directory
Commands are individual markdown files in thecommands/ directory:
- YAML frontmatter with metadata
- Markdown body with instructions for Claude
/sales:call-summary.
MCP Configuration
The.mcp.json file at the plugin root defines external tool connections:
Custom Component Paths
You can specify custom paths for components inplugin.json:
README.md
Include a README.md at the plugin root to document:- What the plugin does
- Who should use it
- What skills and commands it provides
- Required connectors
- Setup instructions
- Customization tips
Complete Example
Here’s a complete minimal plugin structure:Path Variables
When referencing files within your plugin, use the${CLAUDE_PLUGIN_ROOT} variable:
Packaging Plugins
To share your plugin, package it as a.plugin file (which is just a zip file):
Next Steps
Creating Skills
Learn how to write skills with frontmatter and instructions
Creating Commands
Build slash commands for structured workflows
Adding MCP Servers
Connect your plugin to external tools
Plugin Management
Use the plugin management plugin to create and customize plugins