spec-check
Skill0 starsChanged 55 days agoMITView on GitHub
Spec compliance checker. Given a spec and a branch, compares every requirement against the implementation diff with evidence. Reports per-requirement PASS/FAIL with file:line references and an overall verdict. Use standalone after any spec-driven implementation, or as the verification phase of an orchestrated pipeline.
We split this skill into the rules it gives an agent
8 rules. 0 are common, 6 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
6
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
- Distinctive: line 34
If no spec path provided, STOP and report: "Usage: /spec-check <spec-path> [--branch <branch>]"
- Very specific: line 37
If --branch is provided, use it as the feature branch
- Distinctive: line 43
Read the spec file at the provided path.
- Distinctive: line 54
If the spec uses sections, note which section each requirement comes from
- Very specific: line 66
If the diff is very large (>2000 lines), use --stat first to identify relevant files, then read specific files with the Read tool rather …
- Distinctive: line 74
Test name that verifies the behavior
- Distinctive: line 93
When uncertain, mark FAIL with a note explaining the uncertainty.
- Distinctive: line 136
If you notice issues in these areas, ignore them.
“Common” is measured: kept by at least 6 in 10 of the 3 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 — Spec Compliance Checker
The question this answers: "Given a spec and a branch, does the implementation satisfy the spec?"
One question, cleanly scoped. No code quality, no QA classification, no fix routing.
Usage
/spec-check specs/feature/spec.md # spec path (required)
/spec-check specs/feature/spec.md --branch foo # explicit branch| Parameter | Required | Default |
| Spec path | Yes | — |
--branch | No | Current branch vs default branch |
The spec is the only accepted source of intent. Not handoffs, not tickets, not freeform descriptions. If it's not in the spec, it's not a requirement.
Process
Step 1: Parse Input
Parse $ARGUMENTS for:
- Spec path (required) — first non-flag argument
- Branch (optional) — value after
--branchflag
If no spec path provided, STOP and report: "Usage: /spec-check <spec-path> [--branch <branch>]"
Determine the base branch:
- If
--branchis provided, use it as the feature branch - Otherwise, use the current branch (
git branch --show-current) - Detect the default branch:
git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@'(typicallymasterormain)
Step 2: Read the Spec
Read the spec file at the provided path. Extract every:
- Explicit requirement (functional behavior, data contracts, API shapes)
- Acceptance criterion
- Behavioral expectation
- Input/output contract
- Scope boundary ("not responsible for", "out of scope")
- Constraint or invariant
Extraction rules:
- Number each requirement sequentially (R1, R2, R3...)
- Preserve the spec's own language — do not paraphrase
- If the spec uses sections, note which section each requirement comes from
- Include negative requirements ("must NOT do X") — these are testable too
- Scope boundaries become requirements of the form "implementation does NOT include X"
Step 3: Get the Diff
Run: git diff {default-branch}...{feature-branch}
Also gather:
git diff {default-branch}...{feature-branch} --statfor file change summary- Count of files changed, insertions, deletions
If the diff is very large (>2000 lines), use --stat first to identify relevant files, then read specific files with the Read tool rather than consuming the entire diff.
Step 4: Compare Requirements Against Implementation
For each extracted requirement, determine:
PASS — The implementation satisfies the requirement. Evidence must include at least one of:
file:linereference showing the implementation- Test name that verifies the behavior
- Observable structural evidence (e.g., "route defined at config/routes.rb:47")
FAIL [CRITICAL] — The requirement is missing or fundamentally wrong:
- Required behavior not implemented
- Data contract violated
- API shape doesn't match spec
- Required constraint not enforced
FAIL [MINOR] — The requirement is met in spirit but deviates:
- Naming differs from spec (e.g.,
statusvsstate) - Minor behavioral difference that doesn't break intent
- Implementation order differs from spec's implied order
N/A — The requirement is explicitly deferred or out-of-scope per the spec itself (not per the implementation). Only use this for requirements the spec marks as future work.
Judgment principles:
- The spec is the source of truth. If the implementation deviates, the implementation is wrong — not the spec.
- Evidence must be specific. "Looks like it works" is not evidence. Cite file:line or test names.
- When uncertain, mark FAIL with a note explaining the uncertainty. False positives are better than false negatives.
- Scope boundaries are real requirements. If the spec says "not responsible for X" and the implementation includes X, that's a FAIL (scope creep).
Step 5: Report
Output the compliance report in this exact format:
## Spec Compliance Report
**Spec:** {spec path}
**Branch:** {feature branch} vs {base branch} ({N} files changed, +{insertions}/-{deletions})
### Requirements
| # | Requirement | Status | Evidence |
|---|------------|--------|----------|
| R1 | {extracted from spec} | PASS | {file:line, test reference, or observation} |
| R2 | {extracted from spec} | FAIL [CRITICAL] | {what's missing or wrong} |
| R3 | {extracted from spec} | PASS | {evidence} |
| R4 | {extracted from spec} | FAIL [MINOR] | {deviation description} |
### Verdict: {PASSED / FAILED [CRITICAL] / FAILED [MINOR]}
### Summary
{1-3 sentences on overall compliance state}Verdict rules:
- PASSED — every requirement is PASS or N/A
- FAILED [CRITICAL] — one or more FAIL [CRITICAL]
- FAILED [MINOR] — no critical failures, but one or more FAIL [MINOR]
NOT Responsible For
These concerns are explicitly out of scope. Do not comment on them, do not include them in the report:
- Code quality, duplication, style — that's
/code-review - Running tests, linter, or type checker — that's the implementer's gate check
- QA classification or gap detection — that's
/qa-plan - Fix routing or orchestration — that's the orchestrator's mode resource
- Process compliance — whether handoffs were followed, verification loops were run
If you notice issues in these areas, ignore them. Stay in lane.
Edge Cases
- Spec has no clear requirements — Report this: "Spec does not contain extractable requirements. Cannot perform compliance check."
- Branch has no diff — Report: "No changes found on {branch} vs {base}. Nothing to check."
- Spec references other documents — Only check requirements in the provided spec file. Do not chase cross-references unless they are inlined.
- Ambiguous requirements — Extract them, attempt to evaluate, mark with a note about the ambiguity. Do not skip ambiguous requirements.
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- MelbourneDeveloper/dart_node★ 113same name
- p-larsson/spec-orbit★ 2same name
- OHOKAYYEAH/claude-skills★ 1same 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 repository43 other files it gives its agents.
- skills/technical/supabase-postgres-best-practices/AGENTS.mdAGENTS.md
- skills/technical/supabase-postgres-best-practices/CLAUDE.mdCLAUDE.md
- direct-handoffSkill
- handoffSkill
- nt-commsSkill
- threadsSkill
- meal-planningSkill
- resume-workflowSkill
- bash-scriptsSkill
- code-reviewSkill
- davinci-resolveSkill
- disk-cleanupSkill
- fastmcp-pythonSkill
- go-cliSkill
- markdown-to-pdfSkill
- pr-createSkill
- qa-planSkill
- rcaSkill
- react-native-best-practicesSkill
- ruby-railsSkill
- skill-creatorSkill
- supabase-migrationsSkill
- supabase-postgres-best-practicesSkill
- supabase-sqlSkill
- testingSkill
- ui-state-managementSkill
- waydroid-adbSkill
- calcinatioSkill
- citationsSkill
- exploreSkill
- manual-qaSkill
- nvim-copilotSkill
- orchestrateSkill
- orthogonal-emanationSkill
- product-intent-signal-extractionSkill
- project-management-signal-extractionSkill
- request-researchSkill
- researchSkill
- skill-discoverySkill
- slack-thread-triageSkill
- specSkill
- tmux-sidecarSkill
- youtube-transcribeSkill
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.

