Adversarial Pre-Merge Review

Fan out parallel reviewer agents that must independently reproduce each bug before it lands on your fix list.

Engineeringp4
by AgentVoltv1.0.0Published 1y ago
Free to sign up · every skill included with AgentVolt Pro

Before & after

Same prompt, same agent — the only difference is the skill.

PromptReview this authentication refactor for production risks
Beforegeneric AI agent
I can do a code review for you. To give you the best feedback, I'd want to know what the authentication refactor is replacing, what tests you have, and whether there are specific security concerns you want me to focus on. Are there edge cases you're worried about? Any performance implications? I could walk through the code and look for common vulnerabilities and architectural issues. What's your timeline for shipping this? That would help me prioritize which feedback is most critical.
Afterwith Adversarial Pre-Merge Review
ADVERSARIAL PRE-MERGE REVIEW: Auth Refactor
Branch: feat/session-redesign | Target: production | Risk Level: CRITICAL

REVIEWER TEAM OUTPUT

LOGIC REVIEWER
• Finding 1: Session rotation logic runs twice on refresh token
  → Impact: Users may see double sign-outs in logs
  → Severity: Medium
  → Repro: Open two tabs, click refresh in both within 1 second
• Finding 2: No validation that old session is revoked before new session is issued
  → Impact: Session tokens can multiply if network retries
  → Severity: High
  → Repro script: Send concurrent refresh requests, capture all returned tokens

SECURITY REVIEWER
• Finding 1: Timing attack possible on token comparison
  → Vulnerable code: if (token == storedToken) instead of constant-time compare
  → Impact: Attackers brute-force tokens at 100 attempts/second
  → Severity: Critical
  → Repro: time for token in {AAA,AAB,...}; measure response times
• Finding 2: No rate limiting on failed auth attempts
  → Impact: Account lockout bruteforce via 10,000 login attempts
  → Severity: High
  → Repro: curl -X POST /auth with wrong password 10k times

PERFORMANCE REVIEWER
• Finding: Database query for every session check (no caching)
  → Impact: 500ms latency added to every request at 5k req/sec
  → Severity: High
  → Repro: Load test with 1000 concurrent users

CRITICAL BLOCKERS: 2
1. Timing attack (use constant-time comparison library)
2. Rate limiting (add Redis counter, 10-request/minute limit)

HIGH PRIORITY: 2
1. Session duplication on retry (idempotent key)
2. Database caching (5-minute TTL in Redis)

RECOMMENDATION: Do not merge until critical blockers fixed. Estimated fix time: 6 hours. Suggest staging deployment with canary rollout (5% traffic) before full production release.

About this skill


name: adversarial-prereview description: Fan out parallel reviewer agents that must independently reproduce each bug before it lands on your fix list. Use when working on adversarial pre-merge review.

Adversarial Pre-Merge Review

Codifies the /ultra-review workflow so any Claude Code project runs a fleet of specialist reviewers (logic, security, performance, edge cases) against a branch before merge. Filters style nitpicks and returns only confirmed reproducible bugs, each with a repro script. Use before merging any risky PR to production.

What you get

  • Pre-merge checklist
  • Parallel reviewer prompts
  • Verified-bug report with repros
  • Cost estimator
  • Severity ranking
  • Suggested fix per bug

Customize your output

  • Reviewer roster: logic, security, performance, accessibility, all
  • Severity threshold: critical, high, all
  • Runs: free-tier, paid budget
  • Branch scope: branch, PR, whole repo
  • Language: TS, Py, Swift, Go, Rust
  • Auto-file issues: yes, no

Example output

'Pre-merge report flagging one confirmed auth bypass and two race conditions with reproduction scripts.'

Best for

Teams shipping to production, especially fintech, health, and payments.


Note: Requires Claude Code 2.1.86 plus and Claude account (not API key). High confidence.

SKILL.md preview

SKILL.md
---
name: adversarial-prereview
description: Use this skill before merging any risky pull request to production, when a fleet of specialist reviewers should independently reproduce bugs before they land on the fix list.
version: 1.0.0
category: Engineering
author: AgentVolt
license: proprietary
tags:
  - engineering
  - p4
---

# Adversarial Pre-Merge Review

Runs a fleet of specialist reviewers — logic, security, performance, edge cases — against a branch before merge, and keeps only bugs each reviewer independently reproduced.

## When to use

… (sign up to view the full skill)
Sign up to view, copy, and install the full skill