agentsclimarketplace

Adversarial review

Skill claude-hangar/claude-hangar/core/skills/adversarial-review

Production-grade configuration management for Claude Code. Hooks, agents, skills, multi-project orchestration.

Install
npx -y skills add claude-hangar/claude-hangar --skill adversarial-review

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Critical review (min. 5 findings). Modes: code, audit, plan. Use when: "review", "critical review", "code review", "plan review", "audit review".

SKILL.md

9.9 KB, as published. Nobody here has run it

<!-- AI-QUICK-REF ## /adversarial-review — Quick Reference - **Modes:** code | audit | plan - **Arguments:** `/adversarial-review $0` e.g. `/adversarial-review code` - **Minimum:** 5 findings — 0 findings = repeat review - **3 Tracks:** Adversarial (creatively break) | Catalog (17 modes) | Path Tracer (paths) - **Goal-Backward:** Artifact exists? Substantial? Wired up? - **No praise** until at least 5 problems have been named - **Severity:** CRITICAL (~1-5%) > HIGH (~0.1-1%) > MEDIUM (~0.01%) > LOW (<0.01%) - **Large reviews (>50 files / >2000 lines):** Use wave-based review (Structural → Logic → Security → Integration) - **Output:** Findings list with failure mode + risk + overall assessment -->

/adversarial-review — Critical Review

Enforces an honest, critical review instead of a courtesy review. Minimum 5 findings — if fewer are found, look again.

Source: BMAD (review-adversarial-general + PromptSentinel v1.2) Community Pattern

Problem

LLMs tend toward positive reviews: "Looks good", "Well structured", "No problems found". This is almost never true — every codebase has room for improvement. Courtesy reviews are worthless.

Modes

ModeTriggerWhat gets reviewed
code/adversarial-review codeCode changes (git diff or files)
audit/adversarial-review auditAudit report for completeness and quality
plan/adversarial-review planImplementation plan for gaps and risks

Mode: code

Critical code review focused on real problems.

Process

  1. Determine scope:

    • Read git diff (unstaged + staged)
    • Or: User specifies files/directories
    • Or: Last commit (git diff HEAD~1..HEAD)
  2. Apply three parallel review tracks:

    Track A — Adversarial: "How does this code break under load?"

    • Concurrent access, race conditions, deadlocks
    • Network errors, timeouts, API outages
    • Unexpected inputs (null, empty, max, min, Unicode)
    • Security: Injection, XSS, CSRF, secrets

    Track B — Failure Mode Catalog: Systematically scan against 17 modes:

    #ModeLook for...
    1Silent ExceptionsException caught but not propagated
    2Missing Input ValidationType/bounds not checked
    3Implicit DependenciesAssumes prior state, not verified
    4Over/Under Validation1000 lines of validation OR none at all
    5Non-DeterminismTiming, random order, unordered maps
    6Double NegationComplex boolean logic
    7Implicit InitializationAssumes prior setup
    8Type GapsParameter type assumed, not validated
    9Unprotected ExtensibilityAPI extensible, untested
    10No Progress TrackingLong tasks without logging/checkpoints
    11Redundant CodeRe-implements stdlib
    12Outdated PatternsCallbacks instead of async/await, var instead of let
    13Undocumented APIReturn value unclear
    14No FallbackExternal API call without timeout/retry
    15Unclear CompletionFunction done? Exception or return?
    16Monolithic Function>200 lines, should be split
    17Hardcoded ValuesShould be config/ENV

    Track C — Path Tracer: Walk through every execution path:

    • Entry condition unambiguous?
    • All inputs validated?
    • State consistent across branches?
    • Resources cleaned up? (Streams, connections, handles)
  3. Goal-Backward Verification:

    • What was the goal of the change? (Commit message, PR description)
    • Was the goal achieved?
    • Are there side effects?
  4. Stub Detection:

    • Functions that only return null/undefined/true?
    • Empty catch blocks or error swallowing?
    • Config files with only default values?
    • Test assertions that always pass (expect(true).toBe(true))?
    • "File exists" != "Check passed" — apply 4-level verification
  5. Minimum 5 findings — if <5 found:

    • Look again: Testability, edge cases, documentation
    • If truly <5 (very small diff): Reduce minimum to 3
    • 0 findings is NEVER acceptable

Severity with Risk Assessment

SeverityDefinitionDefect Rate
CRITICALSystem outage, data loss~1-5%
HIGHData corruption, security vulnerability~0.1-1%
MEDIUMDegraded UX/performance~0.01-0.1%
LOWCode smell, maintainability<0.01%

Wave-Based Review (Large Codebases)

For large reviews (>50 files changed or >2000 lines), conduct the review in systematic waves rather than a single pass. This prevents reviewer fatigue and ensures thoroughness across all dimensions.

