Plugin Creator
Create Claude Code plugins to extend functionality with custom commands, agents, skills, hooks, and MCP servers.
Plugin Creation Workflow
- Gather Requirements
Ask the user:
-
What functionality should the plugin provide?
-
Which components are needed? (commands, agents, hooks, MCP servers, skills)
-
Who is the target audience? (personal, team, public)
- Create Plugin Structure
my-plugin/ ├── .claude-plugin/ │ └── plugin.json # Required ├── commands/ # Optional: slash commands ├── agents/ # Optional: sub-agents ├── skills/ # Optional: agent skills ├── hooks/ # Optional: event handlers └── .mcp.json # Optional: MCP servers
- Write plugin.json
Minimal example:
{ "name": "my-plugin", "description": "Brief description", "version": "1.0.0", "author": {"name": "Author Name"} }
- Add Components
Based on user requirements, add:
-
Commands: See commands.md for slash command format
-
Agents: See agents.md for agent definition format
-
Hooks: See hooks.md for event handler configuration
-
MCP Servers: See mcp-servers.md for server configuration
- Test Locally
Create a test marketplace:
mkdir test-marketplace/.claude-plugin
Create test-marketplace/.claude-plugin/marketplace.json :
{ "name": "test-marketplace", "owner": {"name": "Developer"}, "plugins": [{"name": "my-plugin", "source": "./my-plugin"}] }
Test commands:
/plugin marketplace add ./test-marketplace /plugin install my-plugin@test-marketplace
Quick Reference
Command File (commands/hello.md)
description: Greet the user
Hello Command
Greet the user warmly.
Agent File (agents/reviewer.md)
description: Code review specialist capabilities: ["review", "suggestions"]
Reviewer
Review code for quality and best practices.
Hooks (hooks/hooks.json)
{ "hooks": { "PostToolUse": [{ "matcher": "Write|Edit", "hooks": [{"type": "command", "command": "prettier --write $CLAUDE_FILE_PATH"}] }] } }
References
Plugin Development
-
Plugins Guide - Complete plugin creation guide
-
Plugins Reference - Technical schemas and configurations
-
Plugin Structure - Directory layout and plugin.json schema
-
Marketplace - Plugin distribution
Plugin Components
-
Commands - Slash command format
-
Agents - Sub-agent definitions
-
Hooks - Event handlers
-
MCP Servers - External tool integration
Skills Development
-
Skills Overview - What skills are and how they work
-
Skills Best Practices - Writing effective skills
-
Skills Schema - SKILL.md format and validation