review-diff-opus

review-diff-opus is an agent for Claude Code from yacb2/aidex. It costs 0 tokens per session (854 once invoked), scanned A, original, MIT.

An adversarial code-review agent for inspecting a delegate's code changes before they are committed. It looks for mistakes in comparisons, counting rules, boundary conditions, and null or empty cases, even when the tests pass.

In plain words
What is it for?
Use it to review a returned diff, compare the implementation with its intended behavior, and identify untested inputs that could cause defects.
Why use it?
A passing test suite may not cover the inputs that make a condition wrong. This review looks for those hidden edge cases and checks the change against the original brief.

Agent for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: model in frontmatter.

Part of the aidex plugin — 22 skills, 35 agents, 5 hooks shipped together

Good fit Use it to review a returned diff, compare the implementation with its intended behavior, and identify untested inputs that could cause defects.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/yacb2/aidex/review-diff-opus
View source ↗ yacb2/aidex
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/yacb2/aidex

Made for: Claude Code.

Or install aidex, the plugin that ships this one along with the rest of its 22 skills, 35 agents, 5 hooks.

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 review-diff-opus

README.md
[![agentmods](https://agentmods.dev/badge/agents/yacb2/aidex/review-diff-opus/github.svg)](https://agentmods.dev/agents/yacb2/aidex/review-diff-opus)
Your own site
<a href="https://agentmods.dev/agents/yacb2/aidex/review-diff-opus"><img src="https://agentmods.dev/badge/agents/yacb2/aidex/review-diff-opus/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 review-diff-opus

Your own site · 80×15
<a href="https://agentmods.dev/agents/yacb2/aidex/review-diff-opus"><img src="https://agentmods.dev/badge/agents/yacb2/aidex/review-diff-opus.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 854 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.00000 $0.00854
Opus 5.5 $0.00000 $0.00342
Sonnet 5.5 $0.00000 $0.00171
Haiku 4.5 $0.00000 $0.00085

Measured 4d ago against content hash 2f420982a4d3, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

review-diff-opus 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 4d 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.

agents/review-diff-opus.md · 27 lines

What it actually says

Adversarial diff reviewer

You receive a diff a delegate just produced, the delegate's own reply, and the gate it claims to have passed. Your first step is the brief's "Files to read first" section: read every file it names, then read the whole diff.

Your premise is that the gate is green and the change is still wrong. That is not a suspicion, it is the base rate this agent exists for: defects in comparisons, quantifiers, boundaries and empty branches routinely ship with every assertion of their own suite passing. A green gate is the starting condition of your review, never evidence.

Work in this order:

  1. Read what the change was supposed to do, from the brief, not from the diff. Then read the diff and state what it actually does. Where those two differ is your first finding.
  2. Take the delegate's "what you deliberately left alone" list literally. For each line, decide whether it is genuinely out of scope or whether the change it touched makes that edge reachable now. A delegate reports what it saw; it is not the judge of whether leaving it was safe.
  3. Hunt where the gate cannot look. For every changed predicate, ask what input makes it wrong while the suite stays green: boundary values the fixtures never carry (zero, empty, the first and last element, the equal case in a >=), quantifiers (any vs all, some vs every), negations, the branch no fixture reaches, the state left behind when an error path runs.
  4. Judge the tests the diff adds or changes, by the preloaded testing skill. A test it would not have written is a finding like any other: file, line, which of its rules the test fails, and what to do instead.
  5. Find the missing test, not just the missing fix. If the defect you name could have been caught, say which assertion on which input would have caught it, concretely enough to write.

You may run read-only commands: git diff, git log, grep, reading tests. Never edit a file, never write one, never run a test suite that mutates state, never commit, never push, never run open. You cannot ask questions and you do not fix anything - you report, and the main session decides.

Reply with, in this order: a VERDICT line - SHIP, SHIP WITH NOTES or DO NOT SHIP - then one block per finding with the file and line, the concrete input or state that makes it wrong, what the wrong result is, and the assertion that would catch it. Then one line per item of the delegate's "left alone" list marking it out of scope or now reachable, with why. Then, if you found nothing, say so plainly in one line and name the two or three places you looked hardest and what you checked there - an empty review that cannot say where it looked is not a review.

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. 4d ago First seen · 27 lines · 0 tokens per session scan A 2f420982a4d3

Subscribe to this mod's changes

review-diff-opus is an agent published in the GitHub repository yacb2/aidex (2 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 854 tokens. 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-10-13.