skill-writing
When to use
Use this skill when:
- Creating a new skill from scratch
- Improving an existing skill
- Reviewing skill quality
- Deciding what belongs in a skill vs a rule
Typical examples:
- "Create a skill for X"
- "This skill needs improvement"
- "Should this be a skill or a rule?"
Do not use this skill when:
- Writing rules (rules are constraints, not workflows)
- Writing commands (commands are direct invocations)
Goal
- Create executable skills, not documentation
- Ensure every skill answers: When? How? What output?
- Prevent common mistakes: too broad, too generic, missing validation
Preconditions
- Clear understanding of the intended task
- Distinction: rules = always apply, skills = triggered workflows
- Access to a skill template or existing reference skill
Decision matrix: What goes where?
Before creating anything, classify the content:
| If the content is... | Then it is... | Action |
|---|---|---|
| An always-true constraint ("never X", "always Y") | Rule | Create/update .augment/rules/ |
| A step-by-step workflow with decisions and validation | Skill | Create/update .augment/skills/ |
| A coding convention or reference material | Guideline | Create/update .augment/guidelines/ |
| Baseline model knowledge (how jq works, what docker exec does) | Nothing | Do not create anything |
| Simple tool usage without complex workflow | Nothing | Do not create anything |
| Already covered by an existing skill/rule/guideline | Update | Extend the existing file |
The critical test
Ask: "Does the model need this to do its job correctly?"
- If the model already knows it → Nothing
- If the model knows it but does it wrong in THIS project → Rule or Guideline
- If the model needs a multi-step workflow to get it right → Skill
Skills and commands share the `.claude/skills/` namespace
Skills in src/skills/{name}/SKILL.md AND commands in
src/domains/{domain}/{name}/command.md both project into
.claude/skills/ (see scripts/condense.ts →
generate_claude_skills + generate_claude_commands). Claude treats
the whole directory as native skills.
Implications for skill authors:
- If a same-name command already exists, the skill takes priority and
the command is skipped (generate_claude_commands honors this).
Don't reuse a command's slug for a skill unless the command should
retire.
- Both artifacts compete on
descriptionfor routing. A weak skill
description is shadowed by a stronger same-domain command — and vice
versa. Make trigger phrasing precise (§ 1b below).
- When the workflow has both a "user types
/foo" path AND a "model
picks this up from intent" path, author the skill first and let the
command delegate (skills: frontmatter). Two artifacts with the same
trigger surface fight each other in the router.
When "Nothing" is the right answer
Do NOT create a skill or rule for:
- Standard tool usage (jq, grep, docker exec, git commands)
- Framework basics the model already knows
- Single-command operations without decision logic
- Knowledge that belongs in a skill's procedure as a step, not as its own skill
Size and structure hints
→ See docs/guidelines/agent-infra/size-and-scope.md for full limits.
- Target: 300–900 words. A word or line count is never by itself a reason to split — § Progressive disclosure says when to.
- Over the 400-line K6 cap → the router-head contract in
templates/skill.md
applies: entry head (when-to-use · mode table · routing) plus one tasks/ or
references/ file per mode, and the head never inlines more than one mode's
procedure. Gated by lint_skill_router_head with a shrink-only allowlist.
- If multiple workflows exist → split into multiple skills
- If two skills overlap heavily → merge
- If a skill becomes "read the guideline" → it lost its purpose, restore the workflow
Progressive disclosure — the directory is `references/`, plural
When a skill needs depth the workflow does not, the depth goes in a
references/ subdirectory beside SKILL.md — that exact name, plural. It
was two spellings across nine skills until 2026-08-12 because nothing here
named one; the split cost a rename, not a decision.
- Body: the trigger, the workflow, the ownership statement, and every
heuristic that changes a write decision. A skill whose body is a map to its
own content is loaded and not applied. So a split head keeps every such
heuristic and all five required sections (When to use, Gotcha,
Procedure, Output format, Do NOT); only step execution moves out.
references/: corpora, lookup tables, long schemas, worked examples —
read on the path that needs them, never on every activation.
Split for one of two reasons only: the material is genuinely consulted on
demand, or a procedure needs to be handed out in order. Never split to hit a
number. The measured estate (n=289, 2026-08-12): median 1,077 words, p90 1,867,
only 6 skills above 2,500 and 4 above 3,000 — a skill at 1,500 words is
ordinary, and the load-bearing part stays in the body even when that leaves the
file long.
A references/ split does not change the gates that already apply: a
token_budget_class: rich skill still meets its 3,500-token ceiling on the
body alone.
Four words: reference, co-requirement, procedure, chain
- A reference is context loaded on demand from the skill's own
references/. It stays one level deep: a reference file links no sibling
reference of its own skill, so the head reaches every one.
lint_skill_link_reach holds today's sibling links as a shrink-only ratchet.
requires_skillsis co-availability — the named skill ships wherever this
one does. It states no order.
- A procedure is the ordered steps of one skill. Held as data, it is a
sidecar beside SKILL.md that names only files of the same skill.
- A chain between skills is not supported (the skill-DAG lock, ADR-263).
Prose such as "then invoke X" is a hint to the reader, not a chain link.
Modes
This skill is a router head. The decision layer above — what goes where, the
critical test, the namespace note, the size and progressive-disclosure hints —
is true across every mode and stays here, as do the Frugality Standards below.
The procedure body and the section-pattern catalogue live in references/; load
the one the task calls for.
| Task | Mode body | Covers |
|---|---|---|