plugin.json file is the manifest for Claude Code plugins, defining metadata, dependencies, and plugin information.
File Location
Plugin manifests must be located at:The
.claude-plugin directory is required. Claude Code looks for this directory to identify plugins.Basic Structure
Minimal plugin.json:plugin.json
Required Fields
Unique plugin identifier. Use kebab-case (e.g.,
my-awesome-plugin).- Must be unique across all plugins
- Used for installation and references
- Cannot contain spaces or special characters
Semantic version (e.g.,
1.0.0, 2.1.3).Follow semver:- MAJOR.MINOR.PATCH
- Breaking changes increment MAJOR
- New features increment MINOR
- Bug fixes increment PATCH
Brief description of what the plugin does. Shown in plugin browser and marketplace.Keep concise (< 200 characters).
Plugin author information.Fields:
name(string, required) - Author nameemail(string, optional) - Contact emailurl(string, optional) - Author website or GitHub profile
Optional Fields
Human-readable name shown in UI. Defaults to
name field.Example: "My Awesome Plugin" (instead of my-awesome-plugin)Plugin homepage URL (documentation, GitHub repo, etc.).
Source code repository.String format:Object format:
License identifier (e.g.,
"MIT", "Apache-2.0").See SPDX License List.Search keywords for marketplace discoverability.
Plugin category for marketplace organization.Suggested categories:
"development"- Development tools"productivity"- Productivity enhancements"code-quality"- Code review and quality"testing"- Testing tools"deployment"- Deployment and CI/CD"documentation"- Documentation tools
Plugin Structure
A complete plugin directory:Real-World Examples
Example 1: Security Guidance Plugin
.claude-plugin/plugin.json
- Hooks for security warnings
- Pre-tool-use validation
- Pattern matching for vulnerabilities
Example 2: Ralph Wiggum Plugin
.claude-plugin/plugin.json
- Commands for loop management
- Stop hooks for loop control
- State management scripts
Example 3: PR Review Toolkit
.claude-plugin/plugin.json
- Multiple specialized agents
- Review commands
- Analysis tools
Default Settings
Plugins can ship with default settings:settings.json
Plugin settings are automatically applied when the plugin is enabled. Users can override them in their own settings.json.
Plugin Installation Sources
Plugins can be installed from:Git Repository
- Repository must contain
.claude-plugin/plugin.json - Can specify branch, tag, or commit
NPM Package
- Package must contain
.claude-plugin/plugin.json - Supports version pinning
- Supports custom registries
Local Directory
Marketplace
Install from configured marketplaces:Plugin Validation
Validate your plugin before publishing:plugin.jsonexists and is valid JSON- Required fields present
- Version follows semver
- Referenced files exist
- Hooks configuration is valid
- Commands have valid frontmatter
Marketplace Configuration
To publish to a marketplace, add your plugin to the marketplace JSON:marketplace.json
Versioning Best Practices
Semantic Versioning
Semantic Versioning
Follow semver strictly:MAJOR (1.0.0 → 2.0.0)
- Breaking changes to commands
- Removed features
- Changed hook behavior that breaks compatibility
- New commands or features
- New agents or skills
- Backward-compatible enhancements
- Bug fixes
- Documentation updates
- Performance improvements
Pin Dependencies
Pin Dependencies
If your plugin depends on external tools:Document in README.md and validate in Setup hook.
Changelog
Changelog
Maintain a CHANGELOG.md:
Publishing Checklist
Before publishing your plugin:-
plugin.jsonhas all required fields - Version follows semantic versioning
- Description is clear and concise
- README.md documents installation and usage
- All commands have descriptions
- Hooks are documented
- Plugin validates without errors
- Tested with
claude plugin install /path/to/plugin - License file included
- Examples and screenshots in README
Environment Variables
Plugin scripts have access to:Absolute path to plugin directory.
Current session identifier.
Next Steps
Plugin Development
Learn how to create your own plugins
Command Development
Create custom slash commands