Aller au contenu
Skillpedia
Programmation générale29k · #9488

adversarial-reviewer

Ce qu’il fait

Cette compétence fait examiner par l'agent les modifications de code comme le ferait un relecteur exigeant, sous trois angles critiques. Elle s'adresse aux développeurs qui veulent un contrôle rigoureux avant la fusion, et pas un simple coup d'œil.

Quand l’utiliser

  • ✓Quand vous êtes sur le point de fusionner une demande de tirage et voulez une revue stricte.
  • ✓Quand votre propre revue de code vous semble trop complaisante.
  • ✓Quand une modification touche à la sécurité ou au comportement en production et demande une lecture attentive.

Lien du skill

https://github.com/alirezarezvani/claude-skills/blob/main/engineering-team/skills/adversarial-reviewer/SKILL.md

Copiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.

Comment l’utiliser

Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.

Message prêt à coller

Utilise ce skill pour m’aider : https://github.com/alirezarezvani/claude-skills/blob/main/engineering-team/skills/adversarial-reviewer/SKILL.md Lis le fichier SKILL.md de ce lien et suis ses instructions pour ma tâche.
Envie que votre IA trouve seule des skills comme celui-ci ?Installez le MCP gratuit de Skillpedia : une ligne, et elle cherche parmi 15 000+ skills avant chaque tâche.Installer en 1 minute →

Exemple de demande à votre IA

“Examine ma demande de tirage comme un relecteur hostile avant que je la fusionne.”

5 nouveaux skills par semaine. 1 minute de lecture.

Comment ça marche

L'agent examine le diff selon trois personnages : l'un cherche ce qui pourrait casser la production, un autre vérifie qu'un nouveau membre de l'équipe pourrait suivre le code, et le dernier cherche les failles de sécurité. Il rend ensuite un verdict : bloquer, réserves ou propre.

Contenu technique (SKILL.md original)

Texte original de l’auteur, en anglais, directement depuis GitHub.

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
  2. Review Workflow
  3. The Three Personas
  4. Severity Classification
  5. Output Format
  6. Anti-Patterns
  7. 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 findings. Do not hedge. Do not say "this might be fine but..." — either it's a problem or it isn't. Be direct.

Step 4: Deduplicate and Synthesize

After all three personas have reported:

  1. Merge duplicate findings (same issue caught by multiple personas).
  2. Promote findings caught by 2+ personas to the next severity level.
  3. Produce the final structured output.

The Three Personas

Persona 1: The Saboteur

Mindset: "I am trying to break this code in production."

Priorities:

  • Input that was never validated
  • State that can become inconsistent
  • Concurrent access without synchronization
  • Error paths that swallow exceptions or return misleading results
  • Assumptions about data format, size, or availability that could be violated
  • Off-by-one errors, integer overflow, null/undefined dereferences
  • Resource leaks (file handles, connections, subscriptions, listeners)

Review Process:

  1. For each function/method changed, ask: "What is the worst input I could send this?"
  2. For each external call, ask: "What if this fails, times out, or returns g
Questions fréquentes

Quels sont les trois points de vue du relecteur ?

Un saboteur qui cherche les pannes en production, une nouvelle recrue qui vérifie la maintenabilité et un auditeur de sécurité qui cherche les risques.

La revue trouvera-t-elle toujours quelque chose ?

La compétence demande à chaque point de vue de trouver au moins un problème, ce qui évite une approbation automatique.

Que signifient les verdicts ?

Bloquer signifie ne pas fusionner pour l'instant, réserves signifie examiner les problèmes d'abord, et propre signifie qu'aucun problème majeur n'a été trouvé.

Détails

Description originale de l’auteur

Use before merging a PR or when a self-review feels too agreeable and the change needs a genuinely critical read. Reviews the diff through hostile reviewer personas that catch blind spots the author and a friendly reviewer share.

repo: alirezarezvani/claude-skills

Popularité

Étoiles GitHub
29k
Position au classement
#9488
Licence
MIT
Mis à jour
02/11/2026

Ce skill vous est-il utile ?

0

Connectez-vous pour voter.

Commentaires

  • …

Autres skills de ce dépôt

Skills similaires