Writing specs
Use when the user asks to "create a spec", "specify a feature or fix", "write a specification", or to plan/record a code change before implementing.From its SKILL.md
npx -y skills add iagovrocha/spellbook-agents --skill writing-specsAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
4.1 KB, as published. Nobody here has run it
writing-specs — Technical Specification in XML
Drives the creation of a technical specification and emits it as an XML
document saved to specs/<slug>/spec.xml. This XML is the planning contract —
readable and versionable — later consumed by the running-spec-dev skill, which
derives tasks.json from it and runs the development loop.
When to use
- Specify a
featorfixbefore implementing. - Record goal, scope, requirements, steps, and acceptance criteria in a structured way.
- Produce a versionable artifact that serves as input to
running-spec-dev.
Flow
-
Gather the essentials. Make sure you have:
- Work type:
featorfix. - The goal (the "why") and the desired outcome.
- The scope — what's in and, explicitly, what's out.
- Known constraints (technical, compatibility, data).
If something critical is missing and can't be inferred from the code, ask. Otherwise, record the best hypothesis and mark the requirement with
status="hypothesis". - Work type:
-
Investigate the code. When the spec touches existing modules, read them and cite real
file:linein<context><reference>— never invent paths. -
Fill in the template. Read
references/spec_template.xmland produce the spec by replacing the{placeholders}. Non-negotiable rules:- Well-formed XML: closed tags, quoted attributes, escaped specials
(
&<>). - Stable IDs:
R1,R2… for requirements;number="1","2"… for steps. - Relative dates become absolute (use the current session date in
created). - Remove optional sections (
<technology_stack>,<open_questions>) if unused.
- Well-formed XML: closed tags, quoted attributes, escaped specials
(
-
Save. To
specs/<slug>/spec.xml(create the directory). The<slug>is the spec's identity (the folder carries it, not the file name): kebab-case, short, and descriptive enough to identify the work on its own — e.g.,code-reviewer-skill,fix-token-refresh; avoid generic ones likespec,new-feature, orchange. Don't embed thetypein the slug (it's already a spec attribute and becomes the branchfeat/<slug>|fix/<slug>). Confirm with the user before overwriting an existing spec. -
Validate (feedback loop). Run:
python "${CLAUDE_PLUGIN_ROOT}/skills/writing-specs/scripts/validate_spec.py" specs/<slug>/spec.xmlFix and re-validate until the validator exits with code 0. Only then proceed.
-
Summarize. 2–4 lines of what was specified, plus any open
<open_questions>. If it makes sense, suggest runningrunning-spec-devpointing at the spec.
Structure of spec.xml
Root <spec type="feat|fix" slug="..." created="YYYY-MM-DD">, with children:
| Tag | Required | Content |
|---|---|---|
<title> | yes | Short, specific title |
<overview> | yes | Prose: problem + desired outcome |
<scope> | yes | <includes> / <excludes> |
<context> | yes | `<reference type="file |
<technology_stack> | no | <item> per relevant dependency/constraint |
<requirements> | yes | testable <requirement id priority status> |
<implementation_steps> | yes | <step number><title><tasks> (becomes tasks.json) |
<success_criteria> | yes | verifiable <criterion id> |
<open_questions> | no | unanswered <question> |
Enums
type:feat|fixpriority:high|medium|lowstatus:confirmed|hypothesis|discarded
The canonical template is in references/spec_template.xml.
Best practices
- Testable requirements and criteria — avoid "must be fast"; prefer metrics.
<implementation_steps>is what becomes trackable tasks: each<step>should have concrete, orderable tasks (the natural dependency is the order ofnumber).- Don't duplicate what the code already documents; point to it via
<reference>. - Keep the XML a lean contract, not exhaustive documentation.