ed3dai/ed3d-plugins/creating-a-plugin
Claude Code and agent skill by ed3dai/ed3d-plugins
- community
Checking that the SKILL.md file is still in the repository.
Use when creating a new Claude Code plugin or setting up plugin structure - provides complete file organization, manifest format, and component definitions for commands, agents, skills, hooks, and MCP servers
Install
npx vskill@latest install ed3dai/ed3d-plugins/creating-a-pluginSKILL.md
Creating a Plugin
Overview
A Claude Code plugin packages reusable components (commands, agents, skills, hooks, MCP servers) for distribution. Create a plugin when you have components that work across multiple projects.
Don't create a plugin for:
- Project-specific configurations (use
.claude/in project root) - One-off scripts or commands
- Experimental features still in development
Plugin storage locations:
- Development: Anywhere during development, installed via
file:///path - User-level:
~/.claude/plugins/(after installation) - Project-level:
.claude/plugins/(project-specific installations)
Quick Start Checklist
Minimal viable plugin:
- Create directory:
my-plugin/ - Create
.claude-plugin/plugin.jsonwith at minimum:
``json { "name": "my-plugin" } ``
- Add components (commands, agents, skills, hooks, or MCP servers)
- Test locally:
/plugin install file:///absolute/path/to/my-plugin - Reload:
/plugin reload
Directory Structure
Critical: The .claude-plugin/ directory with plugin.json inside must exist at plugin root.
Component Reference
| Component | Location | File Format | When to Use | |
|---|---|---|---|---|
| Commands | commands/*.md | Markdown + YAML frontmatter | Custom slash commands for repetitive tasks | |
| Agents | agents/*.md | Markdown + YAML frontmatter | Specialized subagents for complex workflows | |
| Skills | skills/*/SKILL.md | Markdown + YAML frontmatter | Reusable techniques and patterns | |
| Hooks | hooks/hooks.json | JSON | Event handlers (format code, validate, etc.) | |
| MCP Servers | .mcp.json | JSON | External tool integrations |
plugin.json Format
Minimal valid manifest:
Complete annotated manifest:
Key points:
nameis required, everything else is optional- Use
${CLAUDE_PLUGIN_ROOT}to reference plugin directory - Commands/agents auto-discovered from
commands/andagents/directories if not listed explicitly - Skills auto-discovered from
skills/*/SKILL.mdpattern
Creating Commands
File location: commands/my-command.md creates /my-command slash command
Nested commands: commands/feature/sub-command.md creates /plugin-name:feature:sub-command
Template:
Frontmatter fields:
description- Brief description shown in/helpallowed-tools- Comma-separated list:Read, Grep, Glob, Bash, Edit, Write, TodoWrite, Taskmodel- Optional:haiku,sonnet, oropus(defaults to user's setting)argument-hint- Optional: shown in help textdisable-model-invocation- Optional:trueto prevent auto-run
Complete example (commands/review-pr.md):
Creating Agents
File location: agents/code-reviewer.md creates agent named "code-reviewer"
Template:
Frontmatter fields:
name- Required: kebab-case identifierdescription- Required: Max 1024 chars, used for auto-delegationtools- Comma-separated list of allowed toolsmodel- Optional:haiku,sonnet, oropus
Complete example (agents/security-auditor.md):
Creating Skills
REQUIRED SUB-SKILL: Use writing-skills for complete guidance on skill structure, testing, and deployment.
Skills follow a specific structure.
File location: skills/my-skill/SKILL.md
Minimal template:
Key principles:
nameuses only letters, numbers, hyphens (no special chars)descriptionstarts with "Use when..." in third person- Keep token-efficient (<500 words if frequently loaded)
- One excellent example beats many mediocre ones
- Use
writing-skillsskill for complete guidance
Creating Hooks
File location: hooks/hooks.json or inline in plugin.json
Standalone hooks file:
Hook events:
PreToolUse- Before tool execution (can block)PostToolUse- After tool executionUserPromptSubmit- When user submits promptStop- When Claude finishes respondingSessionStart- Session initializationSessionEnd- Session cleanupNotification- On Claude Code notificationsSubagentStop- When subagent completesPreCompact- Before context compaction
Matcher patterns:
- Specific tool:
"Bash" - Multiple tools:
"Edit|Write" - All tools:
"*"
Environment variables:
$CLAUDE_EVENT_TYPE- Event type$CLAUDE_TOOL_NAME- Tool being used$CLAUDE_TOOL_INPUT- Tool input (JSON)$CLAUDE_FILE_PATHS- Space-separated file paths
Creating MCP Server Configs
File location: .mcp.json at plugin root or inline in plugin.json
Standalone .mcp.json:
Configuration fields:
command- Executable path or command nameargs- Array of argumentsenv- Environment variables (supports${VAR}or${VAR:-default})
Special variable:
${CLAUDE_PLUGIN_ROOT}- Resolves to plugin root directory
Setting Up Dev Marketplace
For local development, create a marketplace to organize your plugins:
File: dev-marketplace/.claude-plugin/marketplace.json
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/ed3d-extending-claude/skills/creating-a-plugin/SKILL.md
Popularity
- Repository stars
- 158
- Repository forks
- 18
- 7-day trend score
- 25
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 30 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ed3dai/ed3d-plugins/creating-a-plugin)