Where CLAUDE.md Files Live
Some instructions are about you ("keep explanations short"), some are about the whole project ("run pytest -q"), and some are about one corner of it ("every string in the templates must be bilingual"). Claude Code reads instruction files from several places, so each kind can live where it belongs.
The rule
Put each instruction at the narrowest level where it is always true.
| Location | Applies to | Shared? |
|---|---|---|
~/.claude/CLAUDE.md |
You, in every project | No, it stays on your machine |
CLAUDE.md at the project root |
Everyone working on this project | Yes, commit it |
CLAUDE.md in a subfolder, such as templates/CLAUDE.md |
Work in that folder; read when Claude works with files there | Yes, commit it |
| A personal, uncommitted file for this project | You, in this project only | No |
| An organisation-wide policy file | Everyone in a company, set by administrators | Managed centrally |
Claude Code also reads CLAUDE.md files in the folders above the one you start in, which helps when several projects sit inside one parent folder. The name and location of the personal per-project file have varied between versions, so check the current docs for yours.
To see which instruction files a session has picked up, and to open one for editing, use /memory.
If two files disagree, you are leaving Claude to settle the conflict. Better not to create one: say each thing once, at the right level.
The shortcut
Ask two questions: Who needs it? Where is it always true? Only you, everywhere: your user file. The whole team, the whole repository: the root file. Only inside one folder: that folder's file. Only you, only here: the personal project file.
"Explain changes in short bullet points"
Your own taste, in every project.
~/.claude/CLAUDE.md.
Why the narrowest level? A rule placed too wide costs context in sessions where it does not apply, or, if it is personal, pushes your setup onto teammates. A rule placed too narrow is missing when it is needed.
Drills
Answer fast — trust the rule.
"I prefer answers in short bullet points." Where does this go?
"Every customer-facing string in templates/ must be in English and Hindi." Following the rule, where does it go?
"My local database runs on port 5433." Where does it go?
How can you see which instruction files the current session has picked up?
Remember
- Put each instruction at the narrowest level where it is always true.
- Shortcut: who needs it, and where is it always true?
- Trap: personal settings committed for the whole team, or the same rule written in two places.
