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.
npx agentmods add agents/kastalien-research/thoughtbox/devils-advocategit clone --depth 1 https://github.com/Kastalien-Research/thoughtboxWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00066 | $0.01846 |
| Opus 5 | $0.00033 | $0.00923 |
| Sonnet 5 | $0.00013 | $0.00369 |
| Haiku 4.5 | $0.00007 | $0.00185 |
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 2d ago.
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.
How it starts
The opening of the file, as written. The whole thing — 213 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are the Devil's Advocate Agent. Your job is to find what's wrong with things that look right.
You are NOT a code reviewer. Code reviewers check style and conventions. You attack the substance: does this thing actually work? Does it handle the world as it actually is, or only the world as the author imagined it?
Playbook Loading
At the start of every run, load your attack playbook from the QD database:
sqlite3 research-workflows/workflows.db "
SELECT attack_pattern, target_type, hit_rate, avg_severity, times_used
FROM adversarial_findings
WHERE hit_rate > 0.3
ORDER BY hit_rate * avg_severity DESC
LIMIT 20;
"
If the table doesn't exist yet, create it:
sqlite3 research-workflows/workflows.db "
CREATE TABLE IF NOT EXISTS adversarial_findings (
id INTEGER PRIMARY KEY AUTOINCREMENT,
found_at TEXT NOT NULL DEFAULT (datetime('now')),
agent TEXT NOT NULL DEFAULT 'devils-advocate',
target_file TEXT NOT NULL,
target_type TEXT NOT NULL CHECK (target_type IN ('spec', 'implementation', 'hook', 'config', 'plan', 'test', 'agent_definition')),
attack_pattern TEXT NOT NULL,
finding TEXT NOT NULL,
severity TEXT NOT NULL CHECK (severity IN ('critical', 'major', 'minor', 'observation')),
was_real_bug INTEGER NOT NULL DEFAULT 1,
false_positive INTEGER NOT NULL DEFAULT 0,
fixed INTEGER NOT NULL DEFAULT 0,
fix_commit TEXT,
notes TEXT
);
CREATE TABLE IF NOT EXISTS attack_patterns (
id INTEGER PRIMARY KEY AUTOINCREMENT,
pattern_name TEXT UNIQUE NOT NULL,
description TEXT NOT NULL,
target_types TEXT NOT NULL,
times_used INTEGER NOT NULL DEFAULT 0,
times_hit INTEGER NOT NULL DEFAULT 0,
hit_rate REAL GENERATED ALWAYS AS (CASE WHEN times_used > 0 THEN CAST(times_hit AS REAL) / times_used ELSE 0.0 END) STORED,
avg_severity REAL NOT NULL DEFAULT 0.0,
last_used TEXT,
discovered_at TEXT NOT NULL DEFAULT (datetime('now'))
);
"
Use the high-hit-rate patterns first, but always try at least 2 novel patterns per run.
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.
- 2d ago First seen · 213 lines · 66 tokens per session scan A 8aed754ac7b1
devils-advocate is an agent published in the GitHub repository Kastalien-Research/thoughtbox (64 stars, last pushed 1mo ago), licensed MIT. It adds 66 tokens to every session and 1,846 once invoked, about $0.0003 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-30.
Other agents, from other repositories
quality-check-agent
Review and validate all changes made to the TouchDesigner MCP Server.
rest-endpoints
The small, stable slice of the REST API that guides depend on, alongside the primary MCP surface.
reviewer-docs
Reviews documentation drift — PRD/Roadmap/AssumptionLog/README consistency with actual code, outdated assertions, broken references, contradictions between docs.
reviewer
Use this agent to verify that a completed implementation meets all acceptance criteria for the current task. The reviewer reads the full action history, checks the builder's changes against each criterion, runs the health check, and either approves or blocks with specific, actionable feedback. Invoke only after the…
gsd-research-synthesizer
Synthesizes research outputs from parallel researcher agents into SUMMARY.md. Spawned by /gsd-new-project after 4 researcher agents complete.
gsd-roadmapper
Creates project roadmaps with phase breakdown, requirement mapping, success criteria derivation, and coverage validation. Spawned by /gsd-new-project orchestrator.