Claude Code so bad it needs therapy? There's a doctor for that.
This tool reads your `~/.claude/` transcripts and writes the rules your AI assistant should have been following all along.

What it does
claude-doctor is a TypeScript CLI that performs post-mortems on your Claude Code sessions. It scans ~/.claude/ transcripts for behavioral anti-patterns—structural, behavioral, and lexical—and generates ready-to-paste rules for CLAUDE.md or AGENTS.md. Think of it as a linter for your human-AI collaboration.
The interesting bit Rather than preaching generic best practices, it derives guardrails from your actual failures. It builds per-project signal baselines from your history, so the advice is personalized: if you constantly abandon sessions, thrash on the same file, or slowly devolve into one-word corrections, the tool notices and writes rules to address your specific dysfunction.
Key highlights
- Flags structural anti-patterns like
edit-thrashing,error-loop, and read-to-edit ratios above 10:1 - Detects behavioral tics including
correction-heavyuser messages,keep-going-loopprompts, andnegative-drifttoward terse replies - Scores sentiment with AFINN-165 plus custom agent tokens such as
undo,revert, andbroken - Exports a persistent project model to
.claude-doctor/withmodel.jsonprofiles andguidance.mdfor agent hooks
Verdict
Useful if you maintain long-running Claude Code projects and want data-driven CLAUDE.md rules. If your AI chats are ephemeral one-offs, you won’t have enough history to bother.
Frequently asked
- What is millionco/claude-doctor?
- This tool reads your `~/.claude/` transcripts and writes the rules your AI assistant should have been following all along.
- Is claude-doctor open source?
- Yes — millionco/claude-doctor is an open-source project tracked on heatdrop.
- What language is claude-doctor written in?
- millionco/claude-doctor is primarily written in TypeScript.
- How popular is claude-doctor?
- millionco/claude-doctor has 605 stars on GitHub.
- Where can I find claude-doctor?
- millionco/claude-doctor is on GitHub at https://github.com/millionco/claude-doctor.