millionco/claude-doctor
A CLI tool that diagnoses Claude Code session transcripts to detect usage anti-patterns and auto-generate agent configuration rules.

claude-doctor parses ~/.claude/ transcript files to identify problematic interaction patterns such as edit thrashing, error loops, correction-heavy exchanges, and excessive user guidance. It scores sessions using structural, behavioral, and lexical signals (including AFINN sentiment and custom agent tokens). The –rules flag synthesizes findings across multiple sessions to produce ready-to-paste CLAUDE.md or AGENTS.md guidelines tailored to the user’s actual workflow.