From claude-skills
Guides through creating Claude Code plugins with slash commands, Skills, agents, hooks, and MCP servers. Use when creating distributable plugin packages.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-skills:plugin-creatorThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill guides you through creating Claude Code plugins - distributable packages that can include slash commands, Skills, agents, hooks, and MCP/LSP servers. Plugins are shareable via marketplaces and use namespaced commands to prevent conflicts.
This skill guides you through creating Claude Code plugins - distributable packages that can include slash commands, Skills, agents, hooks, and MCP/LSP servers. Plugins are shareable via marketplaces and use namespaced commands to prevent conflicts.
Use this skill when the user asks to:
Use a Plugin when:
/plugin-name:command)Use Standalone .claude/ when:
/hello vs /plugin:hello)Plugins can include:
commands/skills/ subdirectoriesagents/hooks/hooks.json.mcp.json.lsp.jsonAsk these questions to understand requirements:
"What should this plugin do?"
"What components should it include?"
"What should we name it?"
code-reviewer, test-helper/code-reviewer:check"Where should we create it?"
"Will this be shared?"
Look for existing plugins or .claude/ configurations to reference:
ls -la .claude/commands/ 2>/dev/null
ls -la .claude/skills/ 2>/dev/null
ls -la ~/.claude/skills/ 2>/dev/null
Document your understanding:
PLUGIN NAME: <kebab-case-name>
PURPOSE: <one-sentence description>
COMPONENTS:
- [ ] Slash commands: <list>
- [ ] Skills: <list>
- [ ] Hooks: <list>
- [ ] MCP/LSP: <list>
LOCATION: <path>
AUDIENCE: <personal/team/public>
Create the plugin root and manifest directory:
mkdir -p <plugin-name>/.claude-plugin
CRITICAL: All component directories go at the plugin root, NOT inside .claude-plugin/:
plugin-name/
├── .claude-plugin/
│ └── plugin.json (manifest - ONLY FILE HERE)
├── commands/ (at root level)
├── skills/ (at root level)
├── agents/ (at root level)
├── hooks/ (at root level)
│ └── hooks.json
├── .mcp.json (at root level)
└── .lsp.json (at root level)
Create .claude-plugin/plugin.json with metadata:
{
"name": "plugin-name",
"description": "What the plugin does and when to use it",
"version": "1.0.0",
"author": {
"name": "Author Name"
}
}
Required fields:
name: Unique identifier (kebab-case, becomes namespace)description: Shown in plugin managerversion: Semantic versioning (MAJOR.MINOR.PATCH)Optional fields:
author.name: Creator attributionauthor.email: Contact infohomepage: Documentation URLrepository: Source code URLlicense: License identifier (MIT, Apache-2.0, etc.)Create commands/ directory and add Markdown files:
mkdir -p <plugin-name>/commands
Each command is a .md file with frontmatter:
---
description: What this command does
---
# Command Name
Instructions for Claude on how to respond.
Use $ARGUMENTS to capture user input.
Use $1, $2, $3 for individual positional arguments.
Example command (commands/greet.md):
---
description: Greet the user warmly
---
# Greet Command
Greet the user named "$ARGUMENTS" warmly and ask how you can help them today.
Command naming:
greet.md → /plugin-name:greetcode-review.mdCreate skills/ directory with skill subdirectories:
mkdir -p <plugin-name>/skills/<skill-name>
Each skill needs a SKILL.md file with frontmatter:
---
name: skill-name
description: What the skill does - how it works. When to use it.
allowed-tools: Bash, Read, Grep, Glob
---
# Skill Title
Instructions for Claude with step-by-step workflow.
## Workflow
### Step 1: Name
Detailed instructions and commands.
### Step 2: Name
More instructions.
## Output Format
How to structure the output.
Key points:
Create hooks/ directory and hooks.json:
mkdir -p <plugin-name>/hooks
Create hooks/hooks.json:
{
"hooks": {
"PostToolUse": [
{
"matcher": "Write|Edit",
"hooks": [
{
"type": "command",
"command": "npm run lint:fix $FILE"
}
]
}
]
}
}
Available hook types:
PreToolUse: Before tool executionPostToolUse: After tool executionUserPromptSubmit: After user sends messageMatchers:
Write, Edit, ReadWrite|EditCreate .mcp.json at plugin root:
{
"mcpServers": {
"server-name": {
"command": "node",
"args": ["path/to/server.js"]
}
}
}
Create .lsp.json at plugin root:
{
"language-id": {
"command": "language-server-binary",
"args": ["--stdio"],
"extensionToLanguage": {
".ext": "language-id"
}
}
}
Every plugin should have a README:
# Plugin Name
Brief description of what the plugin does.
## Installation
From a marketplace:
```bash
claude --plugin-dir /path/to/plugin
Or install via marketplace URL.
/plugin-name:command - DescriptionShow common use cases.
Any settings or requirements.
License information.
## Phase 5: Test the Plugin
### Local Testing
Test the plugin with `--plugin-dir`:
```bash
claude --plugin-dir /path/to/<plugin-name>
.claude-plugin/plugin.jsonSlash commands:
/plugin-name:command-name [args]
Skills:
Hooks:
Display the created structure:
find <plugin-name> -type f
cat <plugin-name>/.claude-plugin/plugin.json
Present a summary:
✓ Created plugin: <plugin-name>
✓ Location: <path>
✓ Components:
- X slash commands
- X skills
- X hooks
To test:
claude --plugin-dir /path/to/<plugin-name>
Commands available:
/plugin-name:command1
/plugin-name:command2
Suggest next steps:
--plugin-dirJust slash commands, no other components:
my-plugin/
├── .claude-plugin/
│ └── plugin.json
├── commands/
│ ├── hello.md
│ └── goodbye.md
└── README.md
Primarily Skills with supporting commands:
my-plugin/
├── .claude-plugin/
│ └── plugin.json
├── skills/
│ ├── code-review/
│ │ └── SKILL.md
│ └── test-coverage/
│ └── SKILL.md
├── commands/
│ └── review.md
└── README.md
Hooks and commands working together:
my-plugin/
├── .claude-plugin/
│ └── plugin.json
├── hooks/
│ └── hooks.json
├── commands/
│ ├── setup.md
│ └── check.md
└── README.md
If converting existing .claude/ configuration:
cp -r .claude/commands <plugin-name>/
cp -r .claude/skills <plugin-name>/
--plugin-dirDirectory structure:
plugin.json goes in .claude-plugin/Naming:
filename.md → /plugin-name:filenameSkills:
Testing:
--plugin-dir firstVersioning:
Creating a plugin involves:
--plugin-dirFollow this workflow, use the checklist, and reference the documentation at https://code.claude.com/docs/en/plugins.md for complete specifications.
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub abdoumoumen/claude-skills-plugin --plugin claude-skills