From plugin-master
Guides development of skills for Claude Code plugins including structure, SKILL.md format, frontmatter writing, progressive disclosure, trigger phrases, and best practices.
npx claudepluginhub josiahsiegel/claude-plugin-marketplace --plugin plugin-masterThis skill uses the workspace's default tool permissions.
---
Creates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
Skills are modular knowledge packages that extend Claude's capabilities with specialized workflows, domain expertise, and bundled resources. They transform Claude from a general-purpose agent into a specialized expert.
Skills use progressive disclosure - a three-level loading system that manages context efficiently:
skill-name/
├── SKILL.md # Required: Core instructions
├── references/ # Optional: Detailed documentation
│ ├── patterns.md # Loaded when Claude needs detail
│ └── advanced.md
├── examples/ # Optional: Working code examples
│ └── example.sh # Users can copy and adapt
├── scripts/ # Optional: Executable utilities
│ └── validate.sh # Token-efficient, deterministic
└── assets/ # Optional: Output resources
└── template.html # Used in output, not loaded into context
Only create directories you actually need. A minimal skill is just SKILL.md.
---
name: skill-name
description: |
This skill should be used when the user asks to "specific phrase 1",
"specific phrase 2", "specific phrase 3". Include exact phrases users
would say that should trigger this skill.
---
Description rules:
Trigger phrase completeness checklist: Before finalizing a skill description, verify it covers:
Good example:
description: |
This skill should be used when the user asks to "create a hook",
"add a PreToolUse hook", "validate tool use", or mentions hook events
(PreToolUse, PostToolUse, Stop). Provides hook development guidance.
Bad examples:
description: Use this skill when working with hooks. # Wrong person, vague
description: Provides hook guidance. # No trigger phrases
description: Load when user needs hook help. # Not third person
Write the entire skill body using imperative/infinitive form (verb-first instructions):
Correct (imperative):
To create a hook, define the event type.
Configure the MCP server with authentication.
Validate settings before use.
Start by reading the configuration file.
Incorrect (second person):
You should create a hook by defining the event type.
You need to configure the MCP server.
You can use the grep tool to search.
# Skill Title
## Overview
[Purpose and when to use - 2-3 sentences]
## Quick Reference
[Tables with key facts, common values, or patterns]
## Core Content
[Essential procedures and workflows - the main value]
## Additional Resources
### Reference Files
- **`references/patterns.md`** - Common patterns
- **`references/advanced.md`** - Advanced techniques
### Example Files
- **`examples/example.sh`** - Working example
| Target | Words |
|---|---|
| Ideal | 1,500-2,000 |
| Maximum | 3,000 (absolute hard limit) |
If SKILL.md exceeds 2,000 words, move detailed content to references/ files.
Size enforcement process:
wc -w or estimate ~5 words per line.references/.Within a single SKILL.md, never repeat the same table, list, or block of content. Before adding any table or reference block, search the file for similar content already present.
Across SKILL.md and references/, information lives in one place only. If a detailed table is in references/patterns.md, SKILL.md should contain only a brief summary and a pointer to the reference file — not a copy of the table.
Identify concrete examples of how the skill will be used. Ask:
Analyze each use case to identify what reusable resources would help:
scripts/references/assets/examples/mkdir -p plugin-name/skills/skill-name/{references,examples,scripts}
touch plugin-name/skills/skill-name/SKILL.md
Only create directories you actually need.
name and descriptionAfter using the skill on real tasks:
| Mistake | Fix |
|---|---|
| Weak trigger description ("Provides guidance") | Add specific phrases: "create X", "configure Y" |
| Missing synonyms in description | Add informal terms users actually type: "slow report" not just "performance optimization" |
| Duplicate table/block within same SKILL.md | Search the file before adding any table — never repeat the same content block |
| Everything in one SKILL.md (8,000 words) | Move details to references/, keep SKILL.md under 2,000 |
| Second person ("You should...") | Imperative form ("Configure the server...") |
| Missing resource references | Add "Additional Resources" section listing references/ and examples/ |
| Duplicated content across files | Put info in SKILL.md OR references/, never both |
| Same block copied into multiple SKILL.md files | Cross-cutting content (platform guidelines, etc.) belongs in the agent body or one shared reference — NEVER copied into each skill |
| Wrong person in description | Third person: "This skill should be used when..." |
| Description too long (>500 chars) | Condense description; use plugin.json keywords for breadth |
| Agent body duplicates skill content | Agent is a lean orchestrator — domain knowledge belongs in skills only |
| Skill body too large (>3,000 words) | Split into core SKILL.md + references/ files |
Claude Code automatically discovers skills:
skills/ directory for subdirectories containing SKILL.mdNo configuration needed - just place SKILL.md in the right location.