/skills:writing-specsfrom skills
Guiding principles for writing and editing a project's specifications, under docs/specs/ unless its AGENTS.md says otherwise. Load BEFORE writing or editing any spec, and again before rewriting a section.
Ships in skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Write a specification someone can build from, and keep it the size of the product, not of its history.
Fix the meaning of each heading level and hold to it:
Do not add, remove, rename, or reorder H2 sections unless asked. If a change seems to need a new H2, say so in the reply and ask before adding it.
An agent builds from this document. A person decides from it.
The agent needs every requirement present, or it invents one. The person needs each requirement stated once, or they stop reading. A requirement stated once and concretely serves both.
A sentence belongs in the spec only if it states a requirement: something a user, a caller or another program can observe, where two correct implementations could not differ. Commands, flags a person types, settings and their defaults, exit statuses, files a person reads, formats, messages, and the bounds a person sets or waits on.
Ask who would see it. If only the program's own parts would, such as another module, an adapter's interface, a script's steps, or a file or field only the program reads, it is how the code works. So is a threshold or interval the code picked to detect something, which no person sets, a time limit on work nobody waits for, and the condition the code tests. State when a behaviour applies in terms the user knows, such as "after a push", not as the comparison that detects it.
Everything else is true and worth keeping, and it has a home that is not the spec:
| It is | It goes in |
|---|---|
| How the code works: functions, fields, internal files, the argv it builds, wrappers, locks, races, polling, retries | The code and its tests |
| The bug, its cause, the case a fix covers, why the change was made | The pull request |
| What a dependency does, the version it was seen on, a measurement | A note, where the project keeps them |
| What is not built, not measured, or still open | An issue |
| A prompt or template the program sends, in full or as a list of its points | The code. The spec says in a sentence what it must carry |
A dependency's behaviour enters the spec only as what the product does about it: "gives up on the package registry after 30 seconds and exits 1", not why the registry is slow or how the wait is timed.
A change description, an issue or a pull request is the brief the code was built from. The spec takes the requirements out of it and leaves the rest. Most of a good brief does not belong in the spec.
Write from what a user sees, not from the brief. Before writing, list what a user would see change: a message, an exit status, a file, a setting, a bound they wait on. Write the spec text from that list, then check the list against the brief. A brief with a bullet per case does not make a spec with a sentence per case; a bullet that adds nothing to the list stays out, however true. Every item on the list is stated, each failure's exit status and message included: a spec short of a requirement is as wrong as one that holds the code. A case the brief says behaves as an existing rule does is already stated. Where the product fails safe, leaving a thing as it was or trying again later, say nothing about it unless a user would act on it.
Not this: "After an install, the CLI lists its cache, reads each entry's lockfile, and deletes entries unused for 30 days. It spends at most 5 seconds on this, and an entry it cannot read is kept for the next install."
This: "After an install, the CLI deletes cache entries unused for 30 days."
The same holds where the change only states what the code already does. The code is in front of you then, and it is the change most likely to copy it.
The existing text is not the model for what to add. A section that already holds argv, internal fields or a log line for every case is not permission to add more of them. State the new requirement at the level this skill sets, and name the section in the reply as one to trim. Where the change makes such detail wrong, such as a command line the code no longer builds, delete it rather than update it.
A brief's flags and command lines are the code's. Where the brief gives the flags or command lines the program passes to another program, the spec says what the call does, such as "resumes the session by its id", and names none of them.
For every edit:
When asked to trim a spec or a section, remove whole passages that fail "What goes in", and keep every requirement, bound, default, exit status and format. Move what has a home there before deleting it. The pull request lists each removed passage by kind and where it went.
The project's main specification, which its AGENTS.md names, is the worked
example of structure and voice, not of length or of detail.
Where the project has prose rules, such as .claude/rules/prose.md, they govern
the sentences themselves, and specs are in their scope.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub jacygao/skills --plugin skills12 skills in this plugin
/cutting-releasesFor a project that has shipped and tracks releases in GitHub milestones. How a release's GitHub milestone becomes a version bump, a tag and a GitHub Release. Load BEFORE cutting a release./executing-milestonesFor a project built from nothing, planned in docs/specs/milestones.md — not one that tracks releases in GitHub milestones. How a planned milestone's issue tree yields the issues ready to work, which working-issues then dispatches. Load BEFORE executing a milestone./planning-milestonesFor a project built from nothing, planned in docs/specs/milestones.md — not one that tracks releases in GitHub milestones. How a named milestone there becomes an epic issue and one sub-issue per subtask. Load BEFORE planning a milestone or filing its issues./triaging-issuesFor a project that has shipped and tracks releases in GitHub milestones. How open GitHub issues get a priority and a release milestone, and how a release's issues are made small enough for one pull request each. Load BEFORE triaging issues or planning a release./working-issuesHow GitHub issues become worktrees, subagent briefs, and verified pull requests — one issue, or every ready issue in a milestone. Load BEFORE dispatching implementation work to subagents./writing-agents-mdWhat goes in a project's AGENTS.md or CLAUDE.md, what goes elsewhere, and how the file is laid out. Load BEFORE creating, restructuring or adding a section to one.