adversarial-review

adversarial-review is a command for Claude Code from AgentToolkit/altk-evolve. It costs 26 tokens per session (1,673 once invoked), scanned A, original, Apache-2.0.

An automated procedure for reviewing a GitHub pull request, which is a proposed set of code changes. It uses separate review workers and requires findings to be checked by reproducing them before they are reported.

In plain words
What is it for?
It helps inspect a pull request, run verification steps, and optionally post evidence-based findings back to GitHub.
Why use it?
It focuses review on defects that can be demonstrated instead of unverified opinions or style complaints.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions subagents; positional $N argument.

Good fit It helps inspect a pull request, run verification steps, and optionally post evidence-based findings back to GitHub.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/agenttoolkit/altk-evolve/adversarial-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/AgentToolkit/altk-evolve

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/agenttoolkit/altk-evolve/adversarial-review/github.svg)](https://agentmods.dev/commands/agenttoolkit/altk-evolve/adversarial-review)
Your own site
<a href="https://agentmods.dev/commands/agenttoolkit/altk-evolve/adversarial-review"><img src="https://agentmods.dev/badge/commands/agenttoolkit/altk-evolve/adversarial-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 adversarial-review

Your own site · 80×15
<a href="https://agentmods.dev/commands/agenttoolkit/altk-evolve/adversarial-review"><img src="https://agentmods.dev/badge/commands/agenttoolkit/altk-evolve/adversarial-review.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 26 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,673 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.00026 $0.01673
Opus 5.5 $0.00010 $0.00669
Sonnet 5.5 $0.00005 $0.00335
Haiku 4.5 $0.00003 $0.00167

Measured 29d ago against content hash 7b109e6933b7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-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 29d 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/adversarial-review.md · 58 lines

How it starts

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

Run an adversarial code review of pull request #$1, following docs/adversarial-review.md.

Method — evidence over opinion; every finding carries a reproduction or it doesn't ship. Do NOT report style nits.

Arguments

Parse $ARGUMENTS positionally and by flag, independently of each other:

  • $1 — the PR number (required).
  • Flags — any argument starting with --, in any position: --post (post without a second confirmation), --sandbox / --no-sandbox (force or skip container isolation; see step 3).
  • Repo override — the first non-flag argument after $1, if there is one. Do not treat $2 as the repo without checking it first: /adversarial-review 289 --post has no repo override. Default <REPO> to this repo's upstream remote, falling back to origin.

Steps

  1. Fetch & size the PR.

    • gh pr view $1 --repo <REPO> --json title,author,state,isCrossRepository,headRepositoryOwner,headRefName,headRefOid,baseRefName,baseRefOid,mergeable,mergeStateStatus,body,additions,deletions,changedFiles,commits
    • gh api repos/<REPO>/pulls/$1 --jq .author_association — not a gh pr view field; asking for it there fails the whole call.
    • gh pr view $1 --repo <REPO> --json files --jq '.files[]|"\(.additions)+ \(.deletions)- \(.path)"' | sort -rn to see the shape.
    • Record baseRefOid and headRefOid — every diff and baseline below uses those two SHAs, never a hard-coded main. A PR may target a release or feature branch; diffing against the wrong base misattributes pre-existing defects to the PR, or hides its changes entirely.
    • If the PR body claims specific bugs/fixes, note them — they become verification targets.
  2. If this is a re-review, load every prior finding. The status table in step 7 is per finding, so the summary bodies alone are not enough:

    • gh api --paginate repos/<REPO>/pulls/$1/reviews — review bodies and verdicts.
    • gh api --paginate repos/<REPO>/pulls/$1/comments — the individual inline findings.
    • Correlate each inline comment to its review via pull_request_review_id, and keep path + line/original_line. Every prior finding must come back with a fixed / still-open / regressed verdict.

Read the full file on GitHub · 58 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. 29d ago First seen · 58 lines · 26 tokens per session scan A 7b109e6933b7

Subscribe to this mod's changes

adversarial-review is a command published in the GitHub repository AgentToolkit/altk-evolve (124 stars, last pushed today), licensed Apache-2.0. It adds 26 tokens to every session and 1,673 once invoked, about $0.0001 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-09-17.