agentleFS
oopsla5xxoopsla5xx/oops-skills/.claude/skills/write-spec/SKILL.md

write-spec

Skill4 starsChanged 3 months agoMITView on GitHub

Convert clarify-scope discussion into a structured spec file at .ai/tasks/<name>.md. Run after clarify-scope resolves assumptions and scope. Captures decisions before they're lost in conversation history.

28 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use implement-spec-with-codex, close-spec and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • dzhngSkill

    implement-spec-with-codex

    Run [implement-spec](../implement-spec/SKILL.md) with Codex doing the implementation passes while you orchestrate, integrate, and review. Use when the user asks to implement a spec with Codex, or to run implement-spec with Codex as the implementer.

    Also in 4 projects that use this

  • dzhngSkill

    close-spec

    When a spec under specs/<feature>/ is done shipping (a write-spec build, or any planned task that produced a spec), archive it to specs/done/ and rewrite it from a build-plan into a durable rationale — the why, the principles, the invariants — pointing back to the real code for the how. Use when implementation has landed and the plan no longer matches what shipped, or the user says a feature/spec is finished. Pairs with [write-spec](../write-spec/SKILL.md) (the plan this closes) and [review](../review/SKILL.md) (run before closing).

    Also in 4 projects that use this

  • wolverin0Skill

    audit-decisions

    Standardize remediation decisions, baseline-policy entries, and legal-review banners for accepted, deferred, or policy-blocked audit findings.

    Also in 4 projects that use this

  • transitive-bullshitSkill

    compare-screenshots

    Compare screenshots against the intended design, distinguishing approved references from historical baselines. Use for iterative implementation matching, before/after visual review, objective image telemetry, or checking a lone capture for flat, empty, or badly framed content.

    Also in 4 projects that use this

  • LucasMatuszewskiSkill

    audit-agents

    Audit and maintain agent configuration files (.claude/agents, AGENTS.md, CLAUDE.md, agent-memory). Checks for duplicates, outdated info, naming conflicts, wrong technical facts, and files over 200 lines. Fixes all issues and commits.

    Also in 4 projects that use this

  • antonio-orionusSkill

    find-state-machines

    Report every implicit state machine in a project, with its states, transitions and flaws.

    Also in 3 projects that use this

  • +6 more from dzhng

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 4 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 27 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run immediately after clarify-scope completes — don't let context drift away in chat history.

    line 10
  2. Distinctive:

    Does not break anything currently working (regression)

    line 55
  3. Distinctive:

    Before saving, ask yourself:

    line 63
  4. Distinctive:

    If any checkbox is NO → fix before saving.

    line 72
  5. Distinctive:

    After creating the spec:

    line 76
  6. Very specific:

    Update .ai/status.md — add the task to "In Progress" with the start date

    line 77

“Common” is measured: kept by at least 6 in 10 of the 27 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Write Spec

Convert the discussed context (assumptions, resolved questions, confirmed scope) into a structured spec file at .ai/tasks/<task-name>.md.

Run immediately after clarify-scope completes — don't let context drift away in chat history.


Run

Step 1 — Name the task

The name must be: short, kebab-case, describing a specific action.

# Good
add-password-reset
refactor-auth-middleware
fix-order-status-race-condition

# Bad
feature          ← too generic
fix-bug          ← doesn't say what bug
update-stuff     ← meaningless

Step 2 — Fill each section from the discussion context

Open .ai/tasks/TEMPLATE.md as reference, create a new file .ai/tasks/<task-name>.md.

Goal — taken from the discussed objective. Must satisfy both:

  • Specific: know exactly what needs to be done
  • Measurable: know when it's "done"

Bad example: "Improve the auth system" Good example: "User can reset password via email, receives link within 60s, link expires after 1h"

Scope — list specific files/modules from confirmed assumptions:

- src/auth/password-reset.ts (create new)
- src/api/routes/auth.ts (add endpoint)
- src/email/templates/ (add template)

Out of scope — taken from what was explicitly said NOT to do, or inferred from scope boundaries. This is the most important section for preventing scope creep later.

Test plan — minimum 3 cases:

  • Happy path (main flow works correctly)
  • Edge case (boundary input, concurrent request...)
  • Does not break anything currently working (regression)

Constraints — from critical questions answered in clarify-scope. If the user said "backward-compatible" or "must not invalidate existing sessions" → record it here.

Open questions — if any questions remain unresolved after clarify-scope, record them here with a [BLOCKING] tag if they must be answered before coding.

Step 3 — Check spec quality

Before saving, ask yourself:

[ ] Goal: after reading it, do you immediately know what "done" looks like?
[ ] Out of scope: if someone wants to add X to scope, can you reject it using this file?
[ ] Test plan: is there at least 1 case for "does not break what's currently working"?
[ ] Constraints: have the critical questions from clarify-scope been captured?

If any checkbox is NO → fix before saving.

Step 4 — Update status

After creating the spec:

  1. Update .ai/status.md — add the task to "In Progress" with the start date
  2. Confirm with user: "Spec created at .ai/tasks/<task-name>.md. Proceed with implementation?"

When NOT to run this skill

  • Task is small and clear (as assessed by clarify-scope) → no spec needed, proceed directly
  • Spec already exists in .ai/tasks/ → update that file instead of creating a new one

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.