一键导入
claude-code-plugin-development
// This skill should be used when the user asks to "create a plugin", "build a plugin", "write a plugin", or wants to bundle agents, hooks, commands, skills, or MCP servers into a distributable Claude Code plugin.
// This skill should be used when the user asks to "create a plugin", "build a plugin", "write a plugin", or wants to bundle agents, hooks, commands, skills, or MCP servers into a distributable Claude Code plugin.
| name | claude-code-plugin-development |
| description | This skill should be used when the user asks to "create a plugin", "build a plugin", "write a plugin", or wants to bundle agents, hooks, commands, skills, or MCP servers into a distributable Claude Code plugin. |
| allowed-tools | Read, Grep |
Create distributable plugins that bundle commands, agents, skills, hooks, MCP servers, and LSP servers.
Official docs: https://code.claude.com/docs/en/plugins-reference
You MUST read these references for detailed schemas and examples:
my-plugin/
├── .claude-plugin/
│ └── plugin.json # Required manifest
├── commands/ # Slash commands (.md files)
├── agents/ # Subagents (.md files)
├── skills/ # Skills (subdirs with SKILL.md)
├── hooks/
│ └── hooks.json # Hook configuration
├── .mcp.json # MCP server definitions
├── .lsp.json # LSP server configurations
└── scripts/ # Hook and utility scripts
Important: Components go at plugin root, NOT inside .claude-plugin/. Only plugin.json belongs in .claude-plugin/.
A marketplace can contain multiple plugins. The marketplace root has its own .claude-plugin/marketplace.json:
my-marketplace/
├── .claude-plugin/
│ └── marketplace.json # Lists all plugins in this marketplace
├── plugins/
│ ├── plugin-a/
│ │ ├── .claude-plugin/
│ │ │ └── plugin.json
│ │ └── skills/
│ └── plugin-b/
│ ├── .claude-plugin/
│ │ └── plugin.json
│ └── commands/
{
"name": "my-marketplace",
"owner": {
"name": "author-name"
},
"plugins": [
{
"name": "plugin-a",
"source": "./plugins/plugin-a",
"description": "First plugin description",
"version": "1.0.0"
},
{
"name": "plugin-b",
"source": "./plugins/plugin-b",
"description": "Second plugin description",
"version": "0.2.0"
}
]
}
Critical: When adding a new plugin to a marketplace:
marketplace.json or it won't be installable{
"name": "my-plugin",
"version": "1.0.0",
"description": "Brief plugin description"
}
| Scope | Location | Use case |
|---|---|---|
| user | ~/.claude/settings.json | Personal plugins (default) |
| project | .claude/settings.json | Team plugins via version control |
| local | .claude/settings.local.json | Project-specific, gitignored |
| managed | managed-settings.json | Read-only managed plugins |
Use ${CLAUDE_PLUGIN_ROOT} for paths in hooks and MCP configs:
{
"command": "${CLAUDE_PLUGIN_ROOT}/scripts/validate.sh"
}
| Component | Location | Format |
|---|---|---|
| Commands | commands/ | Markdown with frontmatter |
| Agents | agents/ | Markdown with frontmatter |
| Skills | skills/*/SKILL.md | Directories with SKILL.md |
| Hooks | hooks/hooks.json | JSON configuration |
| MCP servers | .mcp.json | MCP server config |
| LSP servers | .lsp.json | Language server config |
# Install
claude plugin install <plugin>@<marketplace> --scope user
# Manage
claude plugin enable <plugin>
claude plugin disable <plugin>
claude plugin update <plugin>
claude plugin uninstall <plugin>
# Debug
claude --debug
Problem: Using ! backticks to run plugin scripts fails with permission error:
Error: Bash command permission check failed for pattern
"!`${CLAUDE_PLUGIN_ROOT}/scripts/my-script.sh 2>&1 || true`":
This Bash command contains multiple operations.
Cause: ! backticks have their own permission model separate from allowed-tools. Complex commands or scripts fail.
Solution: Use the Bash tool instead of ! backticks for scripts:
---
allowed-tools: Bash(${CLAUDE_PLUGIN_ROOT}/scripts/my-script.sh:*)
---
Run the script:
```bash
${CLAUDE_PLUGIN_ROOT}/scripts/my-script.sh
```
Simple git commands still work with ! backticks: !git branch --show-current``
Plugin installed but commands don't appear?
The plugin may be disabled. Check ~/.claude/settings.json:
"enabledPlugins": {
"my-plugin@my-marketplace": false // ← Disabled!
}
Fix with: claude plugin enable my-plugin@my-marketplace then restart Claude Code.
Local changes not picked up?
Use claude plugin update <plugin> or do a full reinstall:
claude plugin marketplace remove my-marketplace
claude plugin marketplace add ./
claude plugin install my-plugin@my-marketplace
After creating or modifying plugins, inform the user:
Plugin changes take effect immediately after installation. Use
claude --debugto verify plugin loading.
Before finalizing a plugin:
plugin.json has name, version, description.claude-plugin/)${CLAUDE_PLUGIN_ROOT} variablechmod +x)marketplace.jsonclaude --debug to verify loadingThis skill should be used when the user asks to "improve my setup", "learn from this session", "fix my config", "stop asking for permissions", or reports friction with skills, agents, hooks, or permissions. Analyzes conversation history and proposes configuration improvements.
Create a new GitHub project with standard configuration. Use when user asks to "create a project", "set up a new repo", "initialize a repository", or wants to start a new GitHub project.
Create and manage Slidev presentation decks. Use when user asks to "create slides", "make a presentation", "add slides to this project", "set up a slide deck", or mentions "slidev", "pitch deck", or "slides folder".
This skill should be used when the user asks to "create a hook", "add a hook", "write a hook", or mentions Claude Code hooks. Also suggest this skill when the user asks to "automatically do X" or "run X before/after Y" as these are good candidates for hooks.
This skill should be used when the user asks to "set up memory", "configure CLAUDE.md", "add rules", "create project rules", "organize instructions", or mentions Claude Code memory, CLAUDE.md files, .claude/rules, rules, or project instructions. Also use when the user wants to persist preferences, add coding conventions, scope instructions to specific files, or understand when to use rules vs hooks or other memory mechanisms.
This skill should be used when the user asks to "create a skill", "write a skill", "build a skill", or wants to add new capabilities to Claude Code. Use when developing SKILL.md files, organizing skill content, or improving existing skills. Do NOT use for plugin development, hook creation, agent creation, or slash command creation — those have dedicated skills.