agentleFS
mmgordon82mmgordon82/agent-skills/skills/adversarial-review/SKILL.md

adversarial-review

Skill3 starsChanged 9 days agoMITView on GitHub

Use for an adversarial review or second opinion from a different agent CLI (Claude, Codex, Grok, Kimi, Pi, others) after non-trivial changes, plans or claims. Runs it headless and read-only to find bugs, holes and what you missed.

119 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use rethink, root-cause-analysis and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • fabioespindulaSkill

    rethink

    Reframe a plan, idea, or decision before the user commits to it. Use when the user asks to rethink, step back, pressure-test, gut-check, decide, right-size, simplify, think bigger about, or evaluate a concrete plan or decision in product, strategy, technical architecture, career, life, company direction, or personal priorities. This skill improves decision quality before action: clarify the real question, challenge assumptions, compare alternatives, calibrate ambition, classify the operating mode, surface risks, and recommend a next move. Do not use for broad future exploration without a concrete decision; that belongs to a think-big or research-style skill.

    Also in 3 projects that use this

  • MicrosoftSkill

    root-cause-analysis

    Use when a Regional Retail Manager asks I'm seeing unusual inventory movement at our Northwest stores. Can you help me understand what's happening?

    Also in 3 projects that use this

  • jaydubya818Skill

    babysit

    Use when an authorized pull request needs ongoing CI and review follow-through.

    Also in 3 projects that use this

  • DockerSkill

    fix-issue

    Fix a single GitHub issue end-to-end: triage, research, write the fix, review, and create a PR. Use when asked to fix an issue: "fix issue 1234", "resolve #500", "create a PR for issue 200".

    Also in 3 projects that use this

  • MicrosoftSkill

    error-handling

    统一错误处理系统。在添加 API 端点、修改错误处理、添加前端 API 调用、编写错误相关测试时使用。

    Also in 3 projects that use this

  • juriwiensSkill

    codex-review

    Run code review via Codex CLI

    Also in 3 projects that use this

  • +1 more from microsoft

The file

We split this skill into the rules it gives an agent

9 rules. 0 are common, 8 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 106 edited versions we read keep these.

  • 8

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run a second agent from the shell to attack your work.

    line 8
  2. Distinctive:

    Use it after a non-trivial change, plan, root-cause claim or design decision, before you report "done".

    line 10
  3. Distinctive:

    If the user names a CLI, use it.

    line 20
  4. Distinctive:

    No way to make it read-only → don't use it.

    line 25
  5. Very specific:

    Write the brief to a file: $WORK/review-brief.md.

    line 29
  6. Distinctive:

    Never put secrets, credentials, customer data or private hostnames in the brief.

    line 65
  7. Distinctive:

    Check it against the real code or a real run.

    line 96
  8. Distinctive:

    After fixing confirmed findings, rerun the affected checks.

    line 98
  9. Distinctive:

    Run a second round only after substantial fixes, with a fresh brief.

    line 100

“Common” is measured: kept by at least 6 in 10 of the 106 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Adversarial review

Run a second agent from the shell to attack your work. It looks for bugs, gaps, wrong assumptions, unhandled cases, and claims you did not prove. It is a reviewer, not an authority: you verify every finding before acting on it.

Use it after a non-trivial change, plan, root-cause claim or design decision, before you report "done". Skip it for one-liners.

1. Pick the reviewer

Prefer a CLI from a different vendor than you. A different model misses different things. The user's preference order is [review] reviewers in ${XDG_CONFIG_HOME:-$HOME/.config}/agent-skills/settings.toml: take the first installed CLI in that list that isn't you. No file or no key → codex, grok, claude, kimi, pi. A broken value → that default, and tell the user.

for c in claude codex grok kimi pi gemini opencode; do command -v "$c" >/dev/null && echo "$c"; done

If the user names a CLI, use it. For a CLI not listed below:

  1. Find the one-shot flag: <cli> --help | grep -iE 'print|prompt|exec|single|-p'.
  2. Find how to make it read-only: a sandbox, a plan mode, a tool allowlist, or an agent profile that lists only read, search and list tools.
  3. Prove it before the real run: ask it to create a file and edit one, and check that nothing changed.
  4. No way to make it read-only → don't use it. Pick another CLI or tell the user. Never review a copy of the repo instead.

2. Write the brief

Write the brief to a file: $WORK/review-brief.md. $WORK is this task's dir under the agent work dir (the agent-workdir skill; default ~/agent-work/<project>/<date>-<topic>/). Fill in this template:

You are an adversarial reviewer. Another agent did the work below and believes it is correct.
Your job is to prove it wrong. Do not praise, summarize, or restate the work.

## Goal
<what the user asked for, in their words>

## What was done
<diff range or changed files, plan path, commands run; reference paths, don't paste whole files>

## Claims to attack
<each claim the agent makes: "X works because Y", "Z is the root cause", "tests cover W">

## Known gaps
<what the agent already knows is unverified>

## Find
- Bugs: wrong logic, edge cases, error paths, races, off-by-one, bad input at boundaries.
- Holes: requirements from the goal that are missing or only half done.
- Unproven claims: anything asserted but not shown by a test, a run, or the code.
- Surprises: inputs, environments or usage the author did not expect.
- Regressions: callers or behavior the change breaks elsewhere.

Read the code and run read-only commands to check before you report. A finding needs
evidence: file:line, a command and its output, or a concrete failing input.

## Output
One block per finding, worst first:
[critical|high|medium|low] file:line — the problem
Evidence: <what you read or ran>
Failure: <concrete input/state → wrong result>
End with "Not checked:" listing what you could not verify. No findings → say so plainly.

Never put secrets, credentials, customer data or private hostnames in the brief. The reviewer is a cloud model. If the repo itself is sensitive, ask the user before sending it.

3. Run it headless and read-only

$REPO is the project root. $BRIEF is the brief file.

CLICommand
Claude Codecd "$REPO" && claude -p --permission-mode plan "$(cat "$BRIEF")"
Codexcodex exec -s read-only -C "$REPO" -o "$WORK/review.md" - < "$BRIEF"
Grokgrok -p "$(cat "$BRIEF")" --cwd "$REPO" --tools read_file,grep,list_dir --max-turns 100
Kimi Codecd "$REPO" && kimi -p "$(cat "$BRIEF")" --agent-file "$WORK/kimi-reviewer.md" with the profile below. Without it, -p applies edits automatically, and it refuses --plan.
Picd "$REPO" && pi -p --tools read,grep,find,ls --exclude-tools 'mcp__*,codemode' "$(cat "$BRIEF")" (--tools alone keeps MCP tools)

The Grok binary may also be installed as agent. Kimi's read-only profile, $WORK/kimi-reviewer.md (only these tools exist for the session: no shell, no edits, no MCP, no subagents):

---
name: reviewer
description: Read-only adversarial reviewer
tools: Read, Grep, Glob
---
You are a read-only reviewer. You cannot change files or run commands.

Save the output to $WORK/review.md. A whole-repo review can take 10 minutes or more, so run it in the background if your harness supports that, and keep working.

4. Triage

For each finding:

  1. Check it against the real code or a real run. Do not trust it, and do not dismiss it without checking.
  2. Mark it confirmed (fix it), rejected (one-line reason, with evidence), or needs the user (a scope or product decision).
  3. After fixing confirmed findings, rerun the affected checks.

Run a second round only after substantial fixes, with a fresh brief. Report to the user: reviewer CLI, confirmed and fixed, rejected with reasons, still open.

Common mistakes

MistakeFix
Asking "is this good?"Ask it to prove the work wrong, with evidence per finding.
Anchoring it on your conclusionList claims to attack, not your reasoning for them.
Write access for a reviewRead-only flags, or a throwaway worktree.
Pasting whole filesGive paths and the diff range; the reviewer can read the repo.
Applying findings uncheckedVerify each one; reviewers are confidently wrong too.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.