
Spec Best Practices
- 86 installs
- 52 repo stars
- Updated June 24, 2026
- 0xbigboss/claude-code
spec-best-practices is a Claude Code skill that standardizes creating, reviewing, and maintaining SPEC.md files with REQ-* requirement IDs and acceptance criteria.
About
spec-best-practices defines how to create, review, and update SPEC.md files. A developer uses it when authoring a spec or entering a spec gate, ensuring the file has a problem/solution narrative, a domain model, stable REQ-* requirement IDs, invariants, non-goals, and acceptance criteria. It requires reading code before writing spec content and colocating specs with the code they describe.
- Standard for creating, reviewing, and maintaining SPEC.md files
- Requires REQ-* IDs, invariants, non-goals, and acceptance criteria
- Insists specs are evidence-based and colocated with the code they describe
Spec Best Practices by the numbers
- 86 all-time installs (skills.sh)
- Ranked #673 of 1,879 Documentation skills by installs in the Skillselion catalog
- Data as of Jul 30, 2026 (Skillselion catalog sync)
spec-best-practices capabilities & compatibility
- Capabilities
- spec authoring · requirements tracing · acceptance criteria · spec review
What spec-best-practices says it does
**Requirements with `REQ-*` IDs** -- every behavioral requirement gets a stable identifier. Format: `REQ-{DOMAIN}-{NNN}` (e.g., `REQ-AUTH-001`). Append-only; never renumber.
Specs are colocated with the code they describe: root `SPEC.md` for project scope, `apps/foo/SPEC.md` for app scope, `packages/bar/SPEC.md` for package scope.
npx skills add https://github.com/0xbigboss/claude-code --skill spec-best-practicesAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 86 |
|---|---|
| repo stars | ★ 52 |
| Last updated | June 24, 2026 |
| Repository | 0xbigboss/claude-code ↗ |
What it does
Create or review SPEC.md files with stable REQ-* IDs, invariants, non-goals, and acceptance criteria, colocated with the code they describe.
Who is it for?
Creating, reviewing, or updating SPEC.md files and entering a spec gate
Skip if: Ephemeral plan documents describing how and when rather than what and why
When should I use this skill?
Creating, reviewing, or updating SPEC.md files or entering the SPEC gate
What you get
Evidence-based SPEC.md files colocated with their code, with stable REQ-* IDs, invariants, non-goals, and acceptance criteria.
By the numbers
- Requirement ID format REQ-{DOMAIN}-{NNN}, append-only, never renumbered
Files
Naming
Always SPEC.md. No exceptions for the primary spec file. Not feature.spec.md, not SPEC-feature.md.
Supporting documents linked from a SPEC.md TOC may use descriptive names (e.g., commands.spec.md), but only when a root SPEC.md exists and links to them.
Placement
Specs are colocated with the code they describe: root SPEC.md for project scope, apps/foo/SPEC.md for app scope, packages/bar/SPEC.md for package scope.
- Avoid
spec/,docs/specs/, anddocs/plans/directories. Prefer colocatedSPEC.mdfiles. - Plan documents are ephemeral. Absorb durable decisions into the relevant
SPEC.mdand delete the plan doc. - When a spec gets long, add a TOC linking to adjacent supporting files (
./commands.spec.md, etc.). Supporting files live alongside theSPEC.md, not in a subdirectory.
Content
Specs are freeform markdown. No rigid template, no YAML frontmatter, no required section ordering. These elements must be present:
Problem and solution -- narrative context for why this system/feature exists. Lead with the problem.
Domain model -- types, relationships, data flow. For retroactive specs, derive from inspected code.
*Requirements with `REQ- IDs** -- every behavioral requirement gets a stable identifier. Format: REQ-{DOMAIN}-{NNN} (e.g., REQ-AUTH-001`). Append-only; never renumber. Each requirement is testable and traceable.
Invariants -- conditions that must always hold.
Non-goals -- explicit scope boundary. What this spec intentionally does not cover.
Acceptance criteria -- markdown checklist, not prose:
- [ ] Auth endpoint returns JWT with tier claim
- [ ] Rate limiter rejects >100 req/min per IPRisk tags (conditional) -- flag high-risk items (schema migrations, auth changes, public API contracts, infra changes) when those risks exist or the ADF PLAN gate requires approval.
Test traceability (conditional) -- REQ-* to test file:line mapping. Added during/after TDD, not at initial authoring.
Authoring rules
Evidence-based: read code before writing spec content. Do not invent behavior, signatures, or file paths. For retroactive specs, derive requirements from the actual implementation.
Calibrate claim strength to enforcement: match absolutist words ("unrepresentable", "cannot", "structurally caught", "any regression trips the check") to what the check actually proves. If a reviewer can construct a counterexample in under 60 seconds (comment decoy, string literal, shadowed binding, computed path), the SPEC is overclaiming. Either tighten the check, narrow the claim (e.g., "closes the literal-spawn regression; comment/string/shadow-binding cases are covered by the companion test"), or record the gap as an open item. Conservative phrasing backed by evidence beats strong phrasing that invites reject cycles.
Retroactive specs are first-class: documenting existing behavior is valid and encouraged. Read the implementation, extract requirements from actual behavior, note inconsistencies as open items (not silent omissions), map traceability to existing tests.
Mutation policy: do not edit a spec without explicit user direction. When spec/implementation drift is found, surface it immediately. Never silently tolerate or fix drift — the user decides whether to update spec or code.
Spec vs. plan: specs describe what and why; plans describe how and when. Plans are ephemeral. Absorb durable decisions into the spec; delete the plan doc.
Lifecycle
Creation (SPEC gate): see ADF SPEC gate in CLAUDE.md for gate requirements. Determine placement, read existing file and identify gaps (or create at the correct colocated path), ensure all required elements are present.
Maintenance: update spec when behavior changes; append new REQ-* IDs, never renumber; add test traceability as tests are written; cross-check spec against implementation whenever both are in context and surface drift.
Retirement: when a feature is removed, remove or archive its SPEC.md. Do not leave stale specs describing deleted behavior.
Related skills
FAQ
Where should a SPEC.md live?
Colocated with the code it describes: root SPEC.md for project scope, apps/foo/SPEC.md for app scope, avoiding spec/ and docs/specs/ directories.
What is the difference between a spec and a plan?
Specs describe what and why; plans describe how and when and are ephemeral, so durable decisions get absorbed into the spec and the plan is deleted.