WaveFocusWhat to check
Wave 1: StructuralFile organization, naming, dead code, importsModule boundaries, unused exports, circular dependencies
Wave 2: LogicBusiness logic correctness, edge cases, error handlingOff-by-one, null paths, state transitions, race conditions
Wave 3: SecurityOWASP checks, input validation, auth/authzInjection, XSS, CSRF, secrets, privilege escalation
Wave 4: IntegrationCross-file consistency, API contracts, test coverageInterface mismatches, missing tests, contract violations

Each wave produces its own findings before proceeding to the next. The three parallel tracks (Adversarial, Catalog, Path Tracer) are applied within each wave's focus area.

For smaller reviews (<50 files), the single-pass approach with all three tracks remains appropriate.

Reference: gsd-v2 v2.66.0 uses multi-wave adversarial review.

Finding Format

### {ID}: {Short Title}
**Severity:** {CRITICAL|HIGH|MEDIUM|LOW}
**Failure-Mode:** {# from catalog, e.g. #1 Silent Exception}
**File:** `{path}:{line}`
**Problem:** {What is the problem}
**Suggestion:** {How to fix it}

Mode: audit

Review of an audit report for completeness and quality.

Process

  1. Read audit report (AUDIT-REPORT-.md or PROJECT-AUDIT-REPORT-.md)
  2. Read state file (.audit-state.json or .project-audit-state.json)
  3. Check:
    • Were all phases completed? (State vs. report)
    • Are there phases with <80% mandatory checks?
    • Are severity ratings plausible? (MEDIUM that should actually be HIGH?)
    • Are obvious finding categories missing? (e.g., no security finding for a web project)
    • Are recommendations concrete and actionable?
    • Are there copy-paste findings (same problem, different IDs)?
  4. Goal-Backward: Does the report cover the entire project?
  5. Minimum 5 findings on the report itself

Report Review Findings

### R-{ID}: {Short Title}
**Category:** Gap | Severity Error | Incomplete | Quality
**Reference:** {Phase or Finding-ID}
**Problem:** {What is missing or wrong}
**Suggestion:** {How the report can be improved}

State Write-Back (Category "Gap")

When the review finds findings of category "Gap" (missing checks, skipped validations), these can be written back as new findings to the audit state:

  1. Read audit state (.audit-state.json or .project-audit-state.json)
  2. For each "Gap" finding:
    • Create new finding with next available ID (e.g., SEC-07)
    • "status": "open", "notes": "From adversarial-review R-{ID}"
    • Derive phase and severity from the review finding
  3. Update state file (summary + findings array)
  4. Inform user: "{N} findings from review added to audit state"

Rules:

  • ONLY category "Gap" is written back — not "Severity Error", "Incomplete", or "Quality"
  • "Severity Error" — user manually corrects in state
  • "Incomplete" / "Quality" — meta-findings about the report, not the project
  • Write-back only after user confirmation (AskUserQuestion)

Mode: plan

Review of an implementation plan for gaps and risks.

Process

  1. Read plan (Markdown, CLAUDE.md, or current plan mode)
  2. Check:
    • Are all dependencies identified?
    • Is there a rollback scenario?
    • What happens if step X fails?
    • Are the estimates realistic?
    • Are steps missing? (Tests, documentation, deployment)
    • Are there unvalidated assumptions?
  3. Goal-Backward:
    • Does the planned artifact actually exist at the end?
    • Is it substantial (not just a placeholder)?
    • Is it wired up (referenced, deployed, configured)?
  4. Minimum 5 findings on the plan itself

Rules

  1. Minimum 5 findings — 0 = stop + review again, never "all good"
  2. No praise first — problems first, then (optionally) positives
  3. Rate severity honestly — when in doubt, rate higher
  4. Concrete suggestions — not just "should be improved"
  5. Goal-Backward always — Does it exist? Substantial? Wired up?
  6. No scope creep — only review what was requested
  7. On re-review after fixes: Only new/changed findings, no repetitions
  8. Anti-rationalization — Resist the urge to soften findings or reduce severity. See _shared/anti-rationalization.md

Smart Next Steps

After completing the review, suggest appropriate follow-up actions to the user:

ModeConditionRecommendation
auditFindings with category "Gap""Regenerate report after fixes: /audit report or /project-audit report"
auditFindings with category "Severity Error""Correct severity in state, then update report"
code>3 HIGH findings"Implement fixes, then run /adversarial-review code again"
planFindings present"Revise plan, then run /adversarial-review plan again"

When to Recommend

  • Before every deploy or push
  • After an audit report
  • For architecture decisions
  • When the user asks "does this look good?"

Files

adversarial-review/
└── SKILL.md    ← This file

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.