Agent skill

Close Spec

by dzhng in dzhng/skills

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…

MITAuto-check passedProduct & Project Management

Install Close Spec

skills CLI
$ npx skills add dzhng/skills --skill close-spec -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install dzhng/skills close-spec --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/dzhng/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/engineering/close-spec .claude/skills/close-spec && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
close-spec
GitHub stars
1k
Token cost
~1.6k tokens
SKILL.md length
893 words
Files
1
Skills in repo
27
Repo updated
First seen
Licence
MIT

At a glance

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…

  • Works in 7 steps: Confirm it shipped. The feature is… → Diff plan against reality. Read the… → Move it. specs// → specs/done// (use git… → …
  • Implementation has landed and the plan no longer matches what shipped
  • SKILL.md covers Workflow, Smell Test and Done
  • Calls git

What it does

Close Spec is an agent skill from dzhng/skills. 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)…

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Product & Project Management, covering PRD writing. The repository describes itself as: Reusable AI agent skills for software factories: explore ideas, write specs, implement, review, and run autonomous research. Works with Claude Code, Codex, and other… The licence is MIT.

When your agent uses it

  • Implementation has landed and the plan no longer matches what shipped
  • The user says a feature/spec is finished

Example prompts

  • “/close-spec”

Workflow steps

7 steps, taken from the first numbered list in SKILL.md.

  1. Confirm it shipped. The feature is merged or working in-tree and its
  2. Diff plan against reality. Read the spec's README and slices, then read
  3. Move it. specs// → specs/done// (use git mv).
  4. Rewrite the README as a record, not a plan. Keep
  5. Collapse the slices, preserve the imagery. The slices were the build
  6. Fix references. Update links that pointed at the old path. If [[memory]]
  7. Audit every statement, unbiased. Spawn sub-agents that did not write the

What it can do on your machine

Read from SKILL.md and the folder at commit d513228. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Close Spec loads about 1.6k tokens when it runs. Until then it costs about 137 tokens; SKILL.md has 893 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~137
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from dzhng/skills at commit d513228, republished under its MIT licence (© dzhng). 893 words, ~1,614 tokens.

Download SKILL.mdSave it as .claude/skills/close-spec/SKILL.md (or your agent's skills folder).
name
close-spec
description
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).

Close Spec

A spec is a build plan while you're building and a rationale record once you've shipped. Closing flips it from one to the other. The plan was a ladder of slices and predictions; the record is the layer of meaning the code can't hold — why this exists, what it must never break, what you tried that failed. The code is the single source of truth for how; the closed spec is the source of truth for why, and a map into the code.

Do not summarize the implementation. Anyone can read the code. If a paragraph restates what a function does, cut it and point at the function instead.

