Create a new Claude Code plugin with proper structure
/plugin marketplace add otrebu/agents/plugin install meta-work@otrebu-dev-tools<what the plugin does>Create Claude Code plugins following standard structure.
Current state of the marketplace:
cat .claude-plugin/marketplace.json | grep '"name"' || echo "none"pwd/pluginsFrom $ARGUMENTS, derive:
Read .claude-plugin/marketplace.json and verify:
./plugins/{name} is availableIf conflict exists, stop and ask user for alternative name.
Create the following directory structure:
plugins/{name}/
├── .claude-plugin/
│ └── plugin.json
├── commands/
├── README.md
Use Bash(mkdir:*) to create directories:
mkdir -p plugins/{name}/.claude-plugin
mkdir -p plugins/{name}/commands
Create plugins/{name}/.claude-plugin/plugin.json:
{
"name": "{name}",
"version": "1.0.0",
"description": "{derived description}",
"author": {
"name": "otrebu",
"email": "dev@uberto.me"
},
"license": "MIT",
"keywords": [
"{keyword1}",
"{keyword2}",
"{keyword3}"
]
}
Create plugins/{name}/README.md:
# {Plugin Name}
{Description from plugin.json}
## Status
🚧 Plugin scaffolded - no commands or agents yet.
## Development
Add commands and agents to this plugin:
```bash
# Add a command
touch plugins/{name}/commands/my-command.md
# Add an agent
mkdir -p plugins/{name}/agents
touch plugins/{name}/agents/my-agent.md
Update this README as features are added.
### Step 6: Update marketplace.json
Read `.claude-plugin/marketplace.json`, parse the JSON, and add new plugin entry to the `plugins` array:
```json
{
"name": "{name}",
"source": "./plugins/{name}",
"description": "{description}",
"version": "1.0.0"
}
Important: Preserve existing plugins and maintain JSON formatting.
Before writing files, verify:
./Use the Write tool to create all files:
plugins/{name}/.claude-plugin/plugin.jsonplugins/{name}/README.md.claude-plugin/marketplace.jsonReport what was created and provide next steps:
Created plugin: {name}
Structure:
✓ plugins/{name}/.claude-plugin/plugin.json
✓ plugins/{name}/commands/ (empty)
✓ plugins/{name}/README.md
✓ Updated .claude-plugin/marketplace.json
Next steps:
1. Add commands: Create .md files in plugins/{name}/commands/
2. Add agents: Create agents/ directory and .md files
3. Add hooks: Create hooks/hooks.json
4. Add MCP servers: Create .mcp.json
Examples:
- Create command: touch plugins/{name}/commands/example.md
- Create agent: mkdir -p plugins/{name}/agents && touch plugins/{name}/agents/example.md
The plugin is now registered in the marketplace and ready for development!
Input: /create-plugin manages database migrations and schema changes
Output:
database-migrations/create-pluginGuided end-to-end plugin creation workflow with component design, implementation, and validation
/create-pluginGuided end-to-end plugin creation workflow with component design, implementation, and validation