AIToday

Claude Code skill pairs AI models for adversarial code review

Hacker News9h ago
Claude Code skill pairs AI models for adversarial code review

Key takeaway

A developer has released a Claude Code skill that pairs Claude with GPT-5.6 Sol to perform adversarial code review. The reviewer runs in a live pane and Claude then verifies each of its findings against the actual code, reporting each as confirmed, disputed, or unverified. The setup requires installing a multiplexer, local API proxy, sandbox layer, and shell function.

Summaries like this, in your inbox every morning.

Sign up free →

3 Key Points

  • What happened

    A developer released a Claude Code skill that automates adversarial code review by spawning GPT-5.6 Sol as an independent reviewer in a live split pane alongside Claude, which then interrogates each finding against the actual code before delivering a verdict.

  • Why it matters

    The two-model setup reduces false positives—the reviewer is instructed to be adversarial and may overstate problems, so Claude's verification step means you get confirmed findings rather than raw output, lowering noise in code review.

  • What to watch

    The setup requires five sequential steps (herdr, CLIProxyAPI, agent-safehouse, a shell function, and the skill itself) and runs the reviewer in a macOS sandbox confined to the project directory for security.

In Depth

The skill works by having Claude spawn a second model—GPT-5.6 Sol—in a live split pane using herdr, an agent multiplexer. Claude writes the diff (or plan) plus the stated intent to a prompt file under /tmp/adversarial-review/, then waits for the reviewer to finish by monitoring herdr's idle/working/blocked status. Once the review completes, Claude interrogates every finding against the actual code and reports each one as Confirmed, Disputed, or Unverified. The reviewer is instructed to be adversarial and will sometimes overstate or manufacture problems, so this verification step is essential; as the documentation notes, "nothing the reviewer found holds up" is a valid outcome.

The setup involves five sequential steps. First, herdr is installed via curl and the user runs terminal sessions inside it. Second, CLIProxyAPI is installed (via a binary download or Docker) and configured at ~/.config/cli-proxy-api/config.yml with a shared API key; the user then logs in with an OpenAI/Codex account and starts the server on http://localhost:8317. Third, agent-safehouse is installed via Homebrew and a safe wrapper is added to ~/.zshrc to enable macOS kernel-level sandboxing, with /tmp granted explicitly because that's where the handoff files live. Fourth, a safecodex shell function is defined that sets environment variables pointing to the local proxy and GPT-5.6 Sol, including flags for effort level and concurrency. Fifth, the skill itself is installed either via Claude Code's plugin marketplace (`/plugin marketplace add overflowy/herdr-claude-gpt-adversarial-review-skill` and `/plugin install adversarial-review@herdr-claude-gpt-adversarial-review-skill`) or by copying the SKILL.md file manually.

In use, the user opens a Claude Code session running inside a herdr pane and asks in natural language—"poke holes in this diff", "red-team this plan", or "get a second opinion before I ship". Claude states the intent, writes the review prompt, splits a herdr pane, and launches safecodex to run the reviewer with --dangerously-skip-permissions (the sandbox confinement replaces the permission gate). The reviewer's TUI runs live in the split pane, then Claude verifies the findings and reports verdicts. The smoke test includes checking that the proxy is up and accepts the API key, and that safecodex works end to end. Common failure modes include the proxy not running on 8317, expired Codex OAuth tokens, the safecodex function not being in interactive shell config (it must live in ~/.zshrc), and sandbox denials if legitimate paths are needed outside the project directory. The skill is released under MIT license.

Context & Analysis

The skill addresses a common pain point in code review: single reviewers (whether human or AI) can miss issues or overfit to a single perspective. By pairing Claude with GPT-5.6 Sol and routing the second model through a local OpenAI/Codex login via CLIProxyAPI, the creator enables a heterogeneous review without leaving the Claude Code interface. The adversarial framing is deliberate—the reviewer is instructed to find holes—but that same bias becomes a liability if left unchecked, so the architecture includes a verification loop where Claude re-checks each claim against the code itself. The sandbox isolation via agent-safehouse prevents the reviewer from leaking credentials or accessing unrelated files, addressing a natural security concern when spawning a second AI agent.

The setup is deliberately modular: herdr handles the multiplexing and pane lifecycle, CLIProxyAPI bridges the model provider mismatch, agent-safehouse enforces confinement, and a shell function wires the pieces together. This layering means the skill remains decoupled from any single tool's internals, though it does assume the user runs Claude Code inside herdr panes.

FAQ

How does the skill prevent the reviewer from making false claims?
Claude interrogates every finding the reviewer makes against the actual code before relaying a verdict. The reviewer is intentionally adversarial by instruction and may overstate or manufacture problems, but Claude's verification step filters out unconfirmed claims.
What security measures are in place?
The reviewer runs inside a macOS-native kernel-level sandbox (agent-safehouse) that confines it to the project directory only—it cannot access SSH keys, other repositories, or anything outside its workspace.
Can I watch the reviewer work in real time?
Yes; the reviewer runs interactively in its own herdr split pane, so you can watch it work or jump in and steer it.

Get the latest Large Language Models news every morning

AI-summarized, only the topics you pick — one digest a day via Email, Slack, or Discord.

Free · takes 30 seconds · unsubscribe anytime

Discussion

No comments yet. Be the first to share your thoughts!

Log in to join the discussion

Related Articles

Stay ahead with AI news

Get curated AI news from 200+ sources delivered daily to your inbox. Free to use.

Get Started Free

Free · takes 30 seconds · unsubscribe anytime

1 minute a day. The AI essentials.

200+ sources · Email / LINE / Slack

Get it free →