Skip to content
Development
Skill

/adversarial-reviewer

Review code through three hostile personas - the Saboteur, the New Hire, and the Security Auditor - each required to find at least one issue. Use when a standard review feels too comfortable, when code is going into a critical path, when a previous review missed bugs that later

From plugin
dotclaude
586 skills1 agent1 command

Claude Code

$ npx -y skills add KhaledSaeed18/dotclaude --skill adversarial-reviewer --agent claude-code

SKILL.md

adversarial-reviewer.SKILL.md
name: adversarial-reviewer
description: Review code through three hostile personas - the Saboteur, the New Hire, and the Security Auditor - each required to find at least one issue. Use when a standard review feels too comfortable, when code is going into a critical path, when a previous review missed bugs that later surfaced, or when you want coverage across correctness, clarity, and security in a single pass.

A normal review looks for obvious problems. This review looks with the eyes of someone who wants the code to fail, someone who has never seen it, and someone who is paid to find holes in it. Each persona must report at least one finding. If a persona genuinely cannot find a problem after a thorough examination, that is itself a result - state exactly what was checked and why each candidate turned out safe.

Before starting

Read the code in full without judging it. Understand what it is trying to do and what invariants it relies on. Only then switch to the adversarial personas, one at a time.

If a diff or specific files are in scope, focus there. If the scope is the current change, also read the surrounding code that the change interacts with.

Persona 1: The Saboteur

The Saboteur wants the code to fail at runtime. They probe for:

  • **Edge cases:** what happens with empty input, zero, negative numbers, very large values, unicode, null, undefined, or a missing key in an object?
  • **Sequence and ordering:** what if events arrive out of order? What if two calls happen concurrently? Is there a race between reads and writes?
  • **Type coercion and implicit conversion:** does `==` hide a type mismatch? Does a numeric string arrive where a number is expected and gets treated as one?
  • **Failure paths:** what happens when a network call fails, a file is missing, a lock times out, or a dependency throws? Are errors swallowed? Does the system end up in a partially-updated state?
  • **Off-by-one and boundary arithmetic:** are loop bounds correct? Are slices and ranges inclusive or exclusive where they need to be?

The Saboteur reports findings as: "Saboteur finds: [precise scenario] at [file:line] causes [concrete failure]."

Persona 2: The New Hire

The New Hire is reading this code for the first time, on their second week. They flag:

  • **Naming confusion:** identifiers that mean something different from what they look like, or two things that sound the same but differ in a subtle way.
  • **Undocumented assumptions:** preconditions that callers must satisfy but are never stated, state that must be initialized before a function is called, or ordering guarantees that the code depends on but does not enforce.
  • **Missing tests for non-obvious behavior:** any path that a reader would not predict from the function's name or signature but that is load-bearing.
  • **Why is this here?** Code that does something surprising without explanation. Side effects that are not obvious from the call site.
  • **Complexity that could be simpler:** nested conditionals that could be flattened, a loop doing the work of a standard library function, state that is tracked manually when a different data structure would make it automatic.

The New Hire reports findings as: "New Hire finds: [what was confusing or missing] at [file:line] because [what they would have assumed instead]."

Persona 3: The Security Auditor

The Security Auditor is looking for exploitable weaknesses in this specific code, not a generic checklist. They focus on:

  • **Trust boundary violations:** is any user-controlled value used in a query, shell command, file path, or template without explicit validation and sanitization at the boundary?
  • **Authorization gaps:** is the caller's identity and permission verified before the operation runs? Can a valid authenticated user access another user's resource by changing an ID?
  • **Information leakage:** does an error message, a log line, or a response body expose stack traces, internal paths, user data, or system information to untrusted parties?
  • **Insecure defaults:** is a sensitive operation opt-in to security (must be enabled) rather than opt-out (secure by default)? Does a new endpoint inherit the authentication and rate-limiting of the rest of the service, or is it bare?
  • **Cryptographic shortcuts:** is a password hashed with anything other than bcrypt, argon2, or scrypt? Is a secret compared with `==` instead of a constant-time function? Is a random token generated with `Math.random()`?
  • **Supply chain:** if a new dependency was added, is it maintained, widely used, and necessary? Does it run install scripts that could execute arbitrary code?

The Security Auditor reports findings as: "Security Auditor finds: [vulnerability class] at [file:line]: [attack path and what an adversary gains]."

Report format

After all three personas have reported, give a consolidated summary:

Saboteur: [N findings]
New Hire: [N findings]
Security Auditor: [N findings]

Critical items (address before merge):
- [file:line] - [the finding] - [the fix]

Should-fix items:
- ...

Low / consider items:
- ...

If a persona found nothing after thorough checking, list the specific things they checked and confirmed safe - a clean result from a specific check is as useful as a finding.

Read more
@khaledsaeed18
Ships withdotclaude

Reusable Claude Code extension registry. skills, subagents, slash commands, and hooks for engineering, git, testing, and security workflows. Distributed as a shadcn GitHub registry and as installable plugins.

586 skills1 agent
Get the whole plugin

Stars on GitHub

Momentum

stars in total
5
Star history of KhaledSaeed18/dotclaude on GitHub, a chart by star-history.com

Other skills on dotclaude.

academic-writing

academic-writing

Write or revise thesis and paper prose section by section (abstract, introduction, related work, method, results, discussion,…

bibtex-manager

bibtex-manager

Maintain the thesis .bib file as a single source of truth: fetch verified BibTeX from a DOI, arXiv id, or title via CrossRef and…

citation-graph

citation-graph

Expand a set of key papers into the literature around them by walking the citation graph with the Semantic Scholar and OpenAlex…

citation-verifier

citation-verifier

Audit every citation in a chapter, paper, or proposal against the .bib file and the real world: each cite key must exist, each…

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills10d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc12d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react1d252k
@facebook@facebookInstall Skill

Questions about adversarial-reviewer.

Which coding agents can use adversarial-reviewer?
adversarial-reviewer installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.