tommymorgan:code-review

A change-focused code review command that checks a diff for code, tests, comments, errors, types, or simplification issues. It can repeat the review after fixes until no findings remain.

In plain words
What is it for?
Use it to review changed code, inspect test quality, find silent failures, assess types or comments, simplify code, and optionally run repeated fix-and-review cycles.
Why use it?
It helps catch problems in the changes you made and verifies that attempted fixes actually resolve the reported issues.

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/tommymorgan/claude-plugins/code-review
Clone the repo
git clone --depth 1 https://github.com/tommymorgan/claude-plugins
Per session 23 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,991 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.00023 $0.01991
Opus 5 $0.00012 $0.00996
Sonnet 5 $0.00005 $0.00398
Haiku 4.5 $0.00002 $0.00199

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

Security

Grade A, and why

tommymorgan: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 2d 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.

tommymorgan/review/commands/code-review.md · 225 lines

How it starts

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

Code Review Orchestrator

Multi-agent code review with an optional fix loop that re-reviews after every fix cycle until the review comes back clean (not just until fixes are applied).

Step 1: Parse Arguments

Parse $ARGUMENTS for four things:

Review Aspects

Valid aspect keywords:

  • code — general code review
  • tests — test quality analysis
  • comments — comment quality analysis
  • errors — silent failure detection
  • types — type design analysis
  • simplify — code simplification
  • all — run all auto-detected agents (default when no aspect specified)

Fix Mode

  • fix — enable fix loop with default max of 5 iterations
  • fix:N (e.g., fix:3) — fix loop with N max iterations
  • If absent: review-only mode

Execution Mode

  • parallel — run review agents simultaneously
  • If absent: sequential (default)

Auto Mode

  • auto — after the review agents produce findings, automatically dispatch the expert panel to debate every finding, then accept their consensus without prompting the user. Implies fix (defaults to fix:5 if no explicit fix:N).
  • If absent: interactive mode (present findings to user, fix loop requires user to invoke)

When auto is enabled:

  1. Review agents run and produce findings (Steps 2-5)
  2. Expert panel reviews ALL findings (not just in fix mode) — debates and reaches consensus
  3. Consensus is applied automatically: APPROVE → fix as suggested, MODIFY → fix with panel's revision, REJECT → skip
  4. Fixer agent applies all approved/modified fixes
  5. Full re-review cycle runs (Steps 2-5 again)
  6. Loop continues until clean or max iterations

The user sees progress updates but is never prompted for decisions. This is the "hands-off" mode for when you trust the review pipeline.

Step 2: Determine Diff

2a: Check for an open PR

gh pr view --json baseRefName -q .baseRefName 2>/dev/null

2b: Get the diff

  • If a PR exists: git diff $(git merge-base <base> HEAD) — includes committed and uncommitted changes
  • If no PR: git diff $(git merge-base main HEAD) — all branch changes. If empty, fall back to git diff HEAD for uncommitted-only.

Read the full file on GitHub · 225 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. 2d ago First seen · 225 lines · 23 tokens per session scan A 24138dbe4ebb

Subscribe to this mod's changes

tommymorgan:code-review is a command published in the GitHub repository tommymorgan/claude-plugins (4 stars, last pushed 1mo ago), licensed MIT. It adds 23 tokens to every session and 1,991 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-31.