Workflow

  1. Confirm it shipped. The feature is merged or working in-tree and its tests/screenshot gates are green. If slices remain unverified, it isn't done — finish or review first.

  2. Diff plan against reality. Read the spec's README and slices, then read what actually landed. Note every place the build diverged from the plan: dropped slices, renamed seams, a mechanic that turned out different, an assumption that broke. The divergences are the most valuable thing to record — they're exactly what a future reader would otherwise re-derive.

  3. Move it. specs/<feature>/ → specs/done/<feature>/ (use git mv). Single-file specs: specs/<feature>.md → specs/done/<feature>.md.

  4. Rewrite the README as a record, not a plan. Keep:

    • Overview & purpose — what shipped and the problem it solves, in present tense ("the economy settles monthly"), not future ("will add").
    • The reason — why it works this way and not the obvious alternatives; the constraints and trade-offs that forced the shape. This is the part the code cannot tell you.
    • Principles & invariants — the rules the implementation must keep honoring. What must stay true; what would silently break if violated.
    • Pointers into the code — greppable module/type/function names, file paths, and the tests that pin the behavior. Send the reader to the code for mechanics; name the entry points so they can find it in one grep.
    • Dead ends — approaches tried and rejected, with the reason, so nobody re-walks them.
    • Visual provenance — any images that were uploaded as a baseline to match, a comparison target, or inspiration for the look. These are the requirement: they say what "done" had to resemble and why the result took the shape it did. Keep them in-tree and reference them from the README, naming where each came from (a real screenshot, a mood board, a reference game) and what it was driving. Without them a reader sees the outcome but not the standard it was held to.

    Cut: slice-by-slice build order, "next we will…", scaffolding instructions, per-slice verification checklists, and any prose that re-narrates code.

  5. Collapse the slices, preserve the imagery. The slices were the build ladder; once shipped they're sediment. Fold anything durable (a divergence, a dead end, an invariant a slice established) into the README, then delete slices/. But keep the baseline, comparison, and inspiration images — the references the work was measured against — and the visualizations/ or assets/ that still help a reader judge the result. These are provenance, not scaffolding: discard a build instruction, never the picture that defined what the build was aiming at. Wire each one into the README's visual-provenance trail so the story of where the requirement came from survives the close.

  6. Fix references. Update links that pointed at the old path. If [[memory]] notes or other skills referenced the spec, repoint them.

  7. Audit every statement, unbiased. Spawn sub-agents that did not write the spec and lack the conversation, and have them check the final document claim by claim against the actual code and tests. Fan out — one agent per section, or split the claim list across agents — so no single biased pass waves it through. Each agent returns a verdict per statement:

    • Pointer (a named module/type/function/file/test) — does it exist and say what the spec says? Flag stale names and wrong paths.
    • Invariant / principle — is it actually enforced in the code, or just asserted? Flag claims the code contradicts or doesn't back.
    • Overview / reason — is it consistent with what shipped, present tense, no leftover "will"/"next"/slice numbers?
    • Visual provenance — do the referenced baseline/inspiration images still exist in-tree, and does the README say where each came from and what it drove? Flag a result shown with no standard it was held to.

    Treat unsupported, contradicted, or stale statements as defects: fix the spec (or the pointer) and re-audit the changed claims. The spec is not closed while any statement is unverified.

Show full SKILL.md (152 more words)Show less

Smell Test

  • Could a reader reconstruct this paragraph by reading the code? → cut it, leave a pointer.
  • Does it say "will" or "next" or name a slice number? → it's still a plan.
  • Did a real decision diverge from the plan and go unrecorded? → that's the one thing worth keeping; add it.
  • Was there a baseline or inspiration image you were matching against? → keep it and say what it drove; the result is meaningless without the standard.

Done

The spec lives under specs/done/, reads as why-and-what-must-hold rather than how, names the code that implements it, preserves the baseline and inspiration imagery the work was measured against, and every statement has survived an unbiased audit against the code. A fresh reader gets the intent, the invariants, and the visual standard without the code — the story of why it's done and how the decisions were made — and the mechanics by following the pointers into it.

© dzhng, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/engineering/close-spec of dzhng/skills.

Open the folder on GitHubat commit d513228

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders. This page covers the copy in dzhng/skills, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Close Spec next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Close Spec compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Close Spec this skilldzhng/skills1k—~1.6kAutomated safety check: PassMIT
CCPM Project Managementautomazeio/ccpm8.4k—~1.1kAutomated safety check: PassMIT
Ralph Tui Create Beadssubsy/ralph-tui2.5k1 repos~2.6kAutomated safety check: PassMIT
Trellis Brainstormanjiemo/SunnyBeach1787 repos~4kAutomated safety check: PassApache-2.0
Adversarial Speczscole/adversarial-spec5561 repos~8.3kAutomated safety check: NotesMIT
Ralph Tui Create Beads Rustsubsy/ralph-tui2.5k1 repos~2.8kAutomated safety check: PassMIT

