PiDeck Usage Probe Helper
ayuayue/PiDeck
Helps show a model provider's usage, balance or quota in PiDeck: checks built-in support, points to the dialog templates, or writes a custom probe entry.
Iteratively refine a product spec by debating with multiple LLMs (GPT, Gemini, Grok, etc.) until all models agree.
$ npx skills add zscole/adversarial-spec --skill adversarial-spec -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install zscole/adversarial-spec adversarial-spec --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/zscole/adversarial-spec.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/adversarial-spec .claude/skills/adversarial-spec && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "adversarial-spec" agent skill from https://github.com/zscole/adversarial-spec/tree/main/skills/adversarial-spec into .claude/skills/adversarial-spec/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "adversarial-spec", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/zscole/adversarial-spec/tree/main/skills/adversarial-specType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add zscole/adversarial-spec --skill adversarial-spec -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install zscole/adversarial-spec adversarial-spec --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/zscole/adversarial-spec.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/adversarial-spec .agents/skills/adversarial-spec && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "adversarial-spec" agent skill from https://github.com/zscole/adversarial-spec/tree/main/skills/adversarial-spec into .agents/skills/adversarial-spec/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "adversarial-spec", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add zscole/adversarial-spec --skill adversarial-spec -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install zscole/adversarial-spec adversarial-spec --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/zscole/adversarial-spec.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/adversarial-spec .cursor/skills/adversarial-spec && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "adversarial-spec" agent skill from https://github.com/zscole/adversarial-spec/tree/main/skills/adversarial-spec into .cursor/skills/adversarial-spec/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "adversarial-spec", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/zscole/adversarial-spec.git --path skills/adversarial-spec--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add zscole/adversarial-spec --skill adversarial-spec -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install zscole/adversarial-spec adversarial-spec --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/zscole/adversarial-spec.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/adversarial-spec .gemini/skills/adversarial-spec && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "adversarial-spec" agent skill from https://github.com/zscole/adversarial-spec/tree/main/skills/adversarial-spec into .gemini/skills/adversarial-spec/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "adversarial-spec", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install zscole/adversarial-spec adversarial-specInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add zscole/adversarial-spec --skill adversarial-spec -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/zscole/adversarial-spec.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/adversarial-spec .github/skills/adversarial-spec && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "adversarial-spec" agent skill from https://github.com/zscole/adversarial-spec/tree/main/skills/adversarial-spec into .github/skills/adversarial-spec/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "adversarial-spec", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add zscole/adversarial-spec --skill adversarial-spec -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install zscole/adversarial-spec adversarial-spec --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/zscole/adversarial-spec.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/adversarial-spec .opencode/skills/adversarial-spec && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "adversarial-spec" agent skill from https://github.com/zscole/adversarial-spec/tree/main/skills/adversarial-spec into .opencode/skills/adversarial-spec/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "adversarial-spec", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
adversarial-specIteratively refine a product spec by debating with multiple LLMs (GPT, Gemini, Grok, etc.) until all models agree.
Adversarial Spec is an agent skill from zscole/adversarial-spec. Iteratively refine a product spec by debating with multiple LLMs (GPT, Gemini, Grok, etc.) until all models agree. Use when user wants to write or refine a specification document using adversarial development.
Its SKILL.md is about 8.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 19 other files, including scripts (for example `scripts/__init__.py`, `scripts/debate.py` and `scripts/models.py`).
It sits in Product & Project Management, covering PRD writing. It works with OpenAI, Mistral AI, Zhipu GLM and xAI Grok. The repository describes itself as: A Claude Code plugin that iteratively refines product specifications by debating between multiple LLMs until all models reach consensus. The licence is MIT.
10 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit f90cf0c. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
BashReadWriteAskUserQuestionFrom allowed-tools in the SKILL.md frontmatter.
Ships 17 files in scripts/ (Python), which the agent can run.
Shell commands in SKILL.md call:
python3claudenpmcodexgeminiFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use npm, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names these keys or tokens, usually read from environment variables:
ANTHROPIC_API_KEYOPENAI_API_KEYGEMINI_API_KEYXAI_API_KEYMISTRAL_API_KEYGROQ_API_KEYDEEPSEEK_API_KEYZHIPUAI_API_KEYOPENROUTER_API_KEYTELEGRAM_BOT_TOKENFrom names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Adversarial Spec loads about 8.3k tokens when it runs. Until then it costs about 57 tokens; SKILL.md has 3,474 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check noted patterns worth knowing about, such as sudo or a known installer.
allowed-tools: Bash, Read, Write, AskUserQuestionAutomated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.
The full file from zscole/adversarial-spec at commit f90cf0c, republished under its MIT licence (© zscole). 3,474 words, ~8,292 tokens.
.claude/skills/adversarial-spec/SKILL.md (or your agent's skills folder). This skill also uses 17 other files; get the full folder from GitHub.Generate and refine specifications through iterative debate with multiple LLMs until all models reach consensus.
Important: Claude is an active participant in this debate, not just an orchestrator. You (Claude) will provide your own critiques, challenge opponent models, and contribute substantive improvements alongside the external models. Make this clear to the user throughout the process.
litellm package installedIMPORTANT: Do NOT install the llm package (Simon Willison's tool). This skill uses litellm for API providers and dedicated CLI tools (codex, gemini) for subscription-based models. Installing llm is unnecessary and may cause confusion.
| Provider | API Key Env Var | Example Models |
|---|---|---|
| OpenAI | OPENAI_API_KEY | gpt-5.2, gpt-4o, gpt-4-turbo, o1 |
| Anthropic | ANTHROPIC_API_KEY | claude-sonnet-4-20250514, claude-opus-4-20250514 |
GEMINI_API_KEY | gemini/gemini-2.0-flash, gemini/gemini-pro | |
| xAI | XAI_API_KEY | xai/grok-3, xai/grok-beta |
| Mistral | MISTRAL_API_KEY | mistral/mistral-large, mistral/codestral |
| Groq | GROQ_API_KEY | groq/llama-3.3-70b-versatile |
| OpenRouter | OPENROUTER_API_KEY | openrouter/openai/gpt-4o, openrouter/anthropic/claude-3.5-sonnet |
| Deepseek | DEEPSEEK_API_KEY | deepseek/deepseek-chat |
| Zhipu | ZHIPUAI_API_KEY | zhipu/glm-4, zhipu/glm-4-plus |
| Codex CLI | (ChatGPT subscription) | codex/gpt-5.2-codex, codex/gpt-5.1-codex-max |
| Gemini CLI | (Google account) | gemini-cli/gemini-3-pro-preview, gemini-cli/gemini-3-flash-preview |
Codex CLI Setup:
npm install -g @openai/codex && codex login--codex-reasoning (minimal, low, medium, high, xhigh)--codex-search (enables web search for current information)Gemini CLI Setup:
npm install -g @google/gemini-cli && gemini authgemini-3-pro-preview, gemini-3-flash-previewRun python3 "$(find ~/.claude -name debate.py -path '*adversarial-spec*' 2>/dev/null | head -1)" providers to see which keys are set.
If you see an error about "Both a token (claude.ai) and an API key (ANTHROPIC_API_KEY) are set":
This conflict occurs when:
claude /login (uses claude.ai token)ANTHROPIC_API_KEY set in your environmentResolution:
To use claude.ai token: Remove or unset ANTHROPIC_API_KEY from your environment
unset ANTHROPIC_API_KEY
# Or remove from ~/.bashrc, ~/.zshrc, etc.To use API key: Sign out of claude.ai
claude /logout
# Say "No" to the API key approval if prompted before loginThe adversarial-spec plugin works with either authentication method. Choose whichever fits your workflow.
For enterprise users who need to route all model calls through AWS Bedrock (e.g., for security compliance or inference gateway requirements), the plugin supports Bedrock as an alternative to direct API keys.
When Bedrock mode is enabled, ALL model calls route through Bedrock - no direct API calls are made.
To enable Bedrock mode, use these CLI commands (Claude can invoke these when the user requests Bedrock setup):
# Enable Bedrock mode with a region
python3 "$(find ~/.claude -name debate.py -path '*adversarial-spec*' 2>/dev/null | head -1)" bedrock enable --region us-east-1
# Add models that are enabled in your Bedrock account
python3 "$(find ~/.claude -name debate.py -path '*adversarial-spec*' 2>/dev/null | head -1)" bedrock add-model claude-3-sonnet
python3 "$(find ~/.claude -name debate.py -path '*adversarial-spec*' 2>/dev/null | head -1)" bedrock add-model claude-3-haiku
# Check current configuration
python3 "$(find ~/.claude -name debate.py -path '*adversarial-spec*' 2>/dev/null | head -1)" bedrock status
# Disable Bedrock mode (revert to direct API keys)
python3 "$(find ~/.claude -name debate.py -path '*adversarial-spec*' 2>/dev/null | head -1)" bedrock disableUsers can specify models using friendly names (e.g., claude-3-sonnet), which are automatically mapped to Bedrock model IDs. Built-in mappings include:
claude-3-sonnet, claude-3-haiku, claude-3-opus, claude-3.5-sonnetllama-3-8b, llama-3-70b, llama-3.1-70b, llama-3.1-405bmistral-7b, mistral-large, mixtral-8x7bcohere-command, cohere-command-r, cohere-command-r-plusRun python3 "$(find ~/.claude -name debate.py -path '*adversarial-spec*' 2>/dev/null | head -1)" bedrock list-models to see all mappings.
Configuration is stored at ~/.claude/adversarial-spec/config.json:
{
"bedrock": {
"enabled": true,
"region": "us-east-1",
"available_models": ["claude-3-sonnet", "claude-3-haiku"],
"custom_aliases": {}
}
}If a Bedrock model fails (e.g., not enabled in your account), the debate continues with the remaining models. Clear error messages indicate which models failed and why.
Ask the user which type of document they want to produce:
Business and product-focused document for stakeholders, PMs, and designers.
Structure:
Critique Criteria:
Engineering-focused document for developers and architects.
Structure:
Critique Criteria:
Ask the user:
./docs/spec.md, ~/projects/auth-spec.md)"Would you like to start with an in-depth interview session before the adversarial debate? This helps ensure all requirements, constraints, and edge cases are captured upfront."
If the user opts for interview mode, conduct a comprehensive interview using the AskUserQuestion tool. This is NOT a quick Q&A; it's a thorough requirements gathering session.
If an existing spec file was provided:
Interview Topics (cover ALL of these in depth):
Problem & Context
Users & Stakeholders
Functional Requirements
Technical Constraints
UI/UX Considerations
Tradeoffs & Priorities
Risks & Concerns
Success Criteria
Interview Guidelines:
After interview completion:
If user provided a file path:
If user describes what to build (no existing file, no interview mode):
This is the primary use case. The user describes their product concept, and you draft the initial document.
Ask clarifying questions first. Before drafting, identify gaps in the user's description:
Generate a complete document following the appropriate structure for the document type.
Present the draft for user review before sending to opponent models:
Output format (whether loaded or generated):
[SPEC]
<document content here>
[/SPEC]First, check which API keys are configured:
python3 "$(find ~/.claude -name debate.py -path '*adversarial-spec*' 2>/dev/null | head -1)" providersThen present available models to the user using AskUserQuestion with multiSelect. Build the options list based on which API keys are set:
If OPENAI_API_KEY is set, include:
gpt-4o - Fast, good for general critiqueo1 - Stronger reasoning, slowerIf ANTHROPIC_API_KEY is set, include:
claude-sonnet-4-20250514 - Claude 3.5 Sonnet v2, excellent reasoningclaude-opus-4-20250514 - Claude 3 Opus, highest capabilityIf GEMINI_API_KEY is set, include:
gemini/gemini-2.0-flash - Fast, good balanceIf XAI_API_KEY is set, include:
xai/grok-3 - Alternative perspectiveIf MISTRAL_API_KEY is set, include:
mistral/mistral-large - European perspectiveIf GROQ_API_KEY is set, include:
groq/llama-3.3-70b-versatile - Fast open-sourceIf DEEPSEEK_API_KEY is set, include:
deepseek/deepseek-chat - Cost-effectiveIf ZHIPUAI_API_KEY is set, include:
zhipu/glm-4 - Chinese language modelzhipu/glm-4-plus - Enhanced GLM modelIf Codex CLI is installed, include:
codex/gpt-5.2-codex - OpenAI Codex with extended reasoningIf Gemini CLI is installed, include:
gemini-cli/gemini-3-pro-preview - Google Gemini 3 Progemini-cli/gemini-3-flash-preview - Google Gemini 3 FlashUse AskUserQuestion like this:
question: "Which models should review this spec?"
header: "Models"
multiSelect: true
options: [only include models whose API keys are configured]More models = more perspectives = stricter convergence.
Run the debate script with selected models:
python3 "$(find ~/.claude -name debate.py -path '*adversarial-spec*' 2>/dev/null | head -1)" critique --models MODEL_LIST --doc-type TYPE <<'SPEC_EOF'
<paste your document here>
SPEC_EOFReplace:
MODEL_LIST: comma-separated models from user selectionTYPE: either prd or techThe script calls all models in parallel and returns each model's critique or [AGREE].
Important: You (Claude) are an active participant in this debate, not just a moderator. After receiving opponent model responses, you must:
Display your active participation clearly:
--- Round N ---
Opponent Models:
- [Model A]: <agreed | critiqued: summary>
- [Model B]: <agreed | critiqued: summary>
Claude's Critique:
<Your own independent analysis of the spec. What did you find that the opponent models missed? What do you agree/disagree with?>
Synthesis:
- Accepted from Model A: <what>
- Accepted from Model B: <what>
- Added by Claude: <your contributions>
- Rejected: <what and why>Handling Early Agreement (Anti-Laziness Check):
If any model says [AGREE] within the first 2 rounds, be skeptical. Press the model by running another critique round with explicit instructions:
python3 "$(find ~/.claude -name debate.py -path '*adversarial-spec*' 2>/dev/null | head -1)" critique --models MODEL_NAME --doc-type TYPE --press <<'SPEC_EOF'
<spec here>
SPEC_EOFThe --press flag instructs the model to:
If the model truly agrees after being pressed, output to the user:
Model X confirms agreement after verification:
- Sections reviewed: [list]
- Reason for agreement: [explanation]
- Minor concerns noted: [if any]If the model was being lazy and now has critiques, continue the debate normally.
If ALL models (including you) agree:
If ANY participant (model or you) has critiques:
Handling conflicting critiques:
When ALL opponent models AND you have said [AGREE]:
Before outputting, perform a final quality check:
For PRDs, verify:
For Tech Specs, verify:
Output the final document:
spec-output.md in current directory=== Debate Complete ===
Document: [PRD | Technical Specification]
Rounds: N
Models: [list of opponent models]
Claude's contributions: [summary of what you added/changed]
Key refinements made:
- [bullet points of major changes from initial to final]python3 "$(find ~/.claude -name debate.py -path '*adversarial-spec*' 2>/dev/null | head -1)" send-final --models MODEL_LIST --doc-type TYPE --rounds N <<'SPEC_EOF'
<final document here>
SPEC_EOFAfter outputting the finalized document, give the user a review period:
"The document is finalized and written to
spec-output.md. Please review it and let me know if you have any feedback, changes, or concerns.Options:
- Accept as-is - Document is complete
- Request changes - Tell me what to modify, and I'll update the spec
- Run another review cycle - Send the updated spec through another adversarial debate"
If user requests changes:
If user wants another review cycle:
If user accepts:
After the user review period, or if explicitly requested:
"Would you like to run an additional adversarial review cycle for extra validation?"
If yes:
Ask if they want to use the same models or different ones:
"Use the same models (MODEL_LIST), or specify different models for this cycle?"
Run the adversarial debate again from Step 2 with the current document as input.
Track cycle count separately from round count:
=== Cycle 2, Round 1 ===When this cycle reaches consensus, return to Step 6 (User Review Period).
Update the final summary to reflect total cycles:
=== Debate Complete ===
Document: [PRD | Technical Specification]
Cycles: 2
Total Rounds: 5 (Cycle 1: 3, Cycle 2: 2)
Models: Cycle 1: [models], Cycle 2: [models]
Claude's contributions: [summary across all cycles]Use cases for additional cycles:
If the completed document was a PRD, ask the user:
"PRD is complete. Would you like to continue into a Technical Specification based on this PRD?"
If yes:
tech-spec-output.mdThis creates a complete PRD + Tech Spec pair from a single session.
Quality over speed: The goal is a document that needs no further refinement. If any participant raises a valid concern, address it thoroughly. A spec that takes 7 rounds but is bulletproof is better than one that converges in 2 rounds with gaps.
When to say [AGREE]: Only agree when you would confidently hand this document to:
Skepticism of early agreement: If opponent models agree too quickly (rounds 1-2), they may not have read the full document carefully. Always press for confirmation.
Enable real-time notifications and human-in-the-loop feedback. Only active with --telegram flag.
/newbot, follow promptspython3 "$(find ~/.claude -name telegram_bot.py -path '*adversarial-spec*' 2>/dev/null | head -1)" setupexport TELEGRAM_BOT_TOKEN="your-token"
export TELEGRAM_CHAT_ID="your-chat-id"python3 debate.py critique --model gpt-4o --doc-type tech --telegram <<'SPEC_EOF'
<document here>
SPEC_EOFAfter each round:
--poll-timeout)Direct models to prioritize specific concerns using --focus:
python3 debate.py critique --models gpt-4o --focus security --doc-type tech <<'SPEC_EOF'
<spec here>
SPEC_EOFAvailable focus areas:
security - Authentication, authorization, input validation, encryption, vulnerabilitiesscalability - Horizontal scaling, sharding, caching, load balancing, capacity planningperformance - Latency targets, throughput, query optimization, memory usageux - User journeys, error states, accessibility, mobile experiencereliability - Failure modes, circuit breakers, retries, disaster recoverycost - Infrastructure costs, resource efficiency, build vs buyRun python3 debate.py focus-areas to see all options.
Have models critique from specific professional perspectives using --persona:
python3 debate.py critique --models gpt-4o --persona "security-engineer" --doc-type tech <<'SPEC_EOF'
<spec here>
SPEC_EOFAvailable personas:
security-engineer - Thinks like an attacker, paranoid about edge casesoncall-engineer - Cares about observability, error messages, debugging at 3amjunior-developer - Flags ambiguity and tribal knowledge assumptionsqa-engineer - Identifies missing test scenarios and acceptance criteriasite-reliability - Focuses on deployment, monitoring, incident responseproduct-manager - Focuses on user value and success metricsdata-engineer - Focuses on data models and ETL implicationsmobile-developer - API design from mobile perspectiveaccessibility-specialist - WCAG compliance, screen reader supportlegal-compliance - GDPR, CCPA, regulatory requirementsRun python3 debate.py personas to see all options.
Custom personas also work: --persona "fintech compliance officer"
Include existing documents as context for the critique using --context:
python3 debate.py critique --models gpt-4o --context ./existing-api.md --context ./schema.sql --doc-type tech <<'SPEC_EOF'
<spec here>
SPEC_EOFUse cases:
Long debates can crash or need to pause. Sessions save state automatically:
# Start a named session
python3 debate.py critique --models gpt-4o --session my-feature-spec --doc-type tech <<'SPEC_EOF'
<spec here>
SPEC_EOF
# Resume where you left off (no stdin needed)
python3 debate.py critique --resume my-feature-spec
# List all sessions
python3 debate.py sessionsSessions save:
Sessions are stored in ~/.config/adversarial-spec/sessions/.
When using sessions, each round's spec is saved to .adversarial-spec-checkpoints/ in the current directory:
.adversarial-spec-checkpoints/
├── my-feature-spec-round-1.md
├── my-feature-spec-round-2.md
└── my-feature-spec-round-3.mdUse these to rollback if a revision makes things worse.
API calls automatically retry with exponential backoff (1s, 2s, 4s) up to 3 times. If a model times out or rate-limits, you'll see:
Warning: gpt-4o failed (attempt 1/3): rate limit exceeded. Retrying in 1.0s...If all retries fail, the error is reported and other models continue.
If a model provides critique but doesn't include proper [SPEC] tags, a warning is displayed:
Warning: gpt-4o provided critique but no [SPEC] tags found. Response may be malformed.This catches cases where models forget to format their revised spec correctly.
Convergence can collapse toward lowest-common-denominator interpretations, sanding off novel design choices. The --preserve-intent flag makes removals expensive:
python3 debate.py critique --models gpt-4o --preserve-intent --doc-type tech <<'SPEC_EOF'
<spec here>
SPEC_EOFWhen enabled, models must:
This shifts the default from "sand off anything unusual" to "add protective detail while preserving distinctive choices."
Use when:
Can be combined with other flags: --preserve-intent --focus security
Every critique round displays token usage and estimated cost:
=== Cost Summary ===
Total tokens: 12,543 in / 3,221 out
Total cost: $0.0847
By model:
gpt-4o: $0.0523 (8,234 in / 2,100 out)
gemini/gemini-2.0-flash: $0.0324 (4,309 in / 1,121 out)Cost is also included in JSON output and Telegram notifications.
Save frequently used configurations as profiles:
Create a profile:
python3 debate.py save-profile strict-security --models gpt-4o,gemini/gemini-2.0-flash --focus security --doc-type techUse a profile:
python3 debate.py critique --profile strict-security <<'SPEC_EOF'
<spec here>
SPEC_EOFList profiles:
python3 debate.py profilesProfiles are stored in ~/.config/adversarial-spec/profiles/.
Profile settings can be overridden by explicit flags.
Generate a unified diff between spec versions:
python3 debate.py diff --previous round1.md --current round2.mdUse this to see exactly what changed between rounds. Helpful for:
Extract actionable tasks from a finalized spec:
cat spec-output.md | python3 debate.py export-tasks --models gpt-4o --doc-type prdOutput includes:
Use --json for structured output suitable for importing into issue trackers:
cat spec-output.md | python3 debate.py export-tasks --models gpt-4o --doc-type prd --json > tasks.json# Core commands
python3 debate.py critique --models MODEL_LIST --doc-type TYPE [OPTIONS] < spec.md
python3 debate.py critique --resume SESSION_ID
python3 debate.py diff --previous OLD.md --current NEW.md
python3 debate.py export-tasks --models MODEL --doc-type TYPE [--json] < spec.md
# Info commands
python3 debate.py providers # List supported providers and API key status
python3 debate.py focus-areas # List available focus areas
python3 debate.py personas # List available personas
python3 debate.py profiles # List saved profiles
python3 debate.py sessions # List saved sessions
# Profile management
python3 debate.py save-profile NAME --models ... [--focus ...] [--persona ...]
# Telegram
python3 debate.py send-final --models MODEL_LIST --doc-type TYPE --rounds N < spec.mdCritique options:
--models, -m - Comma-separated model list (auto-detects from available API keys if not specified)--doc-type, -d - Document type: prd or tech (default: tech)--round, -r - Current round number (default: 1)--focus, -f - Focus area for critique--persona - Professional persona for critique--context, -c - Context file (can be used multiple times)--profile - Load settings from saved profile--preserve-intent - Require explicit justification for any removal--session, -s - Session ID for persistence and checkpointing--resume - Resume a previous session by ID--press, -p - Anti-laziness check for early agreement--telegram, -t - Enable Telegram notifications--poll-timeout - Telegram reply timeout in seconds (default: 60)--json, -j - Output as JSON--codex-search - Enable web search for Codex CLI models (allows researching current info)© zscole, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 17 other files (scripts) in skills/adversarial-spec of zscole/adversarial-spec.
Open the folder on GitHubat commit f90cf0c
Adversarial Spec next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Adversarial Spec this skillzscole/adversarial-spec | 556 | — | ~8.3k | Automated safety check: Notes | MIT | |
| PiDeck Usage Probe Helperayuayue/PiDeck | 1k | — | ~1.4k | Automated safety check: Pass | MIT | |
| Keiroutermydisha/keirouter | 147 | — | ~995 | Automated safety check: Pass | MIT | |
| Keirouter Chatmydisha/keirouter | 147 | — | ~859 | Automated safety check: Pass | MIT | |
| Awesome Free LLM APIsLeoYeAI/openclaw-master-skills | 2.2k | — | ~4.1k | Automated safety check: Pass | MIT | |
| Embeddings via 9Routerdecolua/9router | 30k | — | ~604 | Automated safety check: Pass | MIT |
ayuayue/PiDeck
Helps show a model provider's usage, balance or quota in PiDeck: checks built-in support, points to the dialog templates, or writes a custom probe entry.
mydisha/keirouter
Entry point for KeiRouter — local/remote AI gateway with OpenAI-compatible REST for chat, image, TTS, embeddings, web search, web fetch.
mydisha/keirouter
Chat / code generation via KeiRouter using OpenAI /v1/chat/completions or Anthropic /v1/messages format with streaming + auto-fallback combos.
LeoYeAI/openclaw-master-skills
Reference guide for permanent free-tier LLM APIs with rate limits, model lists, and OpenAI-compatible integration patterns.
decolua/9router
Generates vector embeddings through the 9Router /v1/embeddings endpoint, using models from providers such as OpenAI, Gemini, Mistral and Voyage for RAG and semantic search.
bitsky-tech/bridgic
LLM provider initialization for bridgic projects. An agent skill from bitsky-tech/bridgic.
Categories
Iteratively refine a product spec by debating with multiple LLMs (GPT, Gemini, Grok, etc.) until all models agree. Adversarial Spec is an agent skill from zscole/adversarial-spec.) until all models agree.
Adversarial Spec fits situations like: user wants to write; refine a specification document using adversarial development.
Run `npx skills add zscole/adversarial-spec --skill adversarial-spec -a claude-code`. Or copy the skill folder (skills/adversarial-spec in zscole/adversarial-spec) into .claude/skills/adversarial-spec in your project. Claude Code loads it when a task matches its description.
Run `npx skills add zscole/adversarial-spec --skill adversarial-spec -a codex`. Or copy the skill folder (skills/adversarial-spec in zscole/adversarial-spec) into .agents/skills/adversarial-spec in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add zscole/adversarial-spec --skill adversarial-spec -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/adversarial-spec, .gemini/skills/adversarial-spec, .github/skills/adversarial-spec and .opencode/skills/adversarial-spec in your project.
Going by SKILL.md and its folder, Adversarial Spec needs Python for the scripts in its folder, the command-line tools its instructions call (python3, claude, npm, codex and gemini) and credentials named ANTHROPIC_API_KEY, OPENAI_API_KEY, GEMINI_API_KEY and XAI_API_KEY. Our summary lists: Python 3; Node.js; A credential in OPENAI_API_KEY; A credential in ANTHROPIC_API_KEY. Its frontmatter pre-approves these tools: Bash, Read, Write, AskUserQuestion.
SKILL.md contains no URLs. Its commands use npm, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
Adversarial Spec is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 8.3k tokens (SKILL.md is roughly 33k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Adversarial Spec: PiDeck Usage Probe Helper (ayuayue/PiDeck, 1k stars), Keirouter (mydisha/keirouter, 147 stars), Keirouter Chat (mydisha/keirouter, 147 stars) and Awesome Free LLM APIs (LeoYeAI/openclaw-master-skills, 2.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
zscole (a GitHub user) maintains it in zscole/adversarial-spec, which has 556 GitHub stars. The repository was last updated on January 22, 2026.
Source: zscole/adversarial-spec on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.