From claude-code-dev
Creates Claude Code plugin directory structure with .claude-plugin/plugin.json manifest and optional components like commands, agents, skills, hooks, MCP servers, scripts. Use when building a new plugin from scratch.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-code-dev:create-pluginThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Create new Claude Code plugins with proper structure and configuration.
Create new Claude Code plugins with proper structure and configuration.
plugin-name/
├── .claude-plugin/ # Required: Metadata directory
│ └── plugin.json # Required: Plugin manifest
├── commands/ # Optional: Command definitions
│ ├── command1.md
│ └── command2.md
├── agents/ # Optional: Agent definitions
│ ├── agent1.md
│ └── agent2.md
├── skills/ # Optional: Agent Skills
│ ├── skill-name/
│ │ └── SKILL.md
│ └── another-skill/
│ ├── SKILL.md
│ └── scripts/
├── hooks/ # Optional: Hook configurations
│ ├── hooks.json # Main hook config
│ └── additional-hooks.json
├── .mcp.json # Optional: MCP server definitions
├── scripts/ # Optional: Hook and utility scripts
│ ├── script1.sh
│ └── script2.py
├── LICENSE # Optional: License file
├── CHANGELOG.md # Optional: Version history
└── README.md # Optional: Documentation
| Field | Type | Description |
|---|---|---|
name | string | Plugin identifier (kebab-case recommended) |
version | string | Semantic version (e.g., "1.2.0") |
description | string | Brief description of the plugin |
| Field | Type | Description |
|---|---|---|
author | object | Author information |
author.name | string | Author's name (required if author present) |
author.email | string | Author's email |
author.url | string | Author's website or GitHub profile |
homepage | string | Plugin documentation URL |
repository | string | Git repository URL |
license | string | License identifier (e.g., "MIT", "Apache-2.0") |
keywords | array | Searchable keywords |
commands | string or array | Custom command locations (directory or file paths) |
agents | array | Array of agent file paths (must end with .md) |
hooks | string | Custom hook configuration file location |
mcpServers | string | Custom MCP server configuration file location |
Commands MUST be a string (directory path) or array of strings (file paths):
CORRECT - Directory path:
{
"commands": "./commands/"
}
CORRECT - Array of file paths:
{
"commands": ["./commands/lint.md", "./commands/format.md"]
}
CORRECT - Single custom path:
{
"commands": "./custom/commands/special.md"
}
WRONG - Object format (INVALID):
{
"commands": {
"my-command": {
"description": "...",
"source": "..."
}
}
}
Agents MUST be an array of file paths ending with .md:
CORRECT:
{
"agents": [
"./agents/my-agent.md",
"./agents/another-agent.md"
]
}
CORRECT - Single agent:
{
"agents": ["./agents/expert.md"]
}
WRONG - Directory path (INVALID):
{
"agents": "./agents/"
}
WRONG - Object format (INVALID):
{
"agents": {
"agent-name": {
"description": "...",
"file": "..."
}
}
}
Skills are automatically discovered from the skills/ directory. No manifest entry needed.
Each skill must be in its own folder with a SKILL.md file:
skills/
├── skill-name/
│ └── SKILL.md
└── another-skill/
└── SKILL.md
{
"name": "my-plugin",
"version": "1.0.0",
"description": "A simple plugin for Claude Code"
}
{
"name": "code-quality",
"version": "1.0.0",
"description": "Code quality tools including linting and review",
"author": {
"name": "Developer",
"email": "[email protected]"
},
"commands": "./commands/",
"agents": [
"./agents/code-reviewer.md"
]
}
{
"name": "enterprise-plugin",
"version": "1.2.0",
"description": "Enterprise-grade development plugin",
"author": {
"name": "Jane Developer",
"email": "[email protected]",
"url": "https://github.com/janedev"
},
"homepage": "https://docs.example.com/plugin",
"repository": "https://github.com/janedev/enterprise-plugin",
"license": "MIT",
"keywords": ["enterprise", "security", "compliance"],
"commands": ["./custom/commands/special.md"],
"agents": ["./custom/agents/security-expert.md"],
"hooks": "./config/hooks.json",
"mcpServers": "./mcp-config.json"
}
Plan the plugin
Create directory structure
mkdir -p plugin-name/.claude-plugin
mkdir -p plugin-name/agents
mkdir -p plugin-name/commands
mkdir -p plugin-name/skills
Create plugin.json
{
"name": "plugin-name",
"version": "1.0.0",
"description": "Plugin description",
"author": {
"name": "Author Name"
},
"commands": "./commands/",
"agents": ["./agents/my-agent.md"]
}
Add components
agents/ with proper frontmattercommands/ with proper frontmatterskills/skill-name/SKILL.mdIMPORTANT: Register in marketplace.json
Every new plugin MUST be added to .claude-plugin/marketplace.json
Validate the plugin
./scripts/validate-all-plugins.sh plugin-name
Commit the changes Include both the plugin directory AND marketplace.json
Every new plugin must be registered in .claude-plugin/marketplace.json.
Add a new entry to the plugins array:
{
"plugins": [
// ... existing plugins ...
{
"name": "plugin-name",
"description": "Brief plugin description",
"source": "./plugins/plugin-name",
"category": "development"
}
]
}
| Field | Required | Description |
|---|---|---|
name | Yes | Must match plugin.json name |
description | Yes | Brief description for marketplace listing |
source | Yes | Relative path to plugin directory |
category | Yes | One of: productivity, development, security |
productivity - Workflow, project management, documentation toolsdevelopment - Code quality, testing, language-specific toolssecurity - Security, compliance, privacy tools/plugin marketplace add ./path-to-marketplace/plugin install plugin-name@marketplace-name/help to see commands| Error | Cause | Fix |
|---|---|---|
Missing required file: .claude-plugin/plugin.json | No manifest | Create .claude-plugin/plugin.json |
plugin.json missing required fields | Missing name, version, or description | Add all required fields |
'author' must be an object | Author is a string | Use object format with name field |
Invalid JSON syntax | Trailing commas, missing quotes | Fix JSON syntax |
agents: Invalid input: must end with ".md" | Using directory path for agents | Use array of file paths: ["./agents/name.md"] |
version fieldIf you have an existing plugin without plugin.json:
cd plugins/your-plugin
mkdir -p .claude-plugin
cat > .claude-plugin/plugin.json << 'EOF'
{
"name": "your-plugin",
"version": "1.0.0",
"description": "Your plugin description",
"author": {
"name": "Your Name"
}
}
EOF
npx claudepluginhub jpoutrin/product-forge --plugin claude-code-devGuides developers in creating, scaffolding, validating, and publishing Claude Code plugins including directory structure, plugin.json schema, YAML frontmatter, agents, commands, skills, and marketplace deployment.
Scaffolds a complete Claude Code plugin with manifest, skills, agents, hooks, MCP/LSP servers, and marketplace entry. Walks through component selection and writes files.
Scaffolds Claude Code plugins (commands, agents, skills, MCP) with directory structure, required files, validation scripts, and marketplace integration for the AI assistant-code-plugins repo.