ContextPruner

What is CLAUDE.local.md?

CLAUDE.local.md is your personal, gitignored version of CLAUDE.md — machine-local Claude Code instructions that never reach the team. When and how to use it.

Short answer

CLAUDE.local.md is a personal, machine-local version of CLAUDE.md: the same Markdown format doing the same job of briefing Claude Code on your repo, but gitignored so it stays off the team’s shared config. Claude reads it at the start of every session alongside the committed CLAUDE.md, which makes it the right home for instructions that are yours alone — a local sandbox URL, personal test data, a tooling shortcut — that don’t belong in everyone else’s file.

CLAUDE.mdis the file you commit so every teammate's Claude Code gets the same brief. But some of what you'd tell Claude is only true on your machine — a local API port, the path to a scratch folder, a habit nobody else needs. CLAUDE.local.md is where that goes: same format, loaded the same way, but private to you.

CLAUDE.local.md vs CLAUDE.md

FileIn git?Who it's forWhat goes in it
CLAUDE.mdYes — checked inThe whole teamShared conventions, build & test commands, the repo’s skip list
CLAUDE.local.mdNo — you gitignore itJust you, on this machinePersonal paths, local URLs, private test data, your own overrides

Both load at the start of every Claude Code session for that project. CLAUDE.md is read first, then CLAUDE.local.md — they stack together rather than one replacing the other, so your personal notes add to the shared brief instead of overwriting it.

What to put in it

What doesn't belong here is anything the team should share — build commands, code conventions, the repo-wide ignore list. Those go in the committed CLAUDE.md (or AGENTS.md) so everyone benefits.

How to set it up

# .gitignore
CLAUDE.local.md

# CLAUDE.local.md
- The API runs locally on port 8788, not 3000.
- Scratch data lives in ~/dev/scratch — safe to overwrite.
- Skip the /vendor-sandbox folder; it's my local experiment.

When to reach for something else

Common questions about CLAUDE.local.md

Is CLAUDE.local.md gitignored automatically?

No — you add it to .gitignoreyourself. Until you do, it's an ordinary tracked file and git will happily commit it. The .local in the name is a convention, not automatic privacy.

Does CLAUDE.local.md override CLAUDE.md?

No. Both files load and stack together — CLAUDE.md first, then CLAUDE.local.md — so your personal notes add to the shared brief rather than replacing it. Where they say different things, the later, more specific instruction is the one Claude reads last.

Where do I put personal instructions that apply to every project?

Use your user-level memory file at ~/.claude/CLAUDE.md. It loads for every Claude Code session on your machine, across all repos — whereas CLAUDE.local.md is scoped to the one project it sits in.

Should I commit CLAUDE.local.md so my team gets it?

No — that defeats its purpose. If instructions should be shared, put them in the committed CLAUDE.md (or AGENTS.md) instead. CLAUDE.local.md exists precisely for the things that should stay on your machine.

New to the shared file it complements? Start with how to write a CLAUDE.md, or see CLAUDE.md vs AGENTS.md if you're deciding which shared file your project needs.

Related guides