1. Where It Fits
- Before implementation, when the ticket is still ambiguous.
- Before PR review, when generated code needs evidence.
- Before API rollout, when consumers need a clear contract.
- After incidents, when the team needs a spec gap analysis.
A skill is a folder with a SKILL.md in it. That is the whole mechanism. What makes it worth using for spec work is when it loads: a spec template you paste by hand is a habit you have to remember, while a skill is instructions the agent pulls in on its own when the task matches. This page covers what goes in the file, which location wins when two skills share a name, and where a spec belongs when the alternatives are CLAUDE.md, a slash command, or a subagent.
Two parts: YAML frontmatter between --- markers, then Markdown instructions the agent follows once the skill is active. One rule catches people out — the opening --- has to be the file's first line. Put anything above it and the whole file, markers included, is treated as skill content.
.claude/skills/spec-packet/SKILL.md
---
name: spec-packet
description: Turn a ticket into a reviewable spec before any code is written. Use when the request names a feature, a bug, or an API change but leaves scope, failure paths, or evidence undecided.
allowed-tools: Read Grep Glob
---
Write the spec first. Do not propose an implementation in this turn.
## Required sections
goal / non-goals / roles / behaviour / failure paths /
acceptance criteria (AC-1..n) / evidence per criterion / rollback
## Rules
- Every empty field stays `{to-be-filled}`. Never invent a requirement.
- Assumptions go in "Open questions", not into the body as fact.
- Acceptance criteria describe behaviour, never file names.
See [reference.md](reference.md) for the filled refund example.
The fields worth knowing for spec work:
| Field | What it does | Why it matters for a spec skill |
|---|---|---|
description | Tells the agent what the skill does and when to use it. This is what automatic invocation is decided from. | The highest-leverage line in the file. Write the trigger conditions, not a summary — "use when scope or failure paths are undecided" fires; "helps with specs" does not. |
name | Display label in listings. For personal and project skills the command comes from the directory name, not this field. | Renaming the folder renames the command. Renaming this field does not. |
when_to_use | Extra invocation context, appended to the description in the listing. | Room for the negative cases: when the ticket is already specified, skip. |
allowed-tools | Tools pre-approved for the turn that invokes the skill. The grant clears on the next user message. | A drafting skill needs to read the repo, not write to it. Read, Grep and Glob are usually the whole list. |
disable-model-invocation | Set true and only a person can run it, by name. The description stays out of context entirely. | Correct for anything with side effects — a skill that commits, deploys, or files a ticket should never fire on its own reading of the room. |
paths | Glob patterns that gate automatic activation to matching files. | Scope an API-contract skill to openapi/** so it stays quiet during unrelated work. |
Six of these fields travel: name, description, license, compatibility, metadata and allowed-tools are part of the open Agent Skills specification. The rest are Claude Code extensions. If a skill is meant to be shared outside one tool, keep it to the six.
Four locations, and they override each other in a fixed order. This matters the first time a personal skill quietly shadows the project one your team agreed on.
| Location | Path | Scope | Precedence |
|---|---|---|---|
| Enterprise | Managed settings directory | Every user in the organisation | Highest |
| Personal | ~/.claude/skills/<name>/SKILL.md | All of your projects | Beats project |
| Project | .claude/skills/<name>/SKILL.md | This repository | Beats plugin |
| Plugin | <plugin>/skills/<name>/SKILL.md | Wherever the plugin is enabled | Lowest, namespaced plugin:skill |
Two more rules with practical consequences. A .claude/skills/ directory in a subproject loads under its own qualified name (/apps/web:review), so a monorepo can ship one spec skill per package without collisions. And SKILL.md should stay under about 500 lines — detail belongs in sibling files linked from it, which are read only when the agent needs them. That last property is the reason a skill beats a long CLAUDE.md for reference material: the filled example costs nothing until someone asks for it.
All four can hold spec instructions. They differ in when the content loads and what it costs, which is the only question that decides where a spec belongs.
| Mechanism | Loads | Put this there |
|---|---|---|
CLAUDE.md | Every session, every turn | Facts true for all work in the repo: the stack, the commit convention, the test command. Not a procedure. |
| Skill | On demand, by name or by matching the description | The spec template, the review checklist, the ticket-to-spec procedure. Anything you would otherwise paste. |
| Slash command | Only when a person types it | A short one-file prompt with no supporting material. Skills win a name clash. |
| Subagent | In its own forked context | Work whose intermediate output you do not want in the main thread — a wide review pass, for instance. A skill can run this way with context: fork. |
The rule of thumb that follows: if you have pasted the same instructions twice, that is a skill. If it is a fact rather than a procedure, it belongs in CLAUDE.md. One caveat on scale — the skill listing gets a budget of roughly one percent of the context window, and when descriptions overflow it the least-used ones are dropped first. Thirty half-considered skills degrade the ones you rely on.
The Claude Code spec template on this site is written to be pasted at the start of a run. That works, right up until someone forgets. Moving the same content into a skill changes the failure mode: the agent loads it because the request matched, not because a person remembered.
.claude/skills/spec-packet/ ├── SKILL.md the procedure and the rules (keep it short) ├── reference.md the filled refund example, loaded on demand └── criteria.md the acceptance-criteria patterns Committed to the repo, so every reviewer gets the same procedure and changes to it show up in a pull request.
Three things are worth getting right when you do this. Write the description as trigger conditions, because that string is the only thing standing between a skill and never being used. Keep allowed-tools to reads, so a drafting skill cannot start editing the repository it is describing. And put the long filled example in a sibling file rather than in SKILL.md — it is the part you want available and the part you do not want resident in context all day.
What does not change: a skill drafts, a person still approves. The boundaries below are the same whether the procedure arrives by paste or by frontmatter.
A spec skill follows the same discipline visible in tools such as Superpowers: clarify the spec before planning, turn the plan into bounded work, use tests and review gates, and keep human approval separate from AI output. If you are comparing OpenSpec, Superpowers, and GitHub Spec Kit, start with the SDD patterns comparison, then decide which artifacts your team actually needs.
After two weeks, compare three signals: fewer clarification comments, clearer acceptance tests, and fewer PR review surprises. If those do not improve, narrow the workflow before adding more automation.
A strong spec skill starts with a bounded artifact and ends with something reviewers can mark up. The output should not be a polished essay. It should be a draft with decisions, assumptions, missing inputs, and tests.
Input: - Ticket: "Add bulk user disable for workspace admins" - Template: feature-spec.md - Required sections: goal, non-goals, roles, API behavior, audit log, rollback, acceptance criteria Expected skill output: - Spec draft with unresolved questions called out - 8-12 Given/When/Then acceptance criteria - Risk register for permission mistakes, partial failures, and audit gaps - Reviewer checklist for product, backend, QA, and support
Editorial note: the field reference above follows the Claude Code skills documentation and the open Agent Skills specification, both linked under References. The workflow patterns are how Spec Coding would use a skill inside a spec-first delivery process — adapt them to your team before adoption.
Adopt a spec skill only when it improves the artifact reviewers already need. If the team gets more text but not clearer decisions, the workflow is too broad. Narrow the task to one repeatable handoff and measure whether review comments become more specific.
The useful question is not whether the draft sounds good. It is whether another engineer can implement from it with fewer clarifying messages.
Choose one workflow first: ticket to spec, API diff to review note, incident to postmortem seed, or acceptance criteria rewrite. Do not automate the whole delivery process on day one.
Track whether specs need fewer clarification comments, whether QA can derive tests earlier, whether generated PRs include evidence, and whether reviewers find missing risks before implementation.
Pause adoption when outputs invent requirements, hide unresolved questions, bypass product/security review, or cannot be traced back to a prompt and source artifact.
Before running a workflow, list the exact source artifacts the skill may use: ticket URL, product note, existing spec, API schema, error table, or incident timeline. If a requirement is not in one of those sources, the output should label it as an assumption rather than presenting it as approved scope.
Before accepting the draft, check that every section maps to a reviewer action. Product should be able to approve scope, engineering should be able to inspect API or data behavior, QA should be able to derive tests, and support should see customer-visible failure states.
Before generated code ships, require evidence tied back to the spec: passing tests, API diff review, migration rollback notes, feature flag state, and the metric or alert that proves the workflow is healthy after deployment.
No. It can draft and critique the spec, but the approved artifact still needs human ownership, version history, and test evidence.
Start with a narrow ticket-to-spec workflow. It has clear inputs, a visible output, and obvious review questions, so the team can judge quality quickly.
Require source references, explicit assumptions, concrete examples, and a rejection pass for vague words such as "fast", "robust", "simple", and "seamless".
Pair a spec skill with a reusable template and a review checklist. That keeps AI output close to the decisions the team actually has to approve.
The field reference on this page follows the official documentation linked under References. The workflow patterns are Spec Coding's own editorial position, not a guarantee about any tool's behaviour. Use the patterns here as reusable review habits.
CLAUDE.md used on this page.Field names verified against the linked documentation on 2026-09-08. External documentation changes; check the source before relying on a specific field.