Contributing
February 16, 2026 · View on GitHub
Adding a New Plugin
- Create a directory under
plugins/your-plugin-name/ - Add the required structure:
plugins/your-plugin-name/
├── .claude-plugin/
│ └── plugin.json # Plugin metadata
├── hooks/
│ └── hooks.json # Hook definitions (auto-wired)
├── scripts/
│ └── your-script.sh # Hook implementation
└── README.md # Documentation
- Register your plugin in
.claude-plugin/marketplace.json:
{
"name": "your-plugin-name",
"source": "./plugins/your-plugin-name",
"description": "What it does",
"author": { "name": "Your Name" },
"keywords": ["relevant", "tags"],
"category": "productivity",
"license": "MIT"
}
- Update the root
README.mdplugin table.
Plugin Guidelines
- Self-contained: All scripts and resources within the plugin directory
- Use
${CLAUDE_PLUGIN_ROOT}: For paths inhooks.json— never hardcode absolute paths - Graceful degradation: Optional dependencies should be auto-detected, not required
- Configuration via env vars: Use a consistent prefix (e.g.,
YOUR_PLUGIN_*) - Bash 3.2+ compatible: macOS ships with Bash 3.2, no associative arrays
- Exit 0 on success: Hooks must exit cleanly to not block Claude Code
Quality Checklist
-
plugin.jsonhas name, description, version, author -
hooks.jsonuses${CLAUDE_PLUGIN_ROOT}for script paths - Scripts are executable (
chmod +x) - Scripts use
set -euo pipefail - Optional dependencies are auto-detected
- README documents all configuration options
- Tested with
claude --plugin-dir ./plugins/your-plugin-name
Submitting
- Fork the repo
- Create your plugin branch
- Submit a PR with the plugin + updated marketplace.json + updated root README