spec-audit

An adversarial review of a project specification before any code is written. It checks both the design and whether the specification matches the user's actual request.

In plain words
What is it for?
It is for reviewing specifications, finding design gaps, checking boundaries and related components, and confirming that the planned work solves the requested problem.
Why use it?
It catches missing cases, inconsistent plans, and misunderstandings while changes are still cheaper than rewriting finished code.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/ashkaan/contextium/spec-audit
Any agent
npx skills add Ashkaan/contextium --skill spec-audit
Clone the repo
git clone --depth 1 https://github.com/Ashkaan/contextium

Made for: Claude Code, Codex.

Per session 77 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,099 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00077 $0.03099
Opus 5 $0.00039 $0.01550
Sonnet 5 $0.00015 $0.00620
Haiku 4.5 $0.00008 $0.00310

Measured 3d ago against content hash 2b0040aa6fbc, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

spec-audit 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 3d ago.

The scan reads SKILL.md. This mod also ships 3 executable files (scripts/check-materiality.sh, scripts/format-trailer.sh, scripts/parse-review-output.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

templates/claude/skills/spec-audit/SKILL.md · 236 lines

How it starts

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

/spec-audit — review the design before it becomes code

A SPEC is the cheapest place in the loop to be wrong. A missing boundary case costs one line to add here and a rewrite to add after the code exists. This skill attacks the SPEC while fixing it is still cheap.

Two reviewers run, and they have different jobs:

  • The independent reviewer (spec-review.sh) attacks the design — gaps, boundary cases, peers left inconsistent, a shape bigger than the ask.
  • The spirit-check agent reads only the user's verbatim ask and the behavior contract, and answers one question: does the SPEC describe the thing that was actually asked for? It catches the failure the design reviewer structurally cannot — a SPEC that is internally excellent and solves the wrong problem.

Critical

  • The reviewer should not be the author. Claude wrote the SPEC, so a Claude reviewer shares the blind spot that produced it. spec-review.sh runs the review on a different model when one is installed. When none is (exit 3), fall back to a fresh-context agent — and say so, in the summary and in the trailer, so nobody reads reduced independence as full independence.
  • A reviewer that could not run is a FAILED audit, not a clean one. Exit 1 and 124 mean the review did not happen. Report it unavailable; do not emit a passing trailer.
  • Findings get fixed or argued, never deferred. Accept and Edit, or push back with a reason and let round 2 settle it. "Track it for later" is not a third option per @rule:no-deferral.
  • Non-material edits skip. A typo fix does not spend a reviewer call. Step 1 decides that deterministically so the judgment is not re-litigated each time.

step-1-materiality — is this change worth a review?

bash .claude/skills/spec-audit/scripts/check-materiality.sh <spec-path>

material:<reason> runs the audit. non-material:<reason> emits the skipped trailer and exits:

bash .claude/skills/spec-audit/scripts/format-trailer.sh skipped-non-material wording-polish

Read the full file on GitHub · 236 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 3d ago First seen · 236 lines · 77 tokens per session scan A 2b0040aa6fbc

Subscribe to this mod's changes

spec-audit is a skill published in the GitHub repository Ashkaan/contextium (32 stars, last pushed 6d ago), licensed MIT. It adds 77 tokens to every session and 3,099 once invoked, about $0.0004 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-08-30.