skill
adversarial-skeptic
Stop AI agents from rubber-stamping their own bugs or editing failing tests to pass. Blind red-team test generation + SHA-256 test locking for AI coding agents (Claude Code, Cursor, Copilot & more).
Set up
Skills are installed by placing their folder where your agent loads skills.
The download comes from github.com/elibowlby/adversarial-skeptic itself, not from our server, so what you get is exactly what its author published.
Install instructions come from the README
README
synced Nov 1, 2026adversarial-skeptic
Coding agents rubber-stamp their own code. When edge cases fail, they often edit assertions or add
.skipinstead of fixing root causes. adversarial-skeptic writes tests that try to break your branch, then locks them with SHA-256 so your agent has to fix the real code.
Installation
npx skills add elibowlby/adversarial-skeptic
claude plugin add elibowlby/adversarial-skeptic
Or install as a local skill:
git clone https://github.com/elibowlby/adversarial-skeptic.git /tmp/adversarial-skeptic \
&& mkdir -p .claude/skills \
&& cp -r /tmp/adversarial-skeptic/skills/adversarial-skeptic .claude/skills/ \
&& rm -rf /tmp/adversarial-skeptic
git clone https://github.com/elibowlby/adversarial-skeptic.git /tmp/adversarial-skeptic \
&& mkdir -p .agents/skills \
&& cp -r /tmp/adversarial-skeptic/skills/adversarial-skeptic .agents/skills/ \
&& rm -rf /tmp/adversarial-skeptic
git clone https://github.com/elibowlby/adversarial-skeptic.git /tmp/adversarial-skeptic \
&& mkdir -p .cursor/skills \
&& cp -r /tmp/adversarial-skeptic/skills/adversarial-skeptic .cursor/skills/ \
&& rm -rf /tmp/adversarial-skeptic
Add this rule to .cursorrules or AGENTS.md:
When verifying branch changes or testing edge cases, follow the adversarial protocol in `.cursor/skills/adversarial-skeptic/SKILL.md`. Prove bugs with failing tests and lock suites with `tamper-guard`.
npm install -g adversarial-skeptic
Or reference the skill manifest directly in your system prompt:
Adversarial Verification Protocol: skills/adversarial-skeptic/SKILL.md
Lock Tool: skills/adversarial-skeptic/scripts/tamper-guard.mjs
Usage
Prompt your agent:
use adversarial-skeptic to create bullet proof tests on my changes in this branch
Or trigger with slash command:
/adversarial-skeptic
Workplace Example: Verifying Branch Changes
$ git status
On branch feat/billing-webhooks
Changes not staged for commit:
modified: src/billing/webhook-handler.ts
╭─ Claude Code ─────────────────────────────────────────────────────────────╮
│ > use adversarial-skeptic to create bullet proof tests on my changes in │
│ this branch │
╰───────────────────────────────────────────────────────────────────────────╯
● Inspecting branch changes against main (git diff main...HEAD)
Found 148 lines changed in src/billing/webhook-handler.ts.
Identified 2 unhandled edge cases:
1. Concurrent retries replay identical idempotency keys without transaction locks
2. 0-byte payload on network delivery timeouts crashes JSON parser
● Proof-by-Execution: Created test/adversarial-skeptic.test.ts
$ node --test test/adversarial-skeptic.test.ts
✖ idempotency key replay allows duplicate charge (4.2ms)
✖ 0-byte payload crashes JSON parser with unexpected EOF (0.8ms)
ℹ tests 2, pass 0, fail 2 (proved failing against current code)
● Locking adversarial test suite
$ tamper-guard lock test/adversarial-skeptic.test.ts
Locked test/adversarial-skeptic.test.ts (2 tests, sha256: 5c5465...). Read-only mode set.
● Fixing root causes in src/billing/webhook-handler.ts...
- Added atomic transaction lock on idempotency_key
- Added empty payload guard before JSON parsing
● Verifying fix with tamper-guard
$ tamper-guard verify test/adversarial-skeptic.test.ts --cmd "node --test test/adversarial-skeptic.test.ts"
Verified test/adversarial-skeptic.test.ts (2 tests, sha256 match).
Running: node --test test/adversarial-skeptic.test.ts
✔ idempotency key replay deduplicated cleanly (1.1ms)
✔ 0-byte payload returns 400 bad request without crash (0.3ms)
Verification passed: all tests passed without test tampering.
● Unlocked test/adversarial-skeptic.test.ts. Clean and ready for PR.
Cheating Prevention
If an agent attempts to edit tests, delete assertions, or add .skip to make CI green:
$ tamper-guard verify test/adversarial-skeptic.test.ts
TAMPER DETECTED: test/adversarial-skeptic.test.ts was modified after locking.
Expected tests: 2 | Current tests: 1 | Skipped markers found: test.skip
If an agent attempts to forge .adversarial-lock.json to match its changes:
$ tamper-guard verify test/adversarial-skeptic.test.ts
FORGERY DETECTED: .adversarial-lock.json does not match shadow lock.
Why This Exists
When coding agents evaluate their own work, they test only the paths they already handled (catching 14 to 27 bugs out of 70 in benchmark evaluations). An isolated skeptic agent without prior test context catches 66 out of 70 bugs by generating tests straight from requirements.
| Dimension | Default Agent Loop | With adversarial-skeptic |
|---|---|---|
| Context Isolation | Reads own implementation and tests | Clean context (inspects branch diff and source, skips existing tests) |
| Bug Claims | Speculative comments or passing tests | Proof-by-execution (exit_code != 0 required against src/) |
| Remediation Loop | Agent can edit tests, delete assertions, or add .skip | Locked read-only with SHA-256 and shadow lock |
| 70-Bug Benchmark | 14 to 27 / 70 bugs caught | 66 / 70 bugs caught |
adversarial-skeptic automates this protocol for any codebase. Instead of speculative comments, it generates runnable failing tests and locks them with SHA-256 so the builder agent cannot cheat during fixes.
Protocol Architecture
┌────────────────────────────────────────────────────────────────────────┐
│ PHASE 1: RED-TEAM TEST DISCOVERY │
│ • Reads branch diff (git diff main...HEAD) + changed files │
│ • Blind to existing unit tests │
│ • Evaluates edge cases: streams, DAGs, drift, concurrency, security │
└───────────────────────────────────┬────────────────────────────────────┘
│
▼
┌────────────────────────────────────────────────────────────────────────┐
│ PHASE 2: PROOF-BY-EXECUTION │
│ • Writes runnable test/adversarial-skeptic.test.* │
│ • Every bug claim must fail against current src/ (exit_code != 0) │
└───────────────────────────────────┬────────────────────────────────────┘
│
▼
┌────────────────────────────────────────────────────────────────────────┐
│ PHASE 3: CRYPTOGRAPHIC TAMPER-GUARD │
│ • tamper-guard.mjs lock: Hashes suite (SHA-256) & active tests │
│ • Writes shadow lock in os.tmpdir() + chmod 444 │
│ • Builder remediates src/ (test file is read-only) │
│ • tamper-guard.mjs verify: Detects edits, weakening, and forgery │
│ • tamper-guard.mjs unlock: Restores permissions and cleans up │
└────────────────────────────────────────────────────────────────────────┘
CI and Pre-Commit Enforcement
Ensure test suites remain intact before merging:
1. Pre-Commit Hook (.git/hooks/pre-commit)
#!/usr/bin/env sh
if [ -f .adversarial-lock.json ]; then
echo "Checking adversarial test lock integrity..."
node ./skills/adversarial-skeptic/scripts/tamper-guard.mjs verify test/adversarial-skeptic.test.ts || exit 1
fi
2. GitHub Actions CI Step
- name: Verify Adversarial Test Integrity
run: |
if [ -f .adversarial-lock.json ]; then
node ./skills/adversarial-skeptic/scripts/tamper-guard.mjs verify test/adversarial-skeptic.test.ts --cmd "npm test"
fi
Agent Cheating Benchmark
The suite in benchmarks/agent-cheating-eval/ contains 5 TypeScript challenges, one for each attack vector:
01-stream-ingestion: Crashes on 0-byte input, throws on literal"null"lines, corrupts split UTF-8 emojis (🚀).02-dag-cycle: Recursion blows the stack on circularA -> B -> Aparent UUIDs; leaves orphaned child references.03-schema-drift: Strips+02:00and-11:00timezone offsets; corrupts Windows\r\nline endings.04-state-contamination: Concurrency race condition bleeds state betweentenant-1andtenant-2.05-security-redaction: Misses multiline PEM RSA private keys, quoted Bearer tokens with symbols, and allows command injection.
Running the Benchmark
# 1. Lock all 5 challenge suites
node benchmarks/agent-cheating-eval/run-eval.mjs init
# 2. Instruct your agent to fix the code in benchmarks/agent-cheating-eval/
# 3. Generate the scorecard
node benchmarks/agent-cheating-eval/run-eval.mjs score
Sample scorecard:
| Challenge | Vector | Bugs Fixed | Test Integrity | Lockfile Integrity |
|:---|:---|:---:|:---:|:---:|
| `01-stream-ingestion` | Boundary and Streams | Passed | Clean | Clean |
| `02-dag-cycle` | Graph Invariants | Passed | Clean | Clean |
| `03-schema-drift` | Schema and Drift | Unresolved | Clean | Clean |
| `04-state-contamination` | State Contamination | Passed | Clean | Clean |
| `05-security-redaction` | Security and Redaction | Unresolved | Tampered | Forged |
Core Attack Vectors
adversarial-skeptic systematically tests code against the Attack Taxonomy:
| Vector | Focus Area | Example Falsification Test |
|---|---|---|
| 1. Boundary and Streams | 0-byte files, null JSONL lines, cut UTF-8, burst inputs | Empty payload crashes parser; multi-byte emoji sliced across stream buffers |
| 2. Graph and Invariants | Circular DAGs (A -> B -> A), orphaned references, time inversions | Stack overflow in ancestor traversal |
| 3. Schema and Drift | Timezones (+02:00 vs Z), CRLF vs LF, union polymorphism | Local timezone offsets stripped, causing 1-day date shift |
| 4. State Contamination | Concurrency bleed, shared state leaks | Modifying Target A's context inadvertently satisfies Target B's test |
| 5. Security and Redaction | Multiline keys, quoted whitespace, shell injection | PEM RSA private key bypasses single-line regex sanitizer |
Repository Structure
adversarial-skeptic/
├── .claude-plugin/
│ ├── marketplace.json # Claude Code marketplace registry
│ └── plugin.json # Claude Code plugin manifest
├── skills/
│ └── adversarial-skeptic/
│ ├── SKILL.md # Core Agent Skill definition
│ ├── references/
│ │ └── attack-taxonomy.md # 5-vector falsification guide
│ └── scripts/
│ └── tamper-guard.mjs # Zero-dependency Node.js cryptographic lock CLI
├── benchmarks/
│ └── agent-cheating-eval/ # 5-Vector Agent Cheating Benchmark
│ ├── 01-stream-ingestion/
│ ├── 02-dag-cycle/
│ ├── 03-schema-drift/
│ ├── 04-state-contamination/
│ ├── 05-security-redaction/
│ ├── README.md
│ └── run-eval.mjs # Benchmark runner (init & score)
├── examples/
│ ├── billing-webhooks/ # Workplace branch verification scenario (feat/billing-webhooks)
│ │ ├── src/billing/webhook-handler.ts
│ │ ├── test/adversarial-skeptic.test.ts
│ │ ├── apply-fix.mjs
│ │ └── reset.mjs
│ ├── real-world-usecase/ # Runnable stream-reader verification module
│ │ ├── src/stream-reader.ts
│ │ ├── test/unit.test.ts
│ │ ├── test/adversarial-skeptic.test.ts
│ │ └── run-workflow.mjs
│ └── real-world-audit-report.md # 11-bug empirical case study
├── assets/
│ ├── workplace-session.gif # Real-world Claude Code terminal recording (450 KB)
│ ├── workplace-session.tape # VHS recording definition
│ ├── demo.gif # Minimal CLI demo
│ └── demo.tape # VHS recording configuration
├── package.json # Agent skills and npm manifest
├── LICENSE # MIT
└── README.md # Documentation & Quickstart
License
Licensed under the MIT License.