Skill-Details
adversarial-reviewer
Useful pre-merge quality mechanism for EMs, but a specialized code-review skill.
Vor Nutzung prüfen
Die automatische Prüfung bewertet Relevanz, nicht Sicherheit oder Empfehlung. Lies vor der Nutzung die Quellanweisungen.
SKILL.md
Dieser Auszug wurde bei der Prüfung gespeichert. Die externe Quelle enthält die vollständige und aktuelle Version.
--- name: "adversarial-reviewer" description: "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." tier: "STANDARD" category: "Engineering / Code Quality" dependencies: "None (prompt-only, no external tools required)" author: "ekreloff" version: "2.9.0" license: "MIT" --- # Adversarial Code Reviewer ## Description 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. ## Features - **Three adversarial personas** — Saboteur (production breaks), New Hire (maintainability), Security Auditor (OWASP-informed) - **Mandatory findings** — Each persona must surface at least one issue, eliminating rubber-stamp reviews - **Severity promotion** — Issues caught by 2+ personas are promoted one severity level - **Self-review trap breaker** — Concrete techniques to overcome shared mental model blind spots - **Structured verdicts** — BLOCK / CONCERNS / CLEAN with clear merge guidance ## Usage ``` /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 ``` ## Examples ### Example: Reviewing a PR Before Merge ``` /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. ## Problem This Solves 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." ## Table of Contents 1. [Quick Start](#quick-start) 2. [Review Workflow](#review-workflow) 3. [The Three Personas](#the-three-personas) 4. [Severity Classification](#severity-classification) 5. [Output Format](#output-format) 6. [Anti-Patterns](#anti-patterns) 7. [When to Use This](#when-to-use-this) ## Quick Start ``` /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 ``` ## Review Workflow ### Step 1: Gather the Changes Determine what to review based on invocation: - **No arguments:** Run `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." ### Step 2: Read the Full Context For every file in the diff: 1. Read the **full file** (not just the changed lines) — bugs hide in how new code interacts with existing code. 2. Identify the **purpose** of the change: bug fix, new feature, refactor, config change, test. 3. Note any **project conventions** from CLAUDE.md, .editorconfig, linting configs, or existing patterns. ### Step 3: Run All Three Personas 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 findiVollständige Quelle auf GitHub lesen (öffnet externe Seite)