spec-code-review

spec-code-review is a command for Claude Code from ronronner02/codepilot-agent. It costs 8 tokens per session (28,021 once invoked), scanned A, original, MIT.

A command for reviewing code against a specification before judging the implementation.

In plain words
What is it for?
Running specification-based reviews of code changes.
Why use it?
It gives code review a defined workflow, helping reviewers check whether the result matches the stated requirements.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: mentions CLAUDE.md; mentions subagents; names the AskUserQuestion tool.

Good fit Running specification-based reviews of code changes.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/ronronner02/codepilot-agent/spec-code-review
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.

Clone the repo
git clone --depth 1 https://github.com/ronronner02/codepilot-agent

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 spec-code-review

README.md
[![agentmods](https://agentmods.dev/badge/commands/ronronner02/codepilot-agent/spec-code-review/github.svg)](https://agentmods.dev/commands/ronronner02/codepilot-agent/spec-code-review)
Your own site
<a href="https://agentmods.dev/commands/ronronner02/codepilot-agent/spec-code-review"><img src="https://agentmods.dev/badge/commands/ronronner02/codepilot-agent/spec-code-review/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for spec-code-review

Your own site · 80×15
<a href="https://agentmods.dev/commands/ronronner02/codepilot-agent/spec-code-review"><img src="https://agentmods.dev/badge/commands/ronronner02/codepilot-agent/spec-code-review.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 8 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 28,021 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.00008 $0.28021
Opus 5.5 $0.00003 $0.11208
Sonnet 5.5 $0.00002 $0.05604
Haiku 4.5 $0.00001 $0.02802

Measured 1mo ago against content hash c45576f0ef34, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

spec-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 1mo ago.

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/commands/spec-code-review.md · 1,037 lines

How it starts

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

Command support root: .claude/spec-first/workflows/spec-code-review. Treat it as the loaded skill directory whenever this inlined workflow refers to SKILL_DIR or the directory containing SKILL.md.

Code Review

Reviews code changes against intent, tests, standards, and risk lenses. When reviewer dispatch is explicitly authorized and callable, it uses selected personas and merges structured findings; otherwise it performs an honest inline report-only review with degraded coverage.

Workflow Contract Summary

  • 输入: 当前分支、显式 base、远端 branch/PR,及可选 plan/task-pack 上下文。
  • 输出: 默认 report-only 的结构化 findings、actionable queue、coverage、验证限制与 run artifact;mode:agent 返回 JSON。
  • 硬出口: scope/base 不可解析、task context 漂移或越界、错误 checkout、必需独立覆盖不可用时不得给出完整 merge-ready 声明。
  • 权威: source/diff/test/log 提供事实,reviewers 判断语义;review、local mutation、commit 与 landing 是四个独立授权面。
  • 消费者: 人工 reviewer、spec-work、caller-owned shipping/LFG 流程与后续 residual gate。

When to Use

  • Before creating a PR
  • After completing a task during iterative implementation
  • When feedback is needed on any code changes
  • Can be invoked standalone
  • Can run inside larger workflows; use mode:agent when the caller needs JSON instead of markdown tables

Scenario Capability

Follows docs/contracts/workflows/scenario-capability-matrix.md. Overrides: high-risk

  • foreign-residual-workspace -> blocked-action-required: stop before reviewer dispatch that depends on suspect local artifacts, checkout mutation, root-cause-like review claims, or PR-ready verdicts until the named cleanup/init action runs or the user explicitly accepts degraded evidence.
  • optional external-tool evidence unavailable -> fallback-only: use bounded direct source, diff, test, log, and user-provided evidence; disclose missing reviewer/tool coverage and do not claim unconfirmed impact or full review coverage.
  • non-git-build-workspace coverage gaps -> partial: review only the selected repo/inspected build surfaces and directly inspect uncovered modules before claiming they are unaffected.

Read the full file on GitHub · 1,037 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. 1mo ago First seen · 1,037 lines · 8 tokens per session scan A c45576f0ef34

Subscribe to this mod's changes

spec-code-review is a command published in the GitHub repository ronronner02/codepilot-agent (0 stars, last pushed 1mo ago), licensed MIT. It adds 8 tokens to every session and 28,021 once invoked, about $0.0000 per session on Opus 5.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-31.