write-a-spec

write-a-spec is a skill for Claude Code from inkeep/open-knowledge-skills. It costs 176 tokens per session (4,724 once invoked), scanned A, original, MIT.

A workflow for turning an accepted software proposal into an implementation specification that explains the current system, planned changes, decisions, questions, migration, and tests.

In plain words
What is it for?
Use it to scope features, define goals and non-goals, document decisions, track open questions, and plan migrations and testing.
Why use it?
It prevents teams from jumping from an idea to coding without understanding the existing system or recording important trade-offs.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is parent_proposal: ./proposals/0004-payment-retries.md # or note the skip.

Part of the software-lifecycle plugin — 6 skills shipped together

Good fit Use it to scope features, define goals and non-goals, document decisions, track open questions, and plan migrations and testing.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/inkeep/open-knowledge-skills
agentmods
npx agentmods add skills/inkeep/open-knowledge-skills/write-a-spec

Made for: Claude Code.

Or install software-lifecycle, the plugin that ships this one along with the rest of its 6 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for write-a-spec

README.md
[![agentmods](https://agentmods.dev/badge/skills/inkeep/open-knowledge-skills/write-a-spec/github.svg)](https://agentmods.dev/skills/inkeep/open-knowledge-skills/write-a-spec)
Your own site
<a href="https://agentmods.dev/skills/inkeep/open-knowledge-skills/write-a-spec"><img src="https://agentmods.dev/badge/skills/inkeep/open-knowledge-skills/write-a-spec/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for write-a-spec

Your own site · 80×15
<a href="https://agentmods.dev/skills/inkeep/open-knowledge-skills/write-a-spec"><img src="https://agentmods.dev/badge/skills/inkeep/open-knowledge-skills/write-a-spec.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 176 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,724 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 3 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Excessive Agency · line 23
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
  • medium Excessive Agency · line 25
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
  • medium Excessive Agency · line 112
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00176 $0.04724
Opus 5.5 $0.00070 $0.01890
Sonnet 5.5 $0.00035 $0.00945
Haiku 4.5 $0.00018 $0.00472

Measured 26d ago against content hash 68558c437844, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

write-a-spec scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 26d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/starter-packs/software-lifecycle/write-a-spec/SKILL.md · 299 lines

How it starts

The opening of the file, as written. The whole thing — 299 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Write a spec — scope a feature and commit an implementation spec

This skill is pack guidance. The platform /open-knowledge skill (read/write/preview/linking/grounding rules) still governs every markdown operation — this layers spec-writing craft on top.

A spec is the contract between "we decided to build this" and "here is how it gets built." It is derived from an ACCEPTED proposal, maps the system that exists TODAY before proposing a change, and records its one-way-door choices in a Decision Log so the reasoning survives the author leaving. A spec that skips the current-system mapping, or resolves its open questions silently, is a liability — it reads authoritative while being unfounded.

specs/ uses a folder-per-spec shape: specs/NNN-name/ holding spec.md, and (when the work is actually going to be built) plan.md + tasks.md. The pack ships all three templates. status on spec.md flows draft → ... → shipped.

Autonomy mode

Mode Behavior How entered
Supervised (default) STOP at the Step 2 scoping gate for user confirmation of Goals / Non-goals / change shape. Route open decisions interactively. Default when a user drives the session.
Headless Auto-confirm the scoping proposal after presenting it; auto-select routing decisions. All other gates (parent-proposal check, current-system mapping, Decision Log, validation, grounding) still enforced. Explicit "don't wait for me", "just proceed", "run headless" — or non-interactive container environments.

In headless mode, propose the scope AND proceed immediately; record in the Decision Log that scope was auto-confirmed without user sign-off.


Mandatory execution order

Hard gates — do NOT skip ahead. If you find yourself about to write ## Design before you have read the actual code the change touches, STOP — you skipped Step 1.

  1. Find the parent proposal. No accepted proposal behind a spec is a smell.
  2. Map the CURRENT system. Read real code + prior specs + guides. Write what exists today, with pointers.
  3. Scoping STOP gate. Propose Goals / Non-goals / change shape. In Supervised mode, WAIT.
  4. Create the spec folder + spec.md from the spec template; allocate NNN by listing, not guessing.
  5. Fill Goals / Non-goals — non-goals temporal, each with a reason.
  6. Design — options considered, one chosen, why; one-way doors flow to the Decision Log.
  7. Decision Log — append the section; each entry survives the author.
  8. Open Questions — a live backlog, each with its closing evidence and decider.
  9. Migration + Test plan — real states, real tiers, explicit gaps.
  10. plan.md + tasks.md — only when the spec is going to be built.
  11. Link + validate — backlinks, dead-links clean, frontmatter complete.
  12. Recap — and what would move it out of draft.

Read the full file on GitHub · 299 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 26d ago Changed 68558c437844
  2. 2mo ago First seen · 299 lines · 176 tokens per session scan A 1e1e2fdc5335

Subscribe to this mod's changes

write-a-spec is a skill published in the GitHub repository inkeep/open-knowledge-skills (17 stars, last pushed 13d ago), licensed MIT. It adds 176 tokens to every session and 4,724 once invoked, about $0.0007 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

write-a-spec compared with skills from other repositories

write-a-spec next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
write-a-specinkeep/open-knowledge-skillsSkill1713d agoMITA176Claude Code
claude-md-improveranthropics/claude-plugins-officialSkill47ktodayApache-2.0A82Claude Code
agent-platform-model-registrygoogle/skillsSkill24ktodayApache-2.0A60Claude Code, Codex
google-cloud-solution-agentic-analytics-spark-knowledge-cataloggoogle/skillsSkill24ktodayApache-2.0A132Claude Code, Codex
glance-canonical-layoutsandroid/skillsSkill10ktodayApache-2.0A56Claude Code
viteantfu/skillsSkill6.1k5d agoMITA49Claude Code, Codex
twitter-readerhimself65/finance-skillsSkill3.5k6d agoMITA110Claude Code