How this skill is triggered — by the user, by Claude, or both
Slash command
/plugin-creator:setupThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are creating a new Claude Code plugin. Follow these steps carefully.
You are creating a new Claude Code plugin. Follow these steps carefully.
Ask the user what they need if not already clear from their arguments:
/my-plugin:skill-name)Use $ARGUMENTS as the plugin name if provided. If the user also provided a description after the name, use that too.
Create the plugin at the current working directory. The structure depends on which components the user wants:
<plugin-name>/
├── .claude-plugin/
│ └── plugin.json # Only plugin.json goes here!
├── skills/ # Skills with SKILL.md files
│ └── <skill-name>/
│ └── SKILL.md
├── commands/ # Simple markdown command files (optional)
├── agents/ # Subagent definitions (optional)
├── hooks/ # Event handlers (optional)
│ └── hooks.json
├── scripts/ # Utility scripts (optional)
├── .mcp.json # MCP server configs (optional)
├── .lsp.json # LSP server configs (optional)
└── settings.json # Default settings (optional)
Critical rule: Never put commands/, agents/, skills/, or hooks/ inside .claude-plugin/. Only plugin.json goes there. All other directories go at the plugin root.
Create .claude-plugin/plugin.json:
{
"name": "<plugin-name>",
"description": "<description>",
"version": "1.0.0",
"author": {
"name": "<author>"
}
}
Optional fields you can add: homepage, repository, license, keywords.
Each skill is a directory under skills/ containing a SKILL.md file:
skills/
└── my-skill/
├── SKILL.md # Required — main instructions
├── references/ # Optional — detailed docs loaded on demand
├── scripts/ # Optional — executable helpers
└── assets/ # Optional — templates, icons, etc.
Write SKILL.md with YAML frontmatter and markdown instructions:
---
name: skill-name
description: What this skill does and when to use it. Be specific about trigger contexts.
---
Instructions for Claude to follow when this skill is invoked.
Key SKILL.md frontmatter fields:
name — display name (defaults to directory name)description — tells Claude when to use the skill (recommended, be slightly "pushy" to ensure triggering)argument-hint — shown during autocomplete, e.g. [filename]disable-model-invocation — set true to make it manual-only (/name)user-invocable — set false to hide from slash menu (background knowledge only)allowed-tools — restrict which tools Claude can use (e.g., Read, Grep, Glob)context — set to fork to run in an isolated subagentagent — which subagent type when context: fork (e.g., Explore, Plan)model — override the model for this skillAvailable substitutions in skill content:
$ARGUMENTS — all arguments passed to the skill$ARGUMENTS[N] or $N — specific argument by index${CLAUDE_SESSION_ID} — current session ID${CLAUDE_SKILL_DIR} — directory containing the SKILL.md!command`` — runs a shell command and injects its output (preprocessing)Skill writing tips:
Create markdown files in agents/ directory:
---
name: agent-name
description: What this agent specializes in and when Claude should invoke it
---
Detailed system prompt for the agent describing its role, expertise, and behavior.
Create hooks/hooks.json:
{
"hooks": {
"PostToolUse": [
{
"matcher": "Write|Edit",
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/scripts/your-script.sh"
}
]
}
]
}
}
Available hook events: PreToolUse, PostToolUse, PostToolUseFailure, PermissionRequest, UserPromptSubmit, Notification, Stop, SubagentStart, SubagentStop, SessionStart, SessionEnd, PreCompact, TaskCompleted.
Hook types: command (shell), prompt (LLM evaluation), agent (agentic verifier).
Use ${CLAUDE_PLUGIN_ROOT} for paths to plugin scripts — this resolves correctly regardless of installation location.
Create .mcp.json at plugin root:
{
"mcpServers": {
"server-name": {
"command": "${CLAUDE_PLUGIN_ROOT}/servers/my-server",
"args": ["--config", "${CLAUDE_PLUGIN_ROOT}/config.json"],
"env": {
"DATA_PATH": "${CLAUDE_PLUGIN_ROOT}/data"
}
}
}
}
Create .lsp.json at plugin root:
{
"language-name": {
"command": "language-server-binary",
"args": ["serve"],
"extensionToLanguage": {
".ext": "language"
}
}
}
Create settings.json at plugin root to activate a custom agent by default:
{
"agent": "agent-name"
}
After creating the plugin, tell them:
# Test the plugin locally
claude --plugin-dir ./<plugin-name>
# Try a skill
/<plugin-name>:skill-name
# Check available skills
/help
# Load multiple plugins
claude --plugin-dir ./plugin-one --plugin-dir ./plugin-two
When the plugin is ready to share:
Installation scopes:
user (default) — available across all projects (~/.claude/settings.json)project — shared via version control (.claude/settings.json)local — project-specific, gitignored (.claude/settings.local.json)If the user wants to convert existing standalone configuration:
commands/, agents/, skills/ from .claude/ to the plugin root.claude/settings.json to hooks/hooks.jsonclaude --plugin-dir.claude/npx claudepluginhub shreda/my-plugin-marketplace --plugin my-first-pluginScaffolds Claude Code plugin packages: gathers requirements, creates directory structure, generates manifest, adds initial skill and README, tests installation. Triggers on 'create plugin', 'new plugin', 'scaffold plugin'.
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.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.