code-review

A code-review command that asks a separate read-only coding agent to inspect selected files or recent changes and report findings before fixes are made.

In plain words
What is it for?
Use it to review a diff or chosen files, receive structured findings, decide which fixes to approve, and apply those fixes in the main session.
Why use it?
It separates finding problems from changing code, so you get a review without immediately altering the project. It also helps focus the review on staged, unstaged, or explicitly selected work.

Command

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 commands/filip-podstavec/claude-leverage/code-review
Clone the repo
git clone --depth 1 https://github.com/Filip-Podstavec/claude-leverage
Per session 25 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 678 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.00025 $0.00678
Opus 5 $0.00013 $0.00339
Sonnet 5 $0.00005 $0.00136
Haiku 4.5 $0.00003 $0.00068

Measured yesterday against content hash c3e637b3f254, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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.

bench/archive-token-savings-thesis/commands/code-review.md · 57 lines

How it starts

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

Context

Status: !git status --short Staged shortstat: !git diff --cached --shortstat Unstaged shortstat: !git diff --shortstat Recent commits: !git log --oneline -5

Your role

You are orchestrating a two-phase code review:

  • Phase 1: a Sonnet-based subagent reviews the code and returns structured findings.
  • Phase 2: you (the main session) apply approved fixes.

You do NOT review the code yourself. The subagent does that. Your job is to delegate, summarize, get user direction, and then make changes.

Workflow

  1. Determine review scope:

    • If $ARGUMENTS contains file paths, review those.
    • Otherwise, if there are staged changes, review the staged diff.
    • Otherwise, if there are unstaged changes, review those.
    • If nothing is changed, ask the user what they want reviewed.
  2. Capture session-decisions context (recommended for non-trivial sessions). If you made non-obvious choices during this session that the subagent could waste output re-litigating, capture them as 2-5 lines of explicit constraints to pass alongside the diff. Examples:

    • "Chose REST over GraphQL — team alignment, do not suggest GraphQL"
    • "Skipped retry logic — handled at gateway, do not flag missing retries"
    • "Used pattern X to match existing code in src/foo/, not the more 'idiomatic' Y"

    Do NOT pass full session history. If no such non-obvious decisions exist, skip this step. The point is to prevent wasted review effort on already-settled questions, not to bias the review's independence.

  3. Invoke the code-reviewer subagent with the scope and (if step 2 produced any) the constraints block. Wait for its structured report.

  4. Present findings to the user. Keep your summary concise. Use the subagent's priority sections (Critical / Important / Nice to have). Do not editorialize - the subagent already prioritized.

  5. Ask for direction. Offer these options:

    • Apply all critical and important findings
    • Apply specific findings (user picks which)
    • Skip fixes, the user will handle it

Read the full file on GitHub · 57 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 · 57 lines · 25 tokens per session scan A c3e637b3f254

Subscribe to this mod's changes

code-review is a command published in the GitHub repository Filip-Podstavec/claude-leverage (68 stars, last pushed 28d ago), licensed MIT. It adds 25 tokens to every session and 678 once invoked, about $0.0001 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.