Fix disabled Claude Code plugins that keep firing anyway.
When you disable a plugin in Claude Code's /plugin UI, the toggle flips to "disabled" — but the plugin's skills still show up in autocomplete and still execute when invoked. /simplify will fire even though code-simplifier is disabled.
This happens because Claude Code's plugin system has three independent layers that don't stay in sync:
| Layer | File | What happens on disable |
|---|---|---|
| Settings | ~/.claude/settings.json |
enabledPlugins[id] set to false |
| Ledger | ~/.claude/plugins/installed_plugins.json |
Entry stays. Nothing changes. |
| Cache | ~/.claude/plugins/cache/{marketplace}/{plugin}/ |
Files stay on disk. Skills still load from here. |
The skill resolver reads from cache. It doesn't check the settings flag. So "disabled" is cosmetic.
Worse: if you manually delete the cache, /reload-plugins re-downloads it because the ledger and settings entries still exist. You have to purge all three layers or it comes right back.
Scans all three layers, finds the disagreements, and deletes everything for disabled plugins in one shot:
- Deletes the cache directory (stops skills from loading)
- Removes the ledger entry (stops re-download on reload)
- Removes the
enabledPluginsentry (stops it showing in the Installed tab)
Also finds orphan caches — directories in plugins/cache/ that have no corresponding settings entry at all.
# See what's broken (no changes made)
bash plugin-doctor.sh
# Preview what would be deleted
bash plugin-doctor.sh --dry-run
# Fix it — purge all disabled plugin artifacts
bash plugin-doctor.sh --fixAfter --fix, run /reload-plugins in Claude Code to apply.
Copy to your Claude Code skills directory to get /plugin-doctor in autocomplete:
mkdir -p ~/.claude/skills/plugin-doctor
cp plugin-doctor.sh ~/.claude/skills/plugin-doctor/
cp SKILL.md ~/.claude/skills/plugin-doctor/Or with npx (if published to skills.sh):
npx skills add adairlabs/plugin-doctor
Plugin Doctor — Claude Code plugin layer audit
────────────────────────────────────────────────
● Enabled plugins: 9
● Disabled plugins: 75
Zombie Scan (disabled in settings, cache still on disk)
✗ code-simplifier@claude-plugins-official
Cache: ~/.claude/plugins/cache/.../code-simplifier/1.0.0 (20K)
⚠ 1 skill/agent file(s) still loadable
✗ engineering-skills@claude-code-skills
Cache: ~/.claude/plugins/cache/.../engineering-skills/2.1.2 (5.0M)
⚠ 50 skill/agent file(s) still loadable
...
Orphan Scan (cache dirs with no settings.json entry)
? postman@claude-plugins-official (283M)
? imessage@claude-plugins-official (29M)
? claude-mem@thedotmack (250M)
...
Summary
Zombies: 74
Ledger-only: 0
Orphan caches: 25
Disabled code-simplifier in the plugin UI. Ran /simplify. It fired anyway. Dug into each layer:
settings.jsoncorrectly saidfalse- Plugin UI correctly showed "disabled"
/reload-pluginsdropped the plugin count from 10 to 9- But the skill count stayed at 12 — unchanged
/simplifystill appeared in autocomplete- The cache directory still had the agent
.mdfile on disk - Deleting just the cache didn't work —
/reload-pluginsre-downloaded it - Had to purge settings + ledger + cache together to actually kill it
74 disabled plugins were in this state. 25 more were orphaned caches with no settings entry at all. Some were 250MB+.
| File | Purpose |
|---|---|
plugin-doctor.sh |
Diagnostic + cleanup script |
SKILL.md |
Claude Code skill definition (enables /plugin-doctor command) |
jq—brew install jq- Claude Code with the plugin system