Similar skills

  • Runs a spec-driven workflow from PRD to epic to GitHub issues to parallel agents, with status, standup and blocked-work reports from bundled scripts.

    8.4k GitHub stars~1.1k tokensUpdated 6 mo ago
    Product & Project ManagementAuto-check passed
  • Ralph Tui Create Beads

    subsy/ralph-tui

    Convert PRDs to beads for ralph-tui execution. An agent skill from subsy/ralph-tui.

    2.5k GitHub starsUsed in 1 repo~2.6k tokens
    Product & Project ManagementAuto-check passed
  • Trellis Brainstorm

    anjiemo/SunnyBeach

    Guides collaborative requirements discovery before implementation.

    178 GitHub starsUsed in 7 repos~4k tokens
    Product & Project ManagementAuto-check passed
  • Adversarial Spec

    zscole/adversarial-spec

    Iteratively refine a product spec by debating with multiple LLMs (GPT, Gemini, Grok, etc.) until all models agree.

    556 GitHub starsUsed in 1 repo~8.3k tokens
    Product & Project ManagementAuto-check: notes
  • Convert PRDs to beads for ralph-tui execution using beads-rust (br CLI).

    2.5k GitHub starsUsed in 1 repo~2.8k tokens
    Product & Project ManagementAuto-check passed
  • Runs a guided product-manager interview that classifies each question automatically and produces a Product Requirements Document.

    6.2k GitHub starsUsed in 1 repo~5.7k tokens
    Product & Project ManagementAuto-check passed

More from dzhng/skills

All 27 skills in this repo
  • Compare screenshots against the intended design, distinguishing approved references from historical baselines.

    1k GitHub stars~2.6k tokensUpdated 2 days ago
    Auto-check passed
  • Claude

    dzhng/skills

    Use Claude Code as an independent claude -p subagent when the user explicitly asks for Claude, wants a second-agent opinion from Claude, or asks to delegate a well-scoped task to Claude.

    1k GitHub stars~1.3k tokensUpdated 2 days ago
    Auto-check passed
  • Refactor Clean

    dzhng/skills

    Refactor cleanly instead of layering sediment. An agent skill from dzhng/skills.

    1k GitHub stars~3.1k tokensUpdated 2 days ago
    Auto-check passed
  • Write Skills

    dzhng/skills

    Create or revise agent skills. An agent skill from dzhng/skills.

    1k GitHub stars~2.7k tokensUpdated 2 days ago
    Auto-check passed
  • Codex

    dzhng/skills

    Use the local Codex CLI as an independent second agent. An agent skill from dzhng/skills.

    1k GitHub stars~2.4k tokensUpdated 2 days ago
    Auto-check: warnings
  • Run [implement-spec](../implement-spec/SKILL.md) with Codex doing the implementation passes while you orchestrate, integrate, and review.

    1k GitHub starsUsed in 1 repo~543 tokens
    Auto-check passed

Questions about Close Spec

What does Close Spec do?

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…. Close Spec is an agent skill from dzhng/skills. 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.

When should I use Close Spec?

Close Spec fits situations like: implementation has landed and the plan no longer matches what shipped; the user says a feature/spec is finished.

How do I install Close Spec in Claude Code?

Run `npx skills add dzhng/skills --skill close-spec -a claude-code`. Or copy the skill folder (skills/engineering/close-spec in dzhng/skills) into .claude/skills/close-spec in your project. Claude Code loads it when a task matches its description.

How do I install Close Spec in Codex?

Run `npx skills add dzhng/skills --skill close-spec -a codex`. Or copy the skill folder (skills/engineering/close-spec in dzhng/skills) into .agents/skills/close-spec in your project. Codex loads it when a task matches its description.

Can I use Close Spec in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add dzhng/skills --skill close-spec -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/close-spec, .gemini/skills/close-spec, .github/skills/close-spec and .opencode/skills/close-spec in your project.

What does Close Spec need to run?

Going by SKILL.md and its folder, Close Spec needs the command-line tools its instructions call (git).

Does Close Spec access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Close Spec safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Close Spec use?

Close Spec is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Close Spec use?

About 1.6k tokens (SKILL.md is roughly 6.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Close Spec?

Skills that share tags, products or a category with Close Spec: CCPM Project Management (automazeio/ccpm, 8.4k stars), Ralph Tui Create Beads (subsy/ralph-tui, 2.5k stars), Trellis Brainstorm (anjiemo/SunnyBeach, 178 stars) and Adversarial Spec (zscole/adversarial-spec, 556 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Close Spec?

dzhng (a GitHub user) maintains it in dzhng/skills, which has 1,016 GitHub stars. The repository holds 27 skills in this directory. The repository was last updated on October 5, 2026.

Source: dzhng/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.