Adversarial Spec
Refines a PRD or technical spec through multi-round debate between Claude and external LLMs (GPT, Gemini, Grok, and more) until every participant agrees.
Docs & OfficeAdvanced★ 553⑂ 48AI score 8/10Last updated: Jan 22, 2026
What it does
Turns a rough idea or existing draft into an implementation-ready specification by pitting several models against each other.
- Two document tracks: PRD (problem, personas, user stories, KPIs, in/out scope) or Technical Spec (architecture, API contracts, data models, security, observability, deployment).
- Optional interview mode: a deep requirements session across 8 topic areas (problem, users, functional requirements, constraints, UX, tradeoffs, risks, success criteria) before any debate starts.
- Parallel multi-provider critique: via litellm (OpenAI, Anthropic, Google, xAI, Mistral, Groq, DeepSeek, OpenRouter, Zhipu), the
codex/geminiCLIs, or entirely through AWS Bedrock for compliance-bound teams. - Anti-laziness check: if a model returns
[AGREE]in rounds 1–2, the--pressflag forces it to prove it read the whole document. - Power features:
--focusareas, professional--personas,--contextinjection of existing APIs/schemas, named sessions with resume, per-round checkpoints,--preserve-intentto stop convergence from sanding off deliberate choices, token/cost reporting, and Telegram human-in-the-loop. - On consensus the final doc is written to
spec-output.md, with an optional PRD → Tech Spec continuation.
Who it's for
- Solo founders and small-team PMs with no one to pressure-test a spec.
- Tech leads who want design gaps and edge cases surfaced before a sprint starts.
- Enterprise teams that must route all model calls through AWS Bedrock.
Examples
- "Draft a PRD for payment reconciliation, start with interview mode" → deep interview, generated draft, then 3–4 rounds where gpt-4o and Gemini attack vague metrics and missing scope boundaries.
- Feed an existing
./docs/auth-spec.mdwith--focus security --persona security-engineerto hunt for auth, authorization, and input-validation holes. - Run cycle 1 with cheap fast models for completeness, then cycle 2 with o1 / claude-opus for a final hard review.
· · · Install guide · · ·
Try it now, no install
Paste this into Claude to use the skill without installing anything.
Read the instructions in this file and follow them to help me: https://raw.githubusercontent.com/zscole/adversarial-spec/HEAD/skills/adversarial-spec/SKILL.md What I want: (describe your task here)
If Claude can't open the link, open it yourself and paste the contents instead.
↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on Claude Skill Mart. Copy the skills/adversarial-spec folder from the GitHub repo zscole/adversarial-spec into my ~/.claude/skills/adversarial-spec/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/zscole/adversarial-spec.git /tmp/adversarial-spec && mkdir -p ~/.claude/skills && cp -r /tmp/adversarial-spec/skills/adversarial-spec ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Prerequisites: install Python 3.10+ and run
pip install litellm. Do NOT install the unrelatedllmpackage. - Set up auth: export at least one provider key, e.g.
export OPENAI_API_KEY=sk-...orexport GEMINI_API_KEY=.... For subscription access instead:npm install -g @openai/codex && codex login, ornpm install -g @google/gemini-cli && gemini auth. - Install the skill:
git clone https://github.com/zscole/adversarial-spec.git /tmp/adversarial-spec mkdir -p ~/.claude/skills cp -r /tmp/adversarial-spec/skills/adversarial-spec ~/.claude/skills/ - Verify providers: run
python3 "$(find ~/.claude -name debate.py -path '*adversarial-spec*' | head -1)" providersto see which keys are detected. - Fix auth conflicts: if you get the "both a token and an API key are set" error, either
unset ANTHROPIC_API_KEYor runclaude /logout. - Try it: restart Claude Code and ask something like "refine my PRD using adversarial debate" — the skill will ask for document type and opponent models.
- (Optional) Telegram: create a bot with @BotFather, export
TELEGRAM_BOT_TOKENandTELEGRAM_CHAT_ID, then add the--telegramflag for round-by-round notifications.
View source on GitHub ↗License: MIT