Scaffold a new Claude Code plugin with standard structure and starter files
Scaffolds a new Claude Code plugin with standard directory structure and starter files.
/plugin marketplace add LucasXu0/claude-code-plugin/plugin install plugin-development@LucasXu0-flutter-toolsplugin-nameCreate the standard directory structure and files for a new Claude Code plugin.
$1 (required): Plugin name in kebab-case (e.g., my-awesome-plugin).claude-plugin/ with plugin.jsoncommands/ directoryagents/ directoryskills/ directoryhooks/ directory with hooks.jsonscripts/ directoryplugin.json with the provided nameFirst, validate the plugin name:
If validation fails, explain the requirements and ask for a valid name.
Create these directories:
$1/
├── .claude-plugin/
├── commands/
├── agents/
├── skills/
├── hooks/
└── scripts/
Create .claude-plugin/plugin.json with this template:
{
"name": "$1",
"version": "0.1.0",
"description": "Brief description of what this plugin does",
"author": {
"name": "Your Name",
"email": "you@example.com"
},
"license": "MIT",
"keywords": ["keyword1", "keyword2"]
}
Create hooks/hooks.json with a basic structure:
{
"description": "Plugin hooks",
"hooks": {}
}
Create README.md with this template:
# $1
[Brief description of what this plugin does]
## Installation
```bash
/plugin install $1@marketplace-name
[List commands here]
[Provide examples]
### Create Validation Script
Create `scripts/validate-plugin.sh` with executable permissions:
```bash
#!/usr/bin/env bash
set -euo pipefail
# Basic plugin structure validation
[ -f ".claude-plugin/plugin.json" ] || { echo "Missing plugin.json" >&2; exit 2; }
exit 0
Make it executable: chmod +x scripts/validate-plugin.sh
After scaffolding, provide these instructions to the user:
✓ Plugin scaffolded at $1/
Next steps:
1. Edit $1/.claude-plugin/plugin.json with your metadata
2. Add components:
- /plugin-development:add-command <name> <description>
- /plugin-development:add-skill <name> <description>
- /plugin-development:add-agent <name> <description>
3. Validate: /plugin-development:validate
4. Test locally: /plugin-development:test-local
Input: /plugin-development:init my-awesome-plugin
Result:
my-awesome-plugin/ with full structure./)/plugin-development:test-local to test it