Skills use progressive disclosure: only the skill’s
name + description sit in
context at all times, the SKILL.md body loads when the skill is triggered, and bundled
files (templates, scripts, references) load only when Claude reaches for them. So a skill
can carry a lot of detail while costing almost nothing until it’s used.When to write a skill
A skill is the right tool for a repeatable, multi-step task with a known procedure. Prefer the rulesets for always-on conventions, and a skill for on-demand workflows.Use a ruleset (/development/ai/…) | Use a skill |
|---|---|
| Always-on conventions every change must follow | A specific task run on request |
”New files use declare(strict_types=1)" | "Scaffold a new DDD module under src/” |
| Passive knowledge | An active procedure with steps, commands, templates |
Anatomy of a skill
A skill is a directory containing aSKILL.md file, plus any supporting files it
references:
SKILL.md is Markdown with a YAML frontmatter header:
Frontmatter fields
All fields are optional, but a gooddescription is what makes a skill discoverable.
Common ones:
| Field | Purpose |
|---|---|
name | Display label in skill listings. Defaults to the directory name. |
description | The trigger. What the skill does and when to use it. Claude reads this to decide whether to invoke the skill. |
when_to_use | Extra triggering context, appended to the description (shares the same character budget). |
allowed-tools | Tools Claude may use without a permission prompt while the skill is active. |
disable-model-invocation | true = the skill only runs when a human types /name (good for destructive or deploy-style tasks). |
argument-hint | Autocomplete hint, e.g. [module-name]. |
The slash command comes from the directory name, not the
name field — e.g.
.claude/skills/scaffold-module/SKILL.md is invoked as /scaffold-module. Use a clear,
kebab-case directory name.Writing a good description
Thedescription is the single most important line — it’s the only part of the skill
always in context, and it’s how Claude decides when to reach for the skill.
- Write it in the third person: “Scaffolds a…”, “Generates a…”.
- State what it does and when to use it, with the keywords a request would contain (“migration”, “module”, “factory”, “endpoint”).
- Be specific enough that it doesn’t fire on unrelated requests.
What a good skill should have
A concise SKILL.md (< ~500 lines)
Keep the body short and imperative — what to do, not an essay on why. Move long
reference material into separate files the skill links to, so they load only when needed.
Explicit references to bundled files
Point at templates and scripts from the body (“use
templates/services.yaml”) so Claude
knows what exists and when to load it.Alignment with our standards
Cite the rules it must honour by ID (e.g. “follow BE-DB-04/BE-DB-05 for migrations”) so the
skill and the rulesets can’t drift.
Scripts for anything deterministic
If a step is a fixed command or check, bundle a script and have the skill run it, rather
than describing it in prose. Our diff gates (
bin/phpstan-diff.sh, bin/static.sh) are
good things to wire in.Where skills live
| Scope | Path | Use for |
|---|---|---|
| Project | .claude/skills/<name>/SKILL.md | Team skills — commit these to the repo so everyone (and CI agents) get them. |
| Personal | ~/.claude/skills/<name>/SKILL.md | Your own experiments, across all projects. |
| Plugin | <plugin>/skills/<name>/SKILL.md | Skills distributed via a plugin, namespaced plugin:name. |
How to add a skill
Write SKILL.md
Add the frontmatter (at least a strong
description) and the step-by-step instructions.
Keep it under ~500 lines.Add supporting files
Drop any templates, examples, or scripts into the skill directory and reference them from
SKILL.md.Use it
Editing skills under
.claude/skills/ takes effect mid-session — no restart. Type
/scaffold-module, or let Claude auto-invoke it when a request matches the description.Skills follow the open Agent Skills standard, so the same
SKILL.md works for other Claude-based agents and our MCP-connected tooling. To
test-drive and tune a skill’s description, the official skill-creator plugin from the
Claude plugins marketplace can grade it against test cases.Maintenance
- Keep skills and rulesets in sync. When a convention changes, update the skill in the same pull request as the standard it depends on.
- Prune dead skills. A stale skill that scaffolds the old way is worse than none — Claude will follow it confidently.
- Prefer scripts over prose for anything the team already automates, so the skill runs the same gates CI does.