spec-spine: Skill for Claude Code

.claude/skills/code-review/SKILL.md

code-review is a skill for Claude Code from statecrafting/spec-spine. It costs 37 tokens per session (1,582 once invoked), scanned A, original, Apache-2.0.

A read-only review of the current code difference, or diff, against its expected specification and project rules. It reports correctness bugs, contract drift, and broken invariants with file and line evidence.

In plain words
What is it for?
It helps review committed and uncommitted changes, inspect affected source and configuration, and run checks that confirm compilation and index freshness.
Why use it?
A change can pass basic checks yet still violate its intended behavior or the rules governing the affected files.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions CLAUDE.md; mentions AGENTS.md.

This is statecrafting/spec-spine's own configuration. It tells Claude Code how to work on spec-spine itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything spec-spine configures →

Reuse

Borrowing it

Nothing to install: this file belongs to statecrafting/spec-spine. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/statecrafting/spec-spine/main/.claude/skills/code-review/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/statecrafting/spec-spine

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for code-review

README.md
[![agentmods](https://agentmods.dev/badge/skills/statecrafting/spec-spine/code-review.svg)](https://agentmods.dev/skills/statecrafting/spec-spine/code-review)
Your own site
<a href="https://agentmods.dev/skills/statecrafting/spec-spine/code-review"><img src="https://agentmods.dev/badge/skills/statecrafting/spec-spine/code-review.svg" alt="Measured on agentmods" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,582 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00037 $0.01582
Opus 5 $0.00018 $0.00791
Sonnet 5 $0.00007 $0.00316
Haiku 4.5 $0.00004 $0.00158

Measured yesterday against content hash 15b731dbe74f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

code-review scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/code-review/SKILL.md · 140 lines

How it starts

The opening of the file, as written. The whole thing — 140 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/code-review: correctness, spec drift, invariants

Reviews the current diff against three questions: does the change have correctness or edge-case bugs, does it still match its owning spec's contract, and does it hold the invariants the project's path-scoped rules name. Output is an evidence-oriented findings list, each line citing file:line. Nothing authored is modified. The gate's read-only forms (compile --check, index check) are used so the review never dirties the tree; a stale verdict is itself a finding.

Step 0: scope the diff

git fetch origin main
git status --short && git diff --stat && git log --oneline -10
git diff origin/main...HEAD --stat    # committed delta
git diff HEAD --stat                  # uncommitted delta
git diff origin/main...HEAD --name-only; git diff HEAD --name-only

Note which classes changed: source, specs (specs/**/spec.md), standards (standards/**), the harness (.claude/**, AGENTS.md, CLAUDE.md, workflows), scripts, docs, derived shards.

Step 1: the gate stays green

spec-spine compile --check                      # exit 2: committed registry shards are stale
spec-spine index check                          # exit 2: committed index shards are stale
spec-spine lint --fail-on-warn
spec-spine couple --base origin/main --head HEAD
spec-spine index coverage                       # ownership: unclaimed and floor-only files

then the stack's own build, tests, and lints as AGENTS.md lists them.

  • A couple failure is the headline finding: cite the file the gate named and the owning spec whose declared edges fail to cover it.
  • An unclaimed file from coverage is a finding against the implementing spec's establishes.
  • A lint or freshness failure is a corpus finding: cite the diagnostic verbatim. Stale shards mean the change forgot to run compile and index and commit the result; the fix is to do that, not to hide it.

Step 2: spec-contract match

For each changed source file, confirm the change is consistent with the contract of its owning spec rather than only with the gate's mechanical pass. Governed reads, through the CLI:

Read the full file on GitHub · 140 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 140 lines · 37 tokens per session scan A 15b731dbe74f

Subscribe to this mod's changes

code-review is a skill published in the GitHub repository statecrafting/spec-spine (10 stars, last pushed today), licensed Apache-2.0. It adds 37 tokens to every session and 1,582 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-07.

Related

Other skills, from other repositories

adversarial-reviewer

Adversarial code review that assumes bugs exist and hunts for them. Use when asked to review code, find bugs, audit for correctness, stress-test a PR, or when someone says "tear this apart" or "what's wrong with this". Give no benefit of the doubt — every line is guilty until proven innocent.

emdash-cms/emdash · 71 tokens

gsd-ns-review

Route to the appropriate quality / review skill based on the user's intent. gsd-code-review-fix was absorbed by gsd-code-review --fix in #2790.

open-gsd/gsd-core · 16 tokens

issue

Use when starting a chain from a GitHub issue — turning an issue URL or number into a triaged, planned, dispatched, and reviewed pull request. Classifies the thread (bug → root-cause discipline, feature → plan chain, question → drafted reply), synthesizes a spec from the issue's own acceptance criteria, then runs the…

jeremylongshore/tons-of-skills-marketplace · 115 tokens

gitnexus

A code-graph analysis add-on for examining an existing codebase, including symbols, call paths, execution flows, and effects across repositories. It can query GitNexus through its command-line or MCP interfaces.

hashgraph-online/awesome-codex-plugins · 58 tokens

cleanup-code-inspections

Reduce technical debt and improve code quality by systematically resolving static analysis warnings.

flutter/flutter-intellij · 19 tokens

superlint

This skill describes the mandatory standard operating procedure for using our internal SuperLint tool. Use this when tasks require fixing code quality issues according to corporate standards.

mgechev/skillgrade · 0 tokens