What is CLAUDE.md?
CLAUDE.md is Claude Code's memory file — Markdown instructions it loads automatically at the start of every session. It comes in three layers: global (~/.claude/CLAUDE.md, applies everywhere), project (CLAUDE.md at the repo root, committed to git), and local (CLAUDE.local.md, git-ignored personal notes). All applicable layers load together.
The three layers
| File | Location | Scope | Typical content |
|---|---|---|---|
| Global | ~/.claude/CLAUDE.md | Every project you touch | Personal style: "prefer early returns", "never force-push" |
| Project | <repo>/CLAUDE.md | Everyone on the repo | Build commands, architecture, project conventions |
| Local | <repo>/CLAUDE.local.md | Just you, this repo | Personal notes, machine-specific paths (git-ignored) |
Monorepos can nest additional CLAUDE.md files in subdirectories; Claude Code reads the ones on the path to wherever it's working. Everything in a loaded CLAUDE.md is always-on — unlike skills, which load on demand when their description matches the task.
What belongs in it (and what doesn't)
The file is prepended to every session, so every line costs attention. Strong CLAUDE.md files are short and factual:
# MyApp
## Commands
- Build: pnpm build · Test: pnpm test (vitest)
## Rules
- API routes live in src/server/routes — one file per resource
- Don't touch src/legacy/ — scheduled for deletion
Things that don't belong: long prose, information Claude can read from the code itself, or instructions for other tools. If several tools need the same instructions, that's what AGENTS.md is for — same content, tool-neutral filename.
The sprawl problem
CLAUDE.md multiplies quietly. Six months of AI-assisted work leaves one in nearly every repo — active projects, abandoned experiments, that thing you cloned once. Some are gold (conventions you refined over weeks); some are stale enough to actively mislead. And they're invisible unless you remember to look.
See every CLAUDE.md you own
Desastre scans your machine and lists every CLAUDE.md and CLAUDE.local.md it finds, tagged with the project it belongs to, with last-modified dates so stale ones stand out. Preview any of them fully rendered, reveal them on disk, trash the dead ones — and when another tool needs the same instructions, "Copy to tool…" turns a CLAUDE.md into an AGENTS.md or GEMINI.md in one click.
Desastre — AI config manager for Mac
Every CLAUDE.md, skill and agent on your machine — plus 18 other tools — in one native window. $1.99, one time.
Download on the Mac App Store