docs(plugins): fix inaccurate uninstall cleanup instructions

Verified against a real claude plugin uninstall: it only drops the plugin
from the enabled list. The server keeps running, the cached source stays on
disk, and the hook entries claude plugin install wrote into settings.json
are left behind pointing at the now-uninstalled cache dir — silently fails
once Claude Code eventually GCs it. The previous instructions ("uninstall
removes the hooks and the cached source") were untested assumptions; this
adds the missing settings.json cleanup step.
This commit is contained in:
2026-08-10 16:56:40 +07:00
parent 205f40c29c
commit f6946d72f4
+36 -7
View File
@@ -147,18 +147,47 @@ single port.
### Uninstalling ### Uninstalling
`claude plugin uninstall ccam@claude-code-agent-monitor-plugins` removes the hooks `claude plugin uninstall ccam@claude-code-agent-monitor-plugins` only removes
and the cached source. It does not touch the state the plugin created outside the plugin from the enabled list — verified against a real install/uninstall,
the cache — remove those by hand if you want a clean machine: not assumed. It does **not**:
- stop the running server (it keeps serving from the now-uninstalled cache dir)
- remove the cached source under `~/.claude/plugins/cache/.../ccam/<version>/`
- remove the hook entries `claude plugin install` wrote into
`~/.claude/settings.json` (still pointing at that cache dir — they keep
firing, and keep working, until the cache directory is eventually GC'd by
Claude Code, at which point they silently start failing)
- remove `~/.local/bin/ccam` or `~/.claude/agent-dashboard/runtime/`
For a clean machine, do all of this yourself:
```bash ```bash
kill "$(node -e 'console.log(JSON.parse(require("fs").readFileSync(require("os").homedir()+"/.claude/.agent-dashboard.json","utf8")).servers[0].pid)')" # 1. Stop the server (skip if ~/.claude/.agent-dashboard.json is already gone)
kill "$(node -e 'console.log(JSON.parse(require("fs").readFileSync(require("os").homedir()+"/.claude/.agent-dashboard.json","utf8")).pid)')"
# 2. Runtime state and the CLI launcher
rm -rf ~/.claude/agent-dashboard/runtime # deps, UI bundle, logs, state rm -rf ~/.claude/agent-dashboard/runtime # deps, UI bundle, logs, state
rm -f ~/.local/bin/ccam # the CLI launcher rm -f ~/.local/bin/ccam
# ~/.claude/agent-dashboard/ still holds the database — delete it only if you
# want the recorded history gone too. # 3. The hook entries claude plugin install wrote (settings.json is not
# ours to fully own — back it up first and only drop entries mentioning
# hook-handler.js)
node -e '
const fs = require("fs");
const p = require("os").homedir() + "/.claude/settings.json";
const d = JSON.parse(fs.readFileSync(p, "utf8"));
fs.copyFileSync(p, p + ".ccam-bak2");
for (const [type, entries] of Object.entries(d.hooks || {})) {
const kept = entries.filter((e) => !JSON.stringify(e).includes("hook-handler.js"));
if (kept.length) d.hooks[type] = kept; else delete d.hooks[type];
}
fs.writeFileSync(p, JSON.stringify(d, null, 2) + "\n");
'
``` ```
`~/.claude/agent-dashboard/` still holds the SQLite database after all of the
above — delete that directory too only if you want the recorded history gone.
## Available Plugins ## Available Plugins
### 1. `ccam-analytics` — Analytics & Monitoring ### 1. `ccam-analytics` — Analytics & Monitoring