Archive228

Adversarial Contract Gate — Development skill for Claude Code

Development community

Self-evaluation is a trap — grade against a contract with a separate evaluator.

How to install Adversarial Contract Gate

This entry records only its repository, not the path inside it, so there is no exact command to give. Open Archive228/adversarial-contract-gate and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Adversarial Contract Gate does

Self-evaluation is a trap — grade against a contract with a separate evaluator. Built from Anthropic's 'Build Agents That Run for Hours' (39:00). No deps, ./run.sh, 9 tests.

Alternatives in Development

  • Scan Trap — 单独检查一只股票是不是杀猪盘 / 有没有被资金套路 6.6k ★
  • Claude Code Rails Upgrade Skill — 🤖 The one and only Claude Code Skill to Upgrade Rails by FastRuby.io -- Based on 60,000 dev/hours of experien 410 ★
  • Dependency Health Check — Execute the deps-health-inline skill for inline orchestration 172 ★

README

adversarial-contract-gate logo

adversarial-contract-gate

**Self-evaluation is a trap. Grade the build against a contract — with a separate evaluator.**

[Lecture → code](LECTURE.md) · [Run it](#run-it) · [Plug in a real model](#plug-in-a-real-model)

![license MIT](https://img.shields.io/badge/license-MIT-3fb950)  ![python 3.9+](https://img.shields.io/badge/python-3.9+-79c0ff)  ![zero dependencies](https://img.shields.io/badge/dependencies-none-3fb950)  ![tests 9 passing](https://img.shields.io/badge/tests-9%20passing-3fb950)

![one command](https://img.shields.io/badge/run-one%20command-e3b341)  ![no API key](https://img.shields.io/badge/setup-none%20·%20offline-e3b341)  ![built from a lecture](https://img.shields.io/badge/built%20from-a%20lecture-8957e5)


./run.sh — self-review ships a defect, the adversary catches it

An agent that grades its own work ships bugs it literally can't see. This repo runs the **same build two ways** — self-review, and an independent adversarial evaluator graded against a *negotiated contract* — and shows the first one shipping a defect the second one catches.

Built from the one slide the speakers said to remember:

"self-evaluation, very much a trap. Just use an adversarial evaluator." — [Anthropic, *Build Agents That Run for Hours* (39:00)](https://www.youtube.com/watch?v=mR-WAvEPRwE)

Full timestamped map of lecture → code: [LECTURE.md](LECTURE.md).

Run it

No install. No API key. No network.

git clone https://github.com/Archive228/adversarial-contract-gate
cd adversarial-contract-gate
./run.sh

Same build. Self-review passed its own two happy-path cases and shipped. The adversarial evaluator ran the whole contract, caught three defects, and the builder repaired them (see the demo above).

The shape

spec ──► negotiate() ──► contract (testable a