agents-md

CLAUDE.md locations: user, project, CLAUDE.local.md and which one to edit

Claude Code reads CLAUDE.md from up to four places, and which one you edit depends on who the change is for. Team rules go in the project file, `./CLAUDE.md` or `./.claude/CLAUDE.md`, shared through source control. Your personal notes for one repo go in `./CLAUDE.local.md`, which the docs say to add to `.gitignore`. Preferences you want in every project go in `~/.claude/CLAUDE.md`. Organizations can also deploy a managed policy CLAUDE.md for all users. The files don't override each other. The docs say they are "concatenated into context," and within a directory CLAUDE.local.md is appended after CLAUDE.md.

Who this is for

You want Claude Code to follow a new instruction and aren't sure which CLAUDE.md to put it in.

The four locations

ScopeLocationPurpose (from the docs)Shared with
Managed policymacOS: `/Library/Application Support/ClaudeCode/CLAUDE.md` · Linux and WSL: `/etc/claude-code/CLAUDE.md` · Windows: `C:\Program Files\ClaudeCode\CLAUDE.md`Organization-wide instructions managed by IT/DevOpsAll users in organization
User instructions`~/.claude/CLAUDE.md`Personal preferences for all projectsOnly you (all projects)
Project instructions`./CLAUDE.md` or `./.claude/CLAUDE.md`Team-shared instructions for the projectTeam members via source control
Local instructions`./CLAUDE.local.md`Personal project-specific preferences; add to `.gitignore`Only you (current project)

Which one to edit

You want to changeEdit
A build command, coding standard or workflow for everyone on the repoProject CLAUDE.md
Your sandbox URL or preferred test data for this repoCLAUDE.local.md
A personal style or tooling preference everywhere`~/.claude/CLAUDE.md`
A company-wide security or compliance ruleManaged policy (IT/DevOps)

Pitfalls

  • Committing CLAUDE.local.md. It's meant to be private. Add it to `.gitignore`.
  • Expecting one file to replace another. All discovered files load together. Files closer to where you launched Claude are read last, but nothing is dropped.
  • Personal notes in the project file. Your teammates get them too. Move them to CLAUDE.local.md.
  • Forgetting worktrees. A gitignored CLAUDE.local.md only exists in the worktree where you created it.
  • Assuming AGENTS.md always loads. By default Claude Code reads AGENTS.md only when there's no CLAUDE.md or CLAUDE.local.md in the working directory or above it, and reading it directly requires Claude Code v2.1.277 or later. For how the files compare, see AGENTS.md vs CLAUDE.md vs Cursor rules. To keep one file for both, see symlinking CLAUDE.md and AGENTS.md.

How to check it

  1. Start a session in the repo and run `/context`.
  2. Check the list under Memory files for each file you expect.
  3. Run `git status` and confirm CLAUDE.local.md isn't staged.
  4. If an instruction isn't followed, check whether it sits in a file that loaded, and whether a later file contradicts it.

Where ShipKits fits

If you want CLAUDE.md content to start from, the Day-1 Desk is a $12 pay-once first desk day: two seats (Day Desk + Reviewer Lite), one path-lock skill, a thin gate card, install.sh, and a ~90-minute sample run. Its `install.sh` copies the skill plus optional AGENTS.md / CLAUDE.md snippets (Cursor primary; Claude Code and Grok Bot notes). For a free starting point, use /free. Cheat Sheet for the skim checklist mindset.

Soft next step

Run `/context` in your repo now and move any personal line out of the project CLAUDE.md into CLAUDE.local.md. Free starter files are at /free. When you want a first desk with snippets ready to install, the Day-1 Desk ($12) has it.

FAQ

Where does CLAUDE.md go?+

For a project, in `./CLAUDE.md` or `./.claude/CLAUDE.md` at the repo root. Claude Code loads CLAUDE.md files from the working directory and every directory above it at launch, and subdirectory files when it works in that subdirectory.

What is CLAUDE.local.md for?+

Personal, project-specific notes such as your sandbox URLs or preferred test data. It loads alongside CLAUDE.md and is read after it in the same directory.

Should CLAUDE.local.md be committed?+

No. The docs say to add it to `.gitignore` so it stays private to you.

What is the user-level CLAUDE.md?+

`~/.claude/CLAUDE.md` holds your personal preferences for all projects. It applies only to you.

Which CLAUDE.md applies to my whole team?+

The project CLAUDE.md, shared through source control. Organizations can also deploy a managed policy CLAUDE.md that applies to every user on a machine.

Does Claude Code read AGENTS.md too?+

Yes. By default it reads AGENTS.md as project instructions when there's no CLAUDE.md or CLAUDE.local.md in the working directory or above it. Run `/context` to see which memory files loaded.

Get the free starter

Value first, then a kit when you are ready. No fake urgency. Start with Harness Desk Starter at /free.