
Run /doctor Before It's an Emergency: Keep Your Claude Code Setup Fast and Lean
Chris Harper
3 min read
Jul 30, 2026 · 04:09 UTC
/doctor (alias /checkup) now diagnoses and fixes context bloat in one pass — oversized CLAUDE.md, unused skills and plugins, duplicate rules, slow hooks — and most Claude Code users haven't run it since it got smart.
Every Claude Code session loads everything before the first tool call: your CLAUDE.md, every enabled skill, every plugin, every hook. None of that is visible while it's loading, and none of it is free. A CLAUDE.md that grew to 6,000 tokens adds quiet overhead to every session start. A skill you enabled six months ago and never use still loads its description into context. A slow hook that takes two seconds adds that wait to every project open.
/doctor (or /checkup) was originally a read-only diagnostic. Since v2.1.205 it finds problems and proposes fixes — showing diffs, asking for your approval before changing anything.
What /doctor catches
Oversized CLAUDE.md. When your project-level or global CLAUDE.md exceeds a size threshold, /doctor identifies sections Claude could reliably derive from the codebase itself and proposes removing them. It shows the trim as a diff so you can review exactly what would go.
Unused skills and plugins. /doctor tracks which skills and plugins haven't been invoked in recent sessions. It lists them with estimated per-session context cost and offers to disable the ones you never touch. You review each one before it's changed.
Duplicate rules. If your local CLAUDE.local.md repeats rules already in the committed .claude/CLAUDE.md, /doctor flags the overlap and proposes deduplication.
Slow hooks. Hooks that add more than a threshold of startup latency get flagged. /doctor shows measured timing per hook so you can decide what to do.
Run it
/doctor
Or the alias:
/checkup
The output is interactive: /doctor explains each finding, shows what it would change, and only modifies what you explicitly approve. Nothing changes automatically.
Make it a habit
Run /doctor after any of these:
- You install a new skill or plugin (verify no duplication)
- A project feels slower than usual at session start
- You've substantially expanded your CLAUDE.md
- It's been more than a few weeks since you last ran it
The maintenance cost is one command every couple of weeks. The payoff is sessions that start lean and focused.
Sources: Debug your configuration — Claude Code Docs · /doctor no longer just diagnoses — wmedia.es · Claude Code /checkup Explained — MCP.Directory · Claude Code Skills Complete Guide — hidekazu-konishi.com