adversarial-review

adversarial-review is a command for Claude Code from arcobaleno64/agy-plugin-cc. It costs 15 tokens per session (1,935 once invoked), scanned A, original, MIT.

A code-review command that asks Gemini, an AI coding assistant, to challenge the design and implementation of your changes.

In plain words
What is it for?
Use it for deliberately skeptical reviews of code, architecture, or a proposed change, with an optional focus such as security or correctness.
Why use it?
It helps expose weak assumptions, missed risks, and alternative approaches that a normal review may overlook.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the gemini plugin — 3 skills, 8 commands, 1 agent, 3 hooks, 1 MCP server shipped together

Good fit Use it for deliberately skeptical reviews of code, architecture, or a proposed change, with an optional focus such as security or correctness.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add arcobaleno64/agy-plugin-cc
Claude Code
/plugin install gemini

Made for: Claude Code.

Or install gemini, the plugin that ships this one along with the rest of its 3 skills, 8 commands, 1 agent, 3 hooks, 1 MCP server.

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 adversarial-review

README.md
[![agentmods](https://agentmods.dev/badge/commands/arcobaleno64/agy-plugin-cc/adversarial-review.svg)](https://agentmods.dev/commands/arcobaleno64/agy-plugin-cc/adversarial-review)
Your own site
<a href="https://agentmods.dev/commands/arcobaleno64/agy-plugin-cc/adversarial-review"><img src="https://agentmods.dev/badge/commands/arcobaleno64/agy-plugin-cc/adversarial-review.svg" alt="Measured on agentmods" height="20"></a>
Per session 15 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,935 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.00015 $0.01935
Opus 5 $0.00008 $0.00967
Sonnet 5 $0.00003 $0.00387
Haiku 4.5 $0.00002 $0.00194

Measured today against content hash 211622ab06b8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

adversarial-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 today.

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.

plugins/gemini/commands/adversarial-review.md · 101 lines

How it starts

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

Those arguments must never reach a shell

$ARGUMENTS is substituted into this file as text, so a shell receiving it would evaluate whatever it contains — $(…), backticks, ;, |. Measured on the job commands: $(echo INJECTED) was executed before Node ever started.

Read the argument text, then assemble the command from fixed pieces only. Never place the argument text, or any fragment of it, into a command, and never pass it as a single quoted string. Every value below must be one you checked against its list and then wrote out yourself — chosen, never copied:

  • --base <ref>: only if it matches ^[A-Za-z0-9._/~^-]+$
  • --scope <value>: auto, working-tree, branch
  • --engine <value>: auto, gemini, agy
  • --model <value>: an alias (flash, pro, lite, …) or an id matching ^[A-Za-z0-9][A-Za-z0-9._-]*$
  • --effort <value>: none, minimal, low, medium, high, xhigh
  • --engines <value>: gemini,agy or agy,gemini — nothing else is a valid pair
  • --timeout <seconds>: only if it is entirely digits and between 30 and 3600
  • --deep, --wait, --background, --json: literal flags, no value Any remaining text is the review focus. It is free text, so there is no safe way to quote it into a command line: use the Write tool to put it in a file and pass --focus-file <that path>. Build the path yourself; never from the user's text.

If a value is not in its set, stop and say so rather than passing it through to find out.

Run an adversarial Gemini review through the shared plugin runtime. Position it as a challenge review that questions the chosen implementation, design choices, tradeoffs, and assumptions. It is not just a stricter pass over implementation defects.

Raw slash-command arguments: $ARGUMENTS

Core constraint:

  • This command is review-only.
  • Do not fix issues, apply patches, or suggest that you are about to make changes.
  • Your only job is to run the review and return Gemini's output verbatim to the user.
  • Keep the framing focused on whether the current approach is the right one, what assumptions it depends on, and where the design could fail under real-world conditions.

Execution mode rules:

  • If the raw arguments include --engines, do not ask. Run the companion in the foreground with those arguments; the runtime queues the grouped jobs in the background and returns the group ID immediately.
  • If the raw arguments include --wait, do not ask. Run in the foreground.
  • If the raw arguments include --background, do not ask. Run in a Claude background task.
  • Otherwise, estimate the review size before asking:
    • For working-tree review, start with git status --short --untracked-files=all.
    • For working-tree review, also inspect both git diff --shortstat --cached and git diff --shortstat.
    • For base-branch review, use git diff --shortstat <base>...HEAD.
    • Treat untracked files or directories as reviewable work even when git diff --shortstat is empty.
    • Only conclude there is nothing to review when the relevant scope is actually empty.
    • Recommend waiting only when the scoped review is clearly tiny, roughly 1-2 files total and no sign of a broader directory-sized change.
    • In every other case, including unclear size, recommend background.
    • When in doubt, run the review instead of declaring that there is nothing to review.
  • Then use AskUserQuestion exactly once with two options, putting the recommended option first and suffixing its label with (Recommended):
    • Wait for results
    • Run in background

Argument handling:

  • Preserve the user's arguments exactly.
  • Do not strip --wait or --background yourself.
  • Do not weaken the adversarial framing or rewrite the user's focus text.
  • The companion script handles --background itself: it enqueues the review and spawns a detached review-worker, so the result outlives the foreground command. It does not outlive the session: SessionEnd removes this session's job records, finished ones included, so collect it with /gemini:result before the session ends. Do not use Claude's run_in_background: true for it.
  • /gemini:adversarial-review uses the same review target selection as /gemini:review (including --base <ref> and --scope).
  • Unlike /gemini:review, it can take extra focus text after the flags.
  • --engines gemini,agy queues the same blind prompt on both available engines as a background group. The jobs share a group ID but do not receive each other's identity or output. Do not combine --engines with --engine or --wait.
  • If one requested engine is unavailable, the runtime prints a degradation warning to stderr and queues the remaining engine as a normal single job. If neither is available, it fails without creating a job.
  • --timeout <seconds> is not only how long the run may take: it is also a ceiling on how much output can be produced, because a turn that cannot finish emitting inside the window is killed. Raise it for a large scope or a batch; both engines default to 600 seconds.
  • --deep runs an agentic review: Gemini uses its read-only tools to inspect repo context beyond the diff (dependency manifests, untracked files, callers) before producing the same JSON findings. Slower and higher-token; omit it for the fast, diff-scoped default. Pair --deep with --background for larger changes.

Read the full file on GitHub · 101 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. today Changed · +2 lines 211622ab06b8
  2. 3d ago Changed 82e3bd9dddee
  3. 8d ago First seen · 99 lines · 15 tokens per session scan A d1bff0ef47f8

Subscribe to this mod's changes

adversarial-review is a command published in the GitHub repository arcobaleno64/agy-plugin-cc (10 stars, last pushed today), licensed MIT. It adds 15 tokens to every session and 1,935 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.