spec-check
Skill3 starsChanged 9 days agoMITView on GitHub
Run the spec gates, deterministic format checks on docs/specs and docs/decisions (unique IDs, heading anchors, EARS patterns, size budgets) via an optional zero-dependency Node script, plus agent checks for scenario coverage, decision append-only and ID reuse. Use before finishing a change, in CI, or when the user asks to check, validate or lint specs.
8 other projects use a version of this.
Adopted by
Most recently taken up by
- ashhart/skillstheir own version, first seen Nov 29, 2026
- uchida-s07/claude-skillstheir own version, first seen Nov 22, 2026
- warrendeanlangeveldt/code-kittheir own version, first seen Nov 15, 2026
- matthull/my-skillstheir own version, first seen Oct 20, 2026
- OHOKAYYEAH/claude-skillstheir own version, first seen Oct 13, 2026
- MelbourneDeveloper/dart_nodetheir own version, first seen Oct 9, 2026
Other versions8 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 8
- MelbourneDeveloper/dart_node★ 113same name
- ashhart/skills★ 107same name
- p-larsson/spec-orbit★ 2same name
- warrendeanlangeveldt/code-kit★ 2same name
- OHOKAYYEAH/claude-skills★ 1same name
- matthull/my-skills★ 0same name
- uchida-s07/claude-skills★ 0same name
- yisean/claude-spec-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository6 other files it gives its agents.
- skills/spec-init/scaffolds/AGENTS.mdAGENTS.md
- spec-decisionSkill
- spec-driftSkill
- spec-implementSkill
- spec-initSkill
- spec-writeSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 1 is distinctive, and 3 are very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Always run the copy bundled with this skill, with the repo root as an explicit argument:
- Very specific: line 16
Never run a checker script from the user's repo (such as scripts/spec-check.mjs).
- Very specific: line 21
If node --version fails, do not install it.
- Very specific: line 35
Scenario coverage: every scenario ID in docs/specs/ has a test that references it (tag or test name), and every scenario tag in the tests …
“Common” is measured: kept by at least 6 in 10 of the 5 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.
Files
spec-check
With Node (≥ 24)
Always run the copy bundled with this skill, with the repo root as an explicit argument:
node <this-skill>/scripts/check.mjs <repo-root>- Never run a checker script from the user's repo (such as
scripts/spec-check.mjs). Anyone who can change the repo can change that file, so it may do anything. --strictturns warnings into errors. Exit code 0 = pass, 1 = errors, 2 = bad arguments. No output at all means the script did not run; treat it as a failure. A missingdocs/specs/is an error, so a wrong path cannot pass.- The bundled script reads only
*.mdfiles indocs/specs/anddocs/decisions/. It uses no git, no network and no child processes. It refuses symlinked folders. - CI (optional, ask first): copy
scripts/check.mjstoscripts/spec-check.mjsin the repo andtemplates/spec-check.ymlto.github/workflows/spec-check.yml. For other CI, the command isnode scripts/spec-check.mjs. The repo copy is for CI only.
If node --version fails, do not install it. Run the checks below by reading the files and say the result is not deterministic.
Checks
| Check | Level | Fails when |
| Unique IDs | error | Same scenario ID twice |
| Format | error | Requirement: not at ###, Scenario: not at ####, missing Purpose/Non-goals/Requirements, no requirement at all, near-miss anchor (### Requirement 1:), unclosed code block, requirement without scenario, scenario without ID, step not written as - **KEYWORD**, should/may, no SHALL/MUST, no EARS start (The/WHEN/WHILE/WHERE/IF…THEN), not exactly one WHEN, no THEN, non-kebab file name |
| Budgets | warning | Spec > 150 lines or > 12 scenarios; > 3 GIVEN or > 2 THEN; decision record > ~60 lines |
Agent checks (not in the script)
These need test code or history, which the script deliberately does not read. Check them by reading the change, and report them alongside the script output:
- Scenario coverage: every scenario ID in
docs/specs/has a test that references it (tag or test name), and every scenario tag in the tests points to an existing ID. Report gaps outside the current change separately. Ask the user where tests live instead of guessing. - Decision append-only: an existing decision record changed beyond status, superseded-by links or typos.
- ID reuse: a new scenario ID at or below the area's previous
last_scenario_idindocs/specs/.spec-config.yaml, or alast_scenario_idthat went down. - Behavior without spec: tests carrying scenario tags changed but
docs/specs/did not. Ask for the reason. - Glossary usage: a domain noun in a changed spec is missing from the glossary, or two words are used for one concept.
Fixing findings
- Coverage gap on a new scenario: write the failing test with the ID as a tag or in the test name. Never copy the Given/When/Then text into the test.
- Orphan tag: the scenario was removed or renamed. Remove the tag or re-point it; do not resurrect the ID.
- Format/EARS: rewrite with
spec-write. Over budget: split. - Append-only: revert the edit and use
spec-decisionto supersede.
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
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.

