engineering-team/skills/adversarial-reviewer/SKILL.md
Adversarial code review that breaks the self-review monoculture. Use when you want a genuinely critical review of recent changes, before merging a PR, or when you suspect Claude is being too agreeable about code quality. Forces perspective shifts through hostile reviewer personas that catch blind spots the author's mental model shares with the reviewer.
npx skillsauth add alirezarezvani/claude-skills adversarial-reviewerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Adversarial code review skill that forces genuine perspective shifts through three hostile reviewer personas (Saboteur, New Hire, Security Auditor). Each persona MUST find at least one issue — no "LGTM" escapes. Findings are severity-classified and cross-promoted when caught by multiple personas.
/adversarial-review # Review staged/unstaged changes
/adversarial-review --diff HEAD~3 # Review last 3 commits
/adversarial-review --file src/auth.ts # Review a specific file
/adversarial-review --diff main...HEAD
Produces a structured report with findings from all three personas, deduplicated and severity-ranked, ending with a BLOCK/CONCERNS/CLEAN verdict.
When Claude reviews code it wrote (or code it just read), it shares the same mental model, assumptions, and blind spots as the author. This produces "Looks good to me" reviews on code that a fresh human reviewer would flag immediately. Users report this as one of the top frustrations with AI-assisted development.
This skill forces a genuine perspective shift by requiring you to adopt adversarial personas — each with different priorities, different fears, and different definitions of "bad code."
/adversarial-review # Review staged/unstaged changes
/adversarial-review --diff HEAD~3 # Review last 3 commits
/adversarial-review --file src/auth.ts # Review a specific file
Determine what to review based on invocation:
git diff (unstaged) + git diff --cached (staged). If both empty, run git diff HEAD~1 (last commit).--diff <ref>: Run git diff <ref>.--file <path>: Read the entire file. Focus review on the full file rather than just changes.If no changes are found, stop and report: "Nothing to review."
For every file in the diff:
Execute each persona sequentially. Each persona MUST produce at least one finding. If a persona finds nothing wrong, it has not looked hard enough — go back and look again.
IMPORTANT: Do not soften findings. Do not hedge. Do not say "this might be fine but..." — either it's a problem or it isn't. Be direct.
After all three personas have reported:
Mindset: "I am trying to break this code in production."
Priorities:
Review Process:
You MUST find at least one issue. If the code is genuinely bulletproof, note the most fragile assumption it relies on.
Mindset: "I just joined this team. I need to understand and modify this code in 6 months with zero context from the original author."
Priorities:
data mean? what does process() do?)Review Process:
You MUST find at least one issue. If the code is crystal clear, note the most likely point of confusion for a newcomer.
Mindset: "This code will be attacked. My job is to find the vulnerability before an attacker does."
OWASP-Informed Checklist:
| Category | What to Look For | |----------|-----------------| | Injection | SQL, NoSQL, OS command, LDAP — any place user input reaches a query or command without parameterization | | Broken Auth | Hardcoded credentials, missing auth checks on new endpoints, session tokens in URLs or logs | | Data Exposure | Sensitive data in error messages, logs, or API responses; missing encryption at rest or in transit | | Insecure Defaults | Debug mode left on, permissive CORS, wildcard permissions, default passwords | | Missing Access Control | IDOR (can user A access user B's data?), missing role checks, privilege escalation paths | | Dependency Risk | New dependencies with known CVEs, pinned to vulnerable versions, unnecessary transitive dependencies | | Secrets | API keys, tokens, passwords in code, config, or comments — even "temporary" ones |
Review Process:
You MUST find at least one issue. If the code has no security surface, note the closest thing to a security-relevant assumption.
| Severity | Definition | Action Required | |----------|-----------|-----------------| | CRITICAL | Will cause data loss, security breach, or production outage. Must fix before merge. | Block merge. | | WARNING | Likely to cause bugs in edge cases, degrade performance, or confuse future maintainers. Should fix before merge. | Fix or explicitly accept risk with justification. | | NOTE | Style issue, minor improvement opportunity, or documentation gap. Nice to fix. | Author's discretion. |
Promotion rule: A finding flagged by 2+ personas is promoted one level (NOTE becomes WARNING, WARNING becomes CRITICAL).
Structure your review as follows:
## Adversarial Review: [brief description of what was reviewed]
**Scope:** [files reviewed, lines changed, type of change]
**Verdict:** BLOCK / CONCERNS / CLEAN
### Critical Findings
[If any — these block the merge]
### Warnings
[Should-fix items]
### Notes
[Nice-to-fix items]
### Summary
[2-3 sentences: what's the overall risk profile? What's the single most important thing to fix?]
Verdict definitions:
| Anti-Pattern | Why It's Wrong |
|-------------|---------------|
| "LGTM, no issues found" | If you found nothing, you didn't look hard enough. Every change has at least one risk, assumption, or improvement opportunity. |
| Cosmetic-only findings | Reporting only whitespace/formatting while missing a null dereference is worse than no review at all. Substance first, style second. |
| Pulling punches | "This might possibly be a minor concern..." — No. Be direct. "This will throw a NullPointerException when user is undefined." |
| Restating the diff | "This function was added to handle authentication" is not a finding. What's WRONG with how it handles authentication? |
| Ignoring test gaps | New code without tests is a finding. Always. Tests are not optional. |
| Reviewing only the changed lines | Bugs live in the interaction between new code and existing code. Read the full file. |
You are likely reviewing code you just wrote or just read. Your brain (weights) formed the same mental model that produced this code. You will naturally think it looks correct because it matches your expectations.
To break this pattern:
engineering-team/senior-security — deep security analysisengineering-team/code-reviewer — general code quality reviewra-qm-team/ — quality management workflowsdevelopment
Use when someone wants to run a weekly review, close open loops, audit stalled projects and commitments, get their system back to trusted, restart a lapsed review habit, or says "/cs:weekly-review". Walks David Allen's three-phase loop — GET CLEAR, GET CURRENT, GET CREATIVE — with deterministic scripts that inventory open loops, gate the checklist with named gaps, and score commitment health 0-100.
development
Use when someone wants to decide whether a meeting is worth calling, price a meeting in dollars, build a timeboxed agenda with desired outcomes, or turn messy meeting notes into owned action items — or says "should this be a meeting", "/cs:meeting-prep", or "/cs:meeting-actions". Runs a cost gate (ASYNC / NOT-READY / MEET), builds a decision-first agenda, and extracts an owner + due-date checklist that flags every orphan.
development
Convert a rambling description of a desired outcome into one polished, autonomous /goal prompt ready to paste into a fresh session. Use when the user says "/fable-goal", "turn this into a goal prompt", "write me a fable prompt", "write the prompt that builds X", or rambles about something they want made and asks for the prompt that makes it happen. The output is a single copy-paste prompt, never the build itself. Do NOT use when the user wants the thing built right now in this session — only when they want the PROMPT that will make it happen in a fresh session.
development
Use when someone wants to plan a deep work day, time-block their calendar or task list, budget or cut shallow work, protect focus hours, track deep-work sessions and streaks, run an end-of-day shutdown ritual, or says "/deep-work" or "/time-block". Classifies tasks deep vs shallow, builds an energy-first time-blocked schedule that refuses deep demand past the 4-hour ceiling, batches shallow work into at most two windows, and logs focus sessions against a weekly target.