uninstall

An uninstall command for removing the deliberation setup, including its MCP server configuration, rules, local cache, and copied command shortcuts. MCP is the connection layer used here between Codex and external expert assistants.

In plain words
What is it for?
Use it when you no longer want the deliberation assistants, rules, cache, or related command aliases installed in Claude Code.
Why use it?
It removes the setup in a controlled, repeatable way and tolerates parts that are already missing. It also checks whether any deliberation configuration remains.

Command

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 commands/antonbabenko/deliberation/uninstall
Clone the repo
git clone --depth 1 https://github.com/antonbabenko/deliberation
Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,614 The whole file, excluding the scripts and references it only reads on demand.
Security scan D 2 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.00014 $0.01614
Opus 5 $0.00007 $0.00807
Sonnet 5 $0.00003 $0.00323
Haiku 4.5 $0.00001 $0.00161

Measured 2d ago against content hash fdb7e6d7d957, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade D, and why

uninstall scanned grade D with 2 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.

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)

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf "$HOME/.claude/rules/deliberation/" 2>/dev/null || true
commands/uninstall.md · 120 lines

How it starts

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

Uninstall

Remove deliberation from Claude Code: MCP registrations, installed rules, the local Grok cache, and any short command aliases that /setup copied.

This runs as one confirmation turn, then ONE main Bash call. Do not batch the Bash call with the AskUserQuestion.

Step 1: Confirm

Ask with AskUserQuestion (this turn has NO Bash call): "Remove deliberation MCP servers, rules, Grok cache, and short command aliases?" Options: "Yes, uninstall" / "No, cancel".

If cancelled, stop here.

Step 2: Remove everything

Run the block below as ONE Bash call. Do NOT split it, and do NOT batch it with any other tool call. Every removal is tolerant of absence (no error if already gone).

Run it with the Bash sandbox DISABLED. It writes ~/.claude.json (MCP removal) and deletes under ~/.claude/; a sandbox blocks those and the servers stay registered. The block verifies the removal at the end and prints a CRITICAL line if any deliberation* entry survives.

It removes the namespaced deliberation-* servers, the unified deliberation server, the rules dir, the Grok cache dir, and only the aliases that are byte-identical to the bundled commands (a user-authored same-named command is left untouched).

set -u

# --- resolve plugin root (non-fatal): env var -> cache (highest semver) -> current checkout ---
# Only the byte-identical alias check below needs it; empty is fine - MCP/rules/cache still purge.
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
}
PLUGIN_ROOT="$(resolve_plugin_root || true)"

# --- MCP registrations (namespaced + unified) ---
for s in deliberation deliberation-codex deliberation-gemini deliberation-grok deliberation-openrouter; do
  claude mcp remove --scope user "$s" >/dev/null 2>&1 || true
done
echo "Removed MCP registrations (user scope)."

# --- rules dir ---
rm -rf "$HOME/.claude/rules/deliberation/" 2>/dev/null || true
echo "Removed rules dir."

# --- Grok dedup cache; metadata only, safe to drop. Canonical XDG. ---
# Mirror core/paths.js: a RELATIVE XDG_CACHE_HOME is ignored (else rm -rf would
# target a path relative to $PWD) and the default ~/.cache used.
if [ -n "${XDG_CACHE_HOME:-}" ] && [ "${XDG_CACHE_HOME#/}" != "${XDG_CACHE_HOME}" ]; then
  CACHE_BASE="$XDG_CACHE_HOME"
else
  CACHE_BASE="$HOME/.cache"
fi
rm -rf "$CACHE_BASE/deliberation/" 2>/dev/null || true
echo "Removed Grok file cache."

# --- short command aliases: remove ONLY if byte-identical to the bundled command ---
removed=""; kept=""
# Superset of every name any setup version ever installed: `grok-files` and `analyze` are no
# longer installed, but older installs still have them and should still be cleaned up.
for c in ask-gpt ask-gemini ask-grok ask-openrouter ask-all consensus grok-files analyze; do
  dest="$HOME/.claude/commands/$c.md"
  src="$PLUGIN_ROOT/commands/$c.md"
  [ ! -e "$dest" ] && continue
  if [ -n "$PLUGIN_ROOT" ] && [ -f "$src" ] && cmp -s "$src" "$dest"; then
    rm -f "$dest" && removed="$removed /$c"
  else
    kept="$kept /$c"
  fi
done
# Obsolete /ask-both (renamed to /ask-all in 1.7.0): remove only if it carries the bundled
# fingerprint, so a user-authored ask-both.md is left untouched.
ob="$HOME/.claude/commands/ask-both.md"
if [ -e "$ob" ] && grep -q "name: ask-both" "$ob" 2>/dev/null && grep -q "deliberation" "$ob" 2>/dev/null; then
  rm -f "$ob" && removed="$removed /ask-both"
elif [ -e "$ob" ]; then
  kept="$kept /ask-both"
fi
echo "Aliases removed:${removed:- none}"
[ -n "$kept" ] && echo "Aliases left untouched (differ from bundled / user-authored):$kept"

echo
# --- verify the removals landed (catches silent sandbox write failures on ~/.claude.json) ---
LEFT="$(node -e 'const fs=require("fs"),h=require("os").homedir();try{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){process.stdout.write("")}')"
if [ -n "$LEFT" ]; then
  echo "CRITICAL: these MCP entries still remain: $LEFT"
  echo "A Bash sandbox likely blocked the write to ~/.claude.json. Re-run /deliberation:uninstall"
  echo "with the sandbox DISABLED (see /sandbox)."
  echo
fi
echo "Uninstall complete. Restart Claude Code so the removed MCP servers drop from the session."
echo "To reinstall: /deliberation:setup"

Read the full file on GitHub · 120 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. 2d ago First seen · 120 lines · 14 tokens per session scan D fdb7e6d7d957

Subscribe to this mod's changes

uninstall is a command published in the GitHub repository antonbabenko/deliberation (138 stars, last pushed 4d ago), licensed MIT. It adds 14 tokens to every session and 1,614 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it D with 2 findings (reads agent configuration directories, recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.