It is a note you leave for Claude that it reads every time it starts. Every session begins with a blank memory, so anything you would otherwise repeat, how the project is built, what to never touch, how you like things done, goes in this file once. There is a project one in the folder, a personal one in your home directory, and a private per-project one. The command /init writes a first draft for you.
Key facts
- 3places it can live: the project folder, your home directory, or a private CLAUDE.local.md
- 200lines, the size the documentation says to stay under, because longer files are followed less
- 1command that drafts it for you: /init
- 1equivalent file in Codex, AGENTS.md, which Claude Code also reads
- code.claude.com, How Claude remembers your project (locations table, /init, size guidance, imports, AGENTS.md); help.openai.com on /init writing an AGENTS.md in Codex; both read 6 November 2026
Why does Claude need a file like this?
Because it forgets. Each Claude Code session begins with a fresh context window, in the documentation’s words. Whatever you explained yesterday about how the project works is gone this morning. CLAUDE.md is the fix: a file in the folder that is loaded into every conversation before you type anything. Think of it as the note taped to the machine for whoever uses it next, except the next user is always the same assistant with no memory of the last time. The documentation is clear that Claude treats the file as context, not as enforced rules, and that the more specific and concise the instructions, the more consistently they are followed.
Where does it go, and who sees it?
Three places, for three audiences. A project CLAUDE.md sits at the root of the folder, or inside a .claude subfolder, and is shared with anyone who has the code: build commands, coding standards, what the folders mean. A user CLAUDE.md lives at ~/.claude/CLAUDE.md and applies to every project you open, for your personal preferences. A CLAUDE.local.md at the project root is for private, per-project notes you do not want committed, and you add it to .gitignore. Files above the working directory load at launch; files in subdirectories load when Claude works in them.
| File | Where | For | Who sees it |
|---|---|---|---|
| CLAUDE.md | ./CLAUDE.md or ./.claude/CLAUDE.md | Team instructions for this project | Everyone with the code |
| CLAUDE.md | ~/.claude/CLAUDE.md | Your preferences, every project | Only you, all projects |
| CLAUDE.local.md | ./CLAUDE.local.md, gitignored | Private notes for this project | Only you, this project |
| AGENTS.md | ./AGENTS.md | The same job, for Codex | Everyone with the code; Claude reads it too |



