From claude-skills
Spec-driven development where the spec is the source of truth. Append-only, numbered spec entries under specs/entries/ fold into a generated specs/SPEC.md — the consistent current view — and code implements that view. Every behavior-changing PR carries a spec entry. Use this skill whenever the repo contains a specs/entries/ directory — every feature request, behavior change, bug fix, or "what should X do" question in such a repo goes through it, even if the user never says "spec". Also use it when the user mentions spec-driven development, writing or updating specs or requirements before coding, keeping specs in sync with code, auditing code against a spec, or adopting specs in an existing codebase.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-skills:spec-drivenThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
The spec works the way a bank ledger works: entries are **append-only**,
The spec works the way a bank ledger works: entries are append-only, newer entries override older ones, and serializing (folding) them always yields one consistent current view. Code exists to implement that view.
specs/entries/ are never edited
after they merge. To change a requirement, append a new entry that
redefines or retires it. Why this matters: reviewers approved those entries
as written. Editing one rewrites history people already relied on;
corrections are new entries.specs/SPEC.md is generated, never hand-edited. It is the fold of the
entries. Regenerate it with python specs/fold_spec.py fold after
appending an entry.SPEC.md, the implementation, and tests that
cite the requirement IDs they verify.| Situation | Do this |
|---|---|
Repo has specs/entries/ and the user asks for any feature, change, or fix | Making a change below — even if they never mention specs |
| User wants spec-driven development in a brand-new project | Init below |
| Existing codebase without specs; user wants to adopt them | Bootstrap — read references/bootstrap.md |
| "Does the code still match the spec?" | Audit below |
| "What is X supposed to do?" | Read specs/SPEC.md and answer, citing requirement IDs |
An entry is needed iff the change alters what the system should do — behavior added, changed, or removed.
python specs/fold_spec.py check, then read
specs/SPEC.md. If check reports staleness, run fold and inspect the
diff before trusting the view.python specs/fold_spec.py new "Short title"
scaffolds the next-numbered file. Fill in Why and Requirements. Mint new
IDs with next-id <PREFIX>; reuse an existing ID to redefine it; list
removals under ## Retires. Format essentials below; full details in
references/entry-format.md.python specs/fold_spec.py fold — fix any validation errors.
The resulting SPEC.md diff is the contract for this change; it should
read exactly like what the user asked for.[API-7] in the test name or docstring.
This is what makes audits mechanical later.python specs/fold_spec.py check passes, the test
suite passes, and the commit/PR message references the entry number and
the requirement IDs it touched.specs/entries/0007-rate-limiting.md:
---
title: Rate limiting for the public API
date: 2026-06-10
---
## Why
Abuse incidents on /search; we need per-key limits.
## Requirements
- **API-9**: Public endpoints MUST enforce a rate limit of 100 requests
per minute per API key.
- **API-10**: Rate-limited responses MUST return HTTP 429 with a
Retry-After header.
- **API-3**: Search results MUST be capped at 50 items per page.
- **API-11** (supersedes API-4, API-5): Authentication failures MUST return
401 with a machine-readable error code.
## Retires
- **API-6**: CSV export is removed from the public API.
The override semantics:
API-9, API-10) → new requirement. Mint with next-id API.API-3) → redefinition; at fold time the newest text wins.(supersedes API-4, API-5) → those requirements are closed and replaced
by this one. Use when restructuring, not for simple edits.## Retires → behavior removed with no replacement.Requirement style: one testable behavior per ID; MUST/SHOULD/MAY; concrete values; describe what the system does, not how it's implemented. Read references/entry-format.md before writing your first entry of a session, and whenever an entry involves supersedes, retires, or feature description blocks.
specs/fold_spec.py is self-contained (Python 3.8+, stdlib only). If a
spec-driven repo is missing it, copy it from this skill's
scripts/fold_spec.py.
python specs/fold_spec.py new "Title here" # scaffold the next-numbered entry
python specs/fold_spec.py next-id API # next free requirement number for a prefix
python specs/fold_spec.py validate # lint: duplicate/revived/unknown IDs, parse problems
python specs/fold_spec.py fold # validate + regenerate specs/SPEC.md
python specs/fold_spec.py check # validate + fail if SPEC.md is stale (CI-friendly)
specs/entries/ and copy this skill's scripts/fold_spec.py to
specs/fold_spec.py.0001-<project-slug>.md capturing the initial intended behavior —
even if it's three requirements. The first entry is a starting point, not
a grand design document.python specs/fold_spec.py fold, then implement to the view.python specs/fold_spec.py check plus the test
suite keeps entries, view, and code from drifting on every PR.python specs/fold_spec.py check — the view must match the entries before
anything else is checked against it.SPEC.md, look for evidence: implementing
code, and tests citing the ID. Grep for the IDs first; read the code where
grep comes up empty.Provides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub mesbahtanvir/claude-skills --plugin claude-skills