claude-doctor

Analyzes recent session learnings and creates a PR proposing Claude configuration improvements.

Updated May 18, 2024
One-click install
npx skills add https://github.com/joshhornby/dotfiles --skill claude-doctor-joshhornby
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: claude-doctor
Source: https://github.com/joshhornby/dotfiles/tree/main/.claude/skills/claude-doctor
Command: npx skills add https://github.com/joshhornby/dotfiles --skill claude-doctor-joshhornby

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Corrections, workarounds, and preferences discovered during Claude Code sessions are easily lost, so the same mistakes repeat. This Skill scans recent memory files, git history, and session context, then turns those observations into concrete, evidence-backed improvements to CLAUDE.md, skills, hooks, and memory files via a reviewable pull request. ## Core Features & Use Cases - Multi-source observation gathering: Reads auto memory files under ~/.claude/projects/*/memory/, recent git commits, and current session friction within a configurable lookback window (default 8 hours). - Categorized improvement proposals: Groups findings into coding conventions, workflow preferences, tool usage, missing skills, hook improvements, and memory gaps, each mapped to a target file. - Approval-gated changes: Presents every proposed change with cited evidence and requires explicit user approval before editing any file. - PR-based delivery: Applies approved changes on a dated branch and opens a PR summarizing each change with its motivating observation. - Use Case: After a week of sessions where you repeatedly corrected commit message style and TypeScript typing, run the Skill to get a PR that codifies those rules into CLAUDE.md. ## Quick Start Ask Claude to run the claude-doctor skill to review the last 8 hours of learnings and propose configuration improvements.

Frequently Asked Questions about claude-doctor

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I turn Claude Code session corrections into permanent rules?

Run the claude-doctor skill, which scans recent memory files, git history, and session context for corrections and preferences. It drafts specific rule changes, asks for your approval, then opens a PR updating CLAUDE.md or related config files.

How far back does the learning analysis look?

The default lookback window is 8 hours, controlled by the argument passed to the skill. You can supply a different number of hours to widen or narrow the scan of memory files and git commits.

Does claude-doctor modify files without my approval?

No. Every proposed improvement is presented with its motivating observation, and the skill explicitly requires user approval before editing any file. It also never removes existing configuration unless removal is explicitly approved.

What files can the improvement PR change?

Changes are scoped to Claude configuration only: CLAUDE.md, skill definitions under .claude/skills, hook settings in .claude/settings.local.json, and memory files. Application code is never modified.

What are the limitations of automated config improvement?

Proposals are only as good as the observed evidence, so sparse memory files or short lookback windows yield fewer findings. The skill avoids speculation, meaning subtle preferences never stated or corrected in sessions will not be captured.