write-a-spec
Scope a feature end to end and write an implementation spec under specs/ from an accepted proposal — current-system mapping, goals/non-goals, a Decision Log for one-way-door choices, a live Open Questions backlog, and a real migration + test plan.
Install / Use
npx skills add inkeep/open-knowledge --skill write-a-specInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Development & EngineeringSupported Platforms
Tags
Our assessment of write-a-spec
write-a-spec scores 95/100 on our quality scale, 368th of 4,698 Development & Engineering skills we index (top 8%).
Its SKILL.md is 19 KB long, well organised into 20 sections with 7 code examples: a thorough specification that gives an agent plenty to work with.
With 4,309 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated about 2 months ago, so write-a-spec is actively maintained.
- Our last check on 2026-11-15 found the source still online.
- It is released under GPL-3.0, a copyleft license: you can use it, but modified versions you distribute must carry the same license.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-09-29. Automated pattern scan on 2026-09-29. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
write-a-spec compared with similar skills
All 4 of these similar skills score higher than write-a-spec; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| write-a-spec (this skill)by inkeep | 95 | 4.3k | 53d ago | SKILL.md |
| taste-skillby Leonxlnx | 100 | 116.8k | 8d ago | CLAUDE.md |
| ai-job-searchby ai-job-search-dev | 100 | 72.1k | today | CLAUDE.md |
| claude-howtoby luongnv89 | 100 | 47.3k | 2d ago | CLAUDE.md |
| lobehubby lobehub | 100 | 85.6k | today | MCP Server |
Frequently asked questions
- How do I install write-a-spec?
- Run
npx skills add inkeep/open-knowledge --skill write-a-spec. The install tabs above show the steps for each supported agent. - Which AI agents does write-a-spec work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is write-a-spec safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It is GPL-3.0-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is write-a-spec still maintained?
- The repository was last updated about 2 months ago, so write-a-spec is actively maintained.
Skill content
View source on GitHubname: write-a-spec
description: "Scope a feature end to end and write an implementation spec under specs/ from an accepted proposal — current-system mapping, goals/non-goals, a Decision Log for one-way-door choices, a live Open Questions backlog, and a real migration + test plan. Read when asked to write a spec, scope this feature, turn this proposal into a spec, plan the implementation, or break this into tasks. Do NOT fire on frame a proposal or write the PRD (sibling frame-a-proposal — a PRD frames a change before it is accepted; this skill starts once one is), record a decision or write the ADR (record-a-decision), write a postmortem (write-a-postmortem), or review this design (review-a-design) — those are separate skills. Complements the platform open-knowledge skill; does not replace it."
compatibility: "Any agent host with the OpenKnowledge MCP server configured. Installed project-local by ok seed --pack software-lifecycle."
metadata:
pack: "software-lifecycle"
author: "Inkeep"
repository: "https://github.com/inkeep/open-knowledge-skills"
Write a spec — scope a feature and commit an implementation spec
This skill is pack guidance. The platform
/open-knowledgeskill (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.
- Find the parent proposal. No accepted proposal behind a spec is a smell.
- Map the CURRENT system. Read real code + prior specs + guides. Write what exists today, with pointers.
- Scoping STOP gate. Propose Goals / Non-goals / change shape. In Supervised mode, WAIT.
- Create the spec folder +
spec.mdfrom thespectemplate; allocateNNNby listing, not guessing. - Fill Goals / Non-goals — non-goals temporal, each with a reason.
- Design — options considered, one chosen, why; one-way doors flow to the Decision Log.
- Decision Log — append the section; each entry survives the author.
- Open Questions — a live backlog, each with its closing evidence and decider.
- Migration + Test plan — real states, real tiers, explicit gaps.
plan.md+tasks.md— only when the spec is going to be built.- Link + validate — backlinks, dead-links clean, frontmatter complete.
- Recap — and what would move it out of
draft.
Step 0: Find the parent proposal
A spec implements a decision that was already made. Before scoping anything, find the accepted proposal it derives from.
exec("ls -A proposals/")— surface the proposal set with frontmatter enrichment.exec("ls -A decisions/")— an accepted proposal often has a matching frozen record here.search({ query: "<feature name or problem statement>" })— semantic match across both folders when the name differs from the filename.- For the 1-2 strongest candidates,
exec("cat proposals/0004-x.md")— read the accepted design and its unresolved questions in full; those unresolved questions become your Open Questions seed.
Route on what you find:
- Accepted proposal exists → note its path; it becomes
parent_proposal:in the spec frontmatter. Proceed to Step 1. - Proposal exists but is not accepted (
draft,fcp,rejected) → STOP. A spec for an un-accepted proposal builds on sand. Surface this: "The proposal<path>is atstatus: <x>, not accepted. A spec should follow an accepted proposal. Want me to help get it accepted first, or proceed anyway?" - No proposal at all → say so plainly: "There's no accepted proposal behind this feature. Specs derive from proposals — the proposal is where we argue whether to build; the spec is how. I can frame a proposal first (that's the
/frame-a-proposalskill), or, if you acknowledge the risk, proceed straight to a spec and record that we skipped the proposal." If the user opts to proceed, record that choice in the Decision Log (Step 6) with its rationale. Do not silently skip it.
HARD GATE: do not create spec.md until the parent-proposal question is resolved one way or the other and, if skipped, acknowledged by the user.
Step 1: Map the CURRENT system before designing the change
The most common spec failure is designing against an imagined system. You cannot write a sound ## Design or a real ## Migration without knowing what the running system does today.
Read the code that exists — with native host tools. Source code (.ts, .py, config, schema) lives OUTSIDE the knowledge base, so read it with the host's native file tools (Read / Grep / Glob), not OpenKnowledge verbs. Trace the actual flow end to end: the entry points, the modules the change will touch, the data shapes, the call chain across boundaries.
Read the knowledge base with OpenKnowledge verbs. Prior specs and guides ARE in-scope markdown:
exec("ls -A specs/")— see what's been specced before; a sibling spec may already map the same subsystem.exec("cat specs/003-x/spec.md")— read the closest prior spec's Design + Migration for the shape and the pointers.exec("ls -A guides/")thenexec("cat guides/<runbook>.md")— runbooks describe operational reality the code alone won't tell you.search({ query: "<subsystem name>" })— surface adjacent decisions and postmortems that constrain the design.
Write what exists today into the spec's Design section as a "Current system" subsection first, with file/module pointers (src/foo/bar.ts, the handleX function, the widgets table). Concrete pointers are what make the spec verifiable and let a reviewer check your map against the code.
HARD GATE: do not draft the proposed ## Design until the current-system map is written with real pointers. If you cannot point at where a behavior lives today, you do not yet understand it well enough to change it.
Step 2: Scoping STOP gate
Before writing the spec body, propose the scope and get confirmation. Getting Goals / Non-goals wrong is expensive to unwind after the spec is drafted.
Present this to the user:
## Proposed scope
**Parent proposal:** [path — or "none; proceeding without one per your acknowledgement"]
**Goals** (what this spec delivers):
1. [Goal — an observable capability or change]
2. ...
**Non-goals** (explicitly out of THIS spec, and why):
1. [Thing] — deferred because [reason]
2. ...
**Shape of the change:** [2-4 sentences: the approach at a high level, and which modules from the Step 1 map it touches]
**Open questions I already see:** [1-3 — the ones that will gate the design]
Supervised mode: STOP and WAIT for confirmation. Do not create the spec folder until the user confirms or adjusts.
Headless mode: present the scope AND proceed; note the auto-confirmation in the Decision Log.
Scoping discipline:
- If the feature is vague, narrow it here, not in the Design. "Which surfaces? For whom? What's explicitly deferred?"
- Name the beneficiary of each goal — a goal with no one who benefits is scope creep.
- Do not invent requirements the proposal never established (see Non-goals for this skill). If a goal isn't traceable to the parent proposal, flag it and ask.
Step 3: Create the spec folder + spec.md
Allocate the next NNN by listing, not guessing:
exec("ls -A specs/")— read the existingNNN-name/folders. Take the highestNNN, add one, zero-pad to the existing width (003→004).- Choose a short kebab-case name from the feature:
specs/004-payment-retries/. - Create the spec:
write({ document: { path: "specs/004-payment-retries/spec.md", template: "spec" } })
The spec template ships frontmatter and these H2 sections in order: ## Goals, ## Non-goals, ## Design, ## Migration, ## Test plan. Fill the frontmatter now:
type: spec
description: "<one line: what this spec delivers>"
status: draft
owner: <user>
target_release:
created: <today YYYY-MM-DD>
parent_proposal: ./proposals/0004-payment-retries.md # or note the skip
tags: [spec]
Set parent_proposal: to the relative markdown path from Step 0. Leave target_release: blank until the plan exists.
Step 4: Fill Goals and Non-goals
Edit the ## Goals and ## Non-goals sections via edit({ ... }).
Goals — each an observable outcome, not an implementation detail. "Failed payments retry with backoff and surface a final status" is a goal; "add a retryCount column" is a design choice. Tie each goal to the beneficiary and, where possible, to the parent proposal's motivation.
Non-goals are TEMPORAL, not eternal. Frame each as "not in THIS spec" with the reason it's deferred — never as "we will never do this." "Multi-currency retries — deferred; the retry engine is currency-agnostic and multi-currency is its own proposal" tells a future reader the door is open and why it's closed for now. "We don't support multi-currency" reads as a permanent product stance the spec has no authority to make. Every non-goal carries its why.
Step 5: Design
Edit ## Design. It has two layers, in order:
- Current system (from Step 1) — what exists today, with file/module pointers. Keep this; it is what makes the proposed change legible.
- Proposed change — the options you considered, the one you chose, and why.
For each meaningful design fork, write: the options on the table, the one chosen, and the reasoning. Name the trade-off you accepted. A design that presents only the chosen option hides the fact that a choice was made — and hides it from the reviewer whose job is to pressure-test it.
Every one-way-door choice goes to the Decision Log (Step 6). A one-way door is a decision that is expensive or impossible to reverse once code ships on it: a wire format, a schema migration that drops data, a public API shape, a security boundary. Reversible choices (an internal helper name, a log level) do not need a log entry — keep the log to decisions that will cost real money to undo.
Step 6: Decision Log
The spec template does NOT ship a Decision Log — you append it. Add an ## Decision Log section to spec.md after ## Test plan. This is the single most valuable artifact in the spec: it is what a new owner reads to understand why the system is shaped the way it is, without having to re-derive it or ask someone who has left.
Each entry is a short block:
Truncated for display — read the full file on GitHub.
Related Skills
taste-skill
116.8kAgent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages
ai-job-search
72.1kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
claude-howto
47.3kA visual, example-driven guide to Claude Code — from basic concepts to advanced agents, with copy-paste templates that bring immediate value.
lobehub
85.6k🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
