Run /doctor to Diagnose Configuration and Connection Issues
Something's off — Claude can't reach an MCP server, a hook isn't firing, or the settings seem wrong. Instead of hunting through config files, run the built-in diagnostic.
/doctor
Claude Code checks everything that could be misconfigured and reports what's healthy and what's broken — API authentication, MCP server connections, settings conflicts, and tool availability.
This is the first thing to run when you hit unexpected behavior:
# Claude says it can't find a tool you configured
/doctor
# → Shows that the MCP server failed to start because the npm package isn't installed
# Claude is using the wrong model or settings
/doctor
# → Shows a local setting overriding your project setting
# Claude can't connect to anything
/doctor
# → Shows your API key is expired or the network is blocking the connection
Common issues /doctor catches:
- MCP server failures — a server that can't start, crashed, or isn't responding
- Authentication problems — expired or missing API keys
- Settings conflicts — a local override hiding a project setting you expected
- Missing dependencies — MCP servers that need packages you haven't installed
- Version mismatches — running an old version that doesn't support a feature you're trying to use
When reporting issues to your team or filing a bug report, /doctor output gives you the diagnostic information needed to explain the problem clearly.
For quick health checks:
# After changing settings
/doctor
# After adding a new MCP server
/doctor
# After updating Claude Code
/doctor
# When something that worked yesterday doesn't work today
/doctor
When Claude Code misbehaves, don't guess — /doctor tells you exactly what's wrong and where to fix it.
via Claude Code
Log in to leave a comment.
When a page takes five seconds to load or an API endpoint times out under load, tell Claude which route is slow and it traces the entire code path — controller, services, queries, loops — identifying N+1 queries, redundant computations, missing indexes, and cacheable operations, then fixes each bottleneck.
Flaky tests are maddening — they pass locally, fail in CI, pass again when you retry. Tell Claude to read the test, identify the source of non-determinism — timing issues, shared state, date dependencies, or order-dependent setup — and fix the root cause so the test is reliably green or reliably red.
When your app throws an error, don't just Google the message — paste the full stack trace into Claude Code. It reads the trace, opens the referenced files in your codebase, follows the call chain, and pinpoints the actual root cause instead of just explaining the symptom.