Guide · Agent skill
How to use the Adversarial Code Reviewer agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
The adversarial-reviewer skill is an agent skill for Claude that reviews your recent code changes from three deliberately critical viewpoints instead of approving its own work. This guide is for developers who may never have installed an agent skill before. By the end you will know what the skill does, how to install it, how to trigger it with a request or a slash command, and what it needs to run.
Quick start
- 1Download the ZIP. Download the adversarial-reviewer ZIP from the skill's page on this directory. Confirm the folder contains SKILL.md.
- 2Install the skill. Unzip it into ~/.claude/skills/ for all projects, or into a project's .claude/skills/ folder. Alternatively upload the ZIP under Settings → Capabilities → Skills in the Claude apps.
- 3Check git and repository access. Make sure git is installed and the repository you want reviewed is available to Claude in your session.
- 4Run a review. Type /adversarial-review to review staged and unstaged changes, or add --diff or --file to choose a different scope.
- 5Read the verdict. Start with the BLOCK, CONCERNS or CLEAN verdict, then work through the severity-ranked findings.
- 6Act on the findings. Fix the issues that matter and decide consciously on the rest before merging.
What an agent skill is and what this one makes Claude do
An agent skill is a folder containing a SKILL.md file that gives Claude extra instructions for a specific kind of task. When the skill is installed and relevant, Claude follows its process instead of its default behaviour.
This skill reviews recent changes: uncommitted edits, the last few commits, or a specific file. It runs three personas in sequence. The Saboteur looks for production-breaking bugs, the New Hire judges whether the code can be understood and changed by someone with no context, and the Security Auditor checks for common vulnerabilities. Each persona must report at least one issue. Findings are severity-ranked, and the report ends with a BLOCK, CONCERNS or CLEAN verdict.
The skill exists to counter the tendency of AI assistants to approve their own code too easily. Issues that two or more personas catch are promoted one severity level.
- Saboteur: production breaks, unvalidated input, inconsistent state, swallowed errors, resource leaks
- New Hire: unclear names, hidden knowledge, magic numbers, functions doing several things, tests of implementation details
- Security Auditor: injection, broken authentication, data exposure, insecure defaults, missing access control, dependency risk, secrets
Install the adversarial-reviewer skill
Download the ZIP from the skill's page on this directory and unzip it. The skill folder contains SKILL.md. Put that folder in one of two places depending on how you want to use it.
For all your projects, place it in your personal skills folder at ~/.claude/skills/. For a single project, place it in that project's .claude/skills/ folder so it travels with the repository. You can also upload the ZIP in the Claude apps under Settings → Capabilities → Skills.
- Personal install: ~/.claude/skills/adversarial-reviewer/
- Project install: .claude/skills/adversarial-reviewer/ inside your repository
- Claude apps: Settings → Capabilities → Skills, then upload the ZIP
~/.claude/skills/adversarial-reviewer/SKILL.mdTrigger the skill with a request or a command
You can invoke the skill with the slash command. With no arguments it reviews your staged and unstaged changes. With --diff it reviews a git range, and with --file it reviews one file in full.
The skill's description also tells Claude when to use it, so natural requests work. Good triggers include asking for a genuinely critical review of recent changes, asking for a review before merging a pull request, or saying you suspect Claude is being too agreeable about code quality.
- Natural request: Give this branch a harsh review before I merge the PR.
- Natural request: I think you are being too easy on this code. Review the recent changes critically.
- Slash command with no arguments: reviews staged and unstaged changes
- Slash command with a range: reviews the last three commits
- Slash command with a file: reviews one specific file
/adversarial-review # Review staged/unstaged changes
/adversarial-review --diff HEAD~3 # Review last 3 commits
/adversarial-review --file src/auth.ts # Review a specific fileExample: review a pull request before merging
To check a feature branch against main before opening or merging a pull request, pass the branch range. The skill gathers the diff, reads each changed file in full, runs the three personas and returns one deduplicated, severity-ranked report.
Read the verdict first. BLOCK means do not merge until the findings are resolved. CONCERNS means there are issues to weigh before merging. CLEAN means the review found nothing that stops the merge.
- Start from the branch you are working on, then run the range command
- Read the BLOCK, CONCERNS or CLEAN verdict first
- Fix or consciously accept each finding before you merge
/adversarial-review --diff main...HEADHow the review works step by step
The skill first decides what to review. With no arguments it runs git diff for unstaged changes and git diff --cached for staged changes, and if both are empty it runs git diff HEAD~1 for the last commit. If it finds no changes, it stops and reports: Nothing to review.
For every changed file it reads the full file, not just the changed lines, and notes the purpose of the change and any project conventions from CLAUDE.md, .editorconfig or linting configs. Then it runs the three personas, merges duplicates and promotes shared findings.
- Gather changes with git diff for the chosen scope
- Read each full file and note its purpose and project conventions
- Run the Saboteur, New Hire and Security Auditor in turn
- Merge duplicates, promote issues caught by two or more personas, then output the verdict
What the skill needs and what it does not do
The skill needs git installed, because it runs git diff commands to gather changes, and access to the repository being reviewed. It is prompt-based and does not require external tools.
According to its metadata, the skill runs no scripts and uses no network. It works only from the code and git output available to Claude in your session.
- Requires: git and access to the repository
- Runs scripts: no
- Uses network: no
- Licence: MIT
Tips and limits for good results
Keep the scope focused. Very large diffs may exceed the agent's context window, because the skill reads every changed file in full. Split big changes into smaller reviews.
Use the skill where a harsher look pays off, such as authentication, input handling and other security-sensitive changes. For quick style checks or formatting questions it is the wrong tool, because the mandatory-findings rule can overstate minor issues. Treat the output as a strong second look, not a replacement for a human security audit or formal penetration test, since the review is prompt-based and can miss vulnerabilities.
- Review one pull request or feature at a time
- Use --file for a focused review of a single security-sensitive file
- Do not use it for style-only changes
- Do not treat a CLEAN verdict as a formal security sign-off
What people use it for
- Harsh second look at a pull request before merging to main
- Review of authentication or input handling changes before they ship
- Checking whether an AI-written change was approved too easily
- Focused review of one file with the --file option
Frequently asked questions
How do I install the adversarial-reviewer skill?
Download the ZIP from the skill's page on this directory and unzip it. Place the folder in ~/.claude/skills/ for all projects or in a project's .claude/skills/ folder for one repository. You can also upload the ZIP in the Claude apps under Settings → Capabilities → Skills.
What does the adversarial-reviewer skill require?
It requires git, because it runs git diff commands to gather changes, and access to the repository being reviewed. It runs no scripts and uses no network, according to its metadata.
Is the adversarial-reviewer skill free?
The skill is licensed under the MIT licence. The source does not describe any pricing, so check the directory page for current terms.
Why does the skill report 'Nothing to review'?
The skill stops with that message when it finds no changes. With no arguments it checks unstaged changes, then staged changes, then the last commit. Use --diff with a git range or --file with a path if you want to review something specific.
How is this different from a normal code review by Claude?
Normal AI reviews can approve code the assistant wrote, because it shares the same assumptions. This skill forces three hostile personas, each of which must report at least one issue, and ends with a BLOCK, CONCERNS or CLEAN verdict.
Can this replace a human security audit?
No. The skill is prompt-based and can miss vulnerabilities, so it does not replace a human security audit or formal penetration test. Use it as an extra check on security-sensitive changes.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Use adversarial-reviewer if you want a harsher second look at code before merging, or if you suspect AI reviews of its own output are too lenient. Skip it for quick style checks, very large diffs that may exceed the context window, or as a substitute for a human security audit.
Download the skill