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 commands/antonbabenko/deliberation/doctorgit clone --depth 1 https://github.com/antonbabenko/deliberationWhat 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.00032 | $0.02136 |
| Opus 5 | $0.00016 | $0.01068 |
| Sonnet 5 | $0.00006 | $0.00427 |
| Haiku 4.5 | $0.00003 | $0.00214 |
Grade B, and why
doctor scanned grade B with 1 finding 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.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
local c; c=$(find "$HOME/.claude/plugins/cache" -maxdepth 6 -path '*/deliberation/*/server/mcp/index.js' -type f 2>/dev/null | sort -V | tail -1) How it starts
The opening of the file, as written. The whole thing — 144 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Doctor
A quick health check for deliberation. It looks at what is actually set up on this machine - your config, the provider CLIs, the session store - and tells you what is fine, what is off, and the exact command to fix each problem.
It never changes anything. Every fix is yours to run.
How it works
Two steps in order:
- One Bash call - all the local checks (config, CLIs, keys, sessions dir,
stale registrations). Run it with the sandbox disabled - it reads
~/.claude.json,~/.config, and~/.cache, which a sandbox blocks. - One
analyzetool call - to learn the path the running server resolved, so we can catch the one drift bug a local check can't see on its own.
Render a flutter doctor-style report: one line per check, tagged [OK],
[WARN], or [FAIL], and a fix line under anything that is not OK. End with a
one-line summary. If everything passes, say so in one line - do not pad it.
Step 1: Local checks (ONE Bash call, sandbox DISABLED)
set -u
ok(){ printf '[OK] %s\n' "$1"; }
warn(){ printf '[WARN] %s\n' "$1"; }
fail(){ printf '[FAIL] %s\n' "$1"; }
# --- plugin root + version: env -> marketplace cache (highest semver) -> checkout ---
resolve_plugin_root() {
if [ -n "${CLAUDE_PLUGIN_ROOT:-}" ] && [ -f "$CLAUDE_PLUGIN_ROOT/server/mcp/index.js" ]; then printf '%s' "$CLAUDE_PLUGIN_ROOT"; return 0; fi
local c; c=$(find "$HOME/.claude/plugins/cache" -maxdepth 6 -path '*/deliberation/*/server/mcp/index.js' -type f 2>/dev/null | sort -V | tail -1)
if [ -n "$c" ]; then printf '%s' "${c%/server/mcp/index.js}"; return 0; fi
if [ -f "$PWD/server/mcp/index.js" ] && grep -q '"name": "deliberation"' "$PWD/.claude-plugin/plugin.json" 2>/dev/null; then printf '%s' "$PWD"; return 0; fi
return 1
}
echo "== deliberation doctor =="
PR="$(resolve_plugin_root || true)"
if [ -n "$PR" ]; then
VER="$(node -e "process.stdout.write(require('$PR/package.json').version||'?')" 2>/dev/null || echo '?')"
ok "plugin found ($PR, v$VER)"
else
fail "plugin root not found"; echo " fix: reinstall with /plugin, then /deliberation:setup"
fi
# --- config: env override > canonical XDG ---
CFG="${DELIBERATION_CONFIG:-${XDG_CONFIG_HOME:-$HOME/.config}/deliberation/config.json}"
case "$CFG" in /*) ;; *) CFG="$HOME/.config/deliberation/config.json";; esac
if [ -f "$CFG" ]; then
if node -e "JSON.parse(require('fs').readFileSync('$CFG','utf8'))" 2>/dev/null; then
ok "config valid ($CFG)"
node -e '
const c=JSON.parse(require("fs").readFileSync(process.argv[1],"utf8"));
const s=c.sessions||{}, d=c.debug||{};
console.log((s.persist?"[OK] ":"[WARN] ")+"sessions.persist: "+(!!s.persist)+(s.persist?"":" fix: set sessions.persist:true for /analyze Lens B"));
console.log((d.enabled?"[OK] ":"[WARN] ")+"debug.enabled: "+(!!d.enabled)+(d.enabled?"":" fix: set debug.enabled:true for /analyze Lens A"));
' "$CFG"
else
fail "config is not valid JSON ($CFG)"; echo " fix: correct the JSON, or move it aside and run /deliberation:setup"
fi
else
warn "no config at $CFG"; echo " fix: run /deliberation:setup"
fi
# --- provider CLIs (presence + version only; auth is confirmed by a real /ask-* call) ---
if command -v codex >/dev/null 2>&1; then ok "codex CLI on PATH ($(codex --version 2>/dev/null | head -1))"; else warn "codex (GPT) not on PATH"; echo " fix: install the Codex CLI, or ignore if you don't use GPT"; fi
if command -v agy >/dev/null 2>&1; then ok "agy CLI on PATH (Gemini)"; else warn "agy (Gemini) not on PATH"; echo " fix: install the Antigravity CLI, or ignore if you don't use Gemini"; fi
[ -n "${XAI_API_KEY:-}" ] && ok "XAI_API_KEY set (Grok)" || warn "XAI_API_KEY unset - Grok calls return missing-auth"
[ -n "${OPENROUTER_API_KEY:-}" ] && ok "OPENROUTER_API_KEY set" || warn "OPENROUTER_API_KEY unset - OpenRouter models will error"
# --- sessions dir the SHELL resolves (compared to the server's in step 2) ---
SD="${DELIBERATION_SESSIONS:-${XDG_CACHE_HOME:-$HOME/.cache}/deliberation/sessions}"
case "$SD" in /*) ;; *) SD="$HOME/.cache/deliberation/sessions";; esac
echo "SHELL_SESSIONS_DIR=$SD"
if [ -d "$SD" ]; then
N=$(ls -1 "$SD"/*.json 2>/dev/null | wc -l | tr -d ' ')
ok "sessions dir exists ($SD, $N record(s))"
else
warn "sessions dir not found ($SD) - nothing persisted there yet"
fi
# --- stale user-scope MCP registrations (the inline plugin manifest is the SSOT) ---
LEFT="$(node -e 'try{const fs=require("fs"),h=require("os").homedir();const j=JSON.parse(fs.readFileSync(h+"/.claude.json","utf8"));const m=j.mcpServers||{};process.stdout.write(Object.keys(m).filter(k=>k==="deliberation"||k.indexOf("deliberation-")===0).join(" "))}catch(e){}')"
[ -n "$LEFT" ] && { warn "user-scope MCP entries shadow the plugin manifest: $LEFT"; echo " fix: /deliberation:uninstall (then they load from the plugin)"; } || ok "no shadowing user-scope MCP registrations"
echo "== end local checks =="
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 · 144 lines · 32 tokens per session scan B 8fe7b660e0ed
doctor is a command published in the GitHub repository antonbabenko/deliberation (138 stars, last pushed 5d ago), licensed MIT. It adds 32 tokens to every session and 2,136 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
ask
Query multiple AI agents (Gemini, OpenAI, Grok, Perplexity, Kimi, and a local ollama model) for diverse perspectives on architecture decisions, technology choices, debugging dead-ends, and security tradeoffs. Use this whenever the user names the council directly, whatever the topic — ask the council, council review…
result
Fetch, list, or cancel background council jobs started with --async.
status
Check connectivity and configuration status of all council providers.
setup
First-run wizard — pick AI providers, walk through CLI install + auth, verify each, save settings.
settings
Show or change which AI providers are enabled, the default, and the /ai:compare set.
codex-update
Install or update the upstream openai/codex-plugin-cc to the pinned tag.