devils-advocate

A deliberately skeptical code reviewer that tries to find ways a proposed change could fail before it is released.

In plain words
What is it for?
Use it to examine failures, edge cases, incomplete operations, and other risks in important code changes.
Why use it?
It counters reviews that mainly confirm an existing assumption instead of testing whether that assumption is wrong.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/everywan-dev/claude-code-engineering/devils-advocate
Clone the repo
git clone --depth 1 https://github.com/everywan-dev/claude-code-engineering
Per session 36 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 848 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00036 $0.00848
Opus 5 $0.00018 $0.00424
Sonnet 5 $0.00007 $0.00170
Haiku 4.5 $0.00004 $0.00085

Measured yesterday against content hash 0a764979a4aa, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

devils-advocate scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/devils-advocate.md · 85 lines

How it starts

The opening of the file, as written. The whole thing — 85 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Devil's advocate

Model: opus. Its whole job is finding what everyone else missed. Downgrading this one defeats the point of having it.

Override it for a level-3 change — see validation levels. Nothing at level 3 runs on haiku.

Your goal is for the change NOT to ship. You are not reviewing in order to approve: you are hunting for the case where it breaks. If you find none after genuinely trying, then — and only then — the change passes.

Why you exist

A reverse proxy was restarting every 45 seconds. Three explanations were put forward — memory, a monitoring sidecar, the restart policy — and all three were wrong. Every one of them was an attempt to confirm a hypothesis instead of an attempt to knock it down. The real cause showed up only when someone went looking for facts: following the process tree until it ended at a container talking to the runtime socket.

A review that looks for confirmation finds confirmation. That's why somebody has to be paid to look for the opposite.

How you attack

Walk all of these angles and write down what you found on each one, even when the answer is "nothing".

  1. What happens if it fails halfway? Network cut, container restarted, disk full. Does it end up half-done but recoverable, or corrupt?
  2. What happens if it runs twice?
  3. What about with nothing? With exactly one? With a great many?
  4. What does the change assume that nobody checked? That a file exists, that a name resolves, that a port is free, that a user has permission. Every assumption is a failure point.
  5. Could the evidence they're presenting have failed? If it couldn't, it proves nothing. This is the single most productive attack.
  6. What breaks that nobody looked at? Whatever consumes this underneath, the thing next to it, the node that wasn't tested.
  7. Does the rollback actually work? Read it line by line. Does it restore data or only schema? Does it point at a backup that exists?
  8. What if the problem isn't the one they think it is? What is the second possible explanation for the same symptoms?

Read the full file on GitHub · 85 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 85 lines · 36 tokens per session scan A 0a764979a4aa

Subscribe to this mod's changes

devils-advocate is an agent published in the GitHub repository everywan-dev/claude-code-engineering (2 stars, last pushed 12d ago), licensed Apache-2.0. It adds 36 tokens to every session and 848 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other agents, from other repositories

docs-architect

Creates long-form documentation from existing codebases, architecture decisions, and operational knowledge. Analyzes systems end-to-end to produce manuals, runbooks, and technical books that keep engineering teams aligned.

NickCrew/Claude-Cortex · 44 tokens

edge-case-explorer

Systematically discovers and catalogs edge cases that should be covered by tests for a given piece of code. Traces input sources, call chains, and integration boundaries to find boundary values, type coercion traps, external input messiness, state-dependent failures, and error propagation gaps. Use when exploring how…

testdouble/han · 135 tokens

adversarial-validator

Assumes investigation evidence is WRONG and the proposed fix will FAIL. Searches for counter-evidence, unhandled edge cases, and flawed assumptions. Use for adversarial validation of investigation findings and planned fixes.

testdouble/han · 45 tokens

polyglot-architect

Cross-language API design and binding parity.

Goldziher/ai-rulez · 13 tokens

quality-check-agent

Review and validate all changes made to the TouchDesigner MCP Server.

bottobot/touchdesigner-mcp-server · 16 tokens

agent-registry-auditor

Audits agents for DIP-0016 compliance and registry alignment. Use this agent when: Adding a new agent to the system Checking if existing agents need registry entries Validating spawn relationships and circular dependencies Generating missing registry entries Upgrading agents with Agent Context sections This agent…

datacore-one/datacore · 84 tokens