Memory file types
Memory files are loaded in the following order (lowest to highest priority):| Type | Location | Purpose |
|---|---|---|
| Managed | /etc/claude-code/CLAUDE.md | Organization-wide rules set by administrators |
| User | ~/.claude/CLAUDE.md | Your personal global instructions for all projects |
| Project | CLAUDE.md, .claude/CLAUDE.md, .claude/rules/*.md | Team instructions checked into the repo |
| Local | CLAUDE.local.md | Your private project instructions, not committed |
Project memory
Place aCLAUDE.md at your project root (or .claude/CLAUDE.md) to document conventions Claude should always follow:
CLAUDE.md
Rules directory
For larger projects, split instructions across multiple files in.claude/rules/:
.md files in that directory are loaded automatically.
User memory
Your global user memory at~/.claude/CLAUDE.md applies to every project. Use it for personal preferences that shouldn’t live in the repo:
~/.claude/CLAUDE.md
The @include directive
Memory files can include other files using @ notation:
CLAUDE.md
@path— relative to the including file@./relative/path— explicit relative@~/home/path— from your home directory@/absolute/path— absolute path
Managing memory with /memory
Use the /memory command inside a session to open your memory files in your editor:
CLAUDE.md file so you can add or update instructions without leaving the terminal.
What to put in memory files
Coding standards
Coding standards
Language versions, formatting rules, naming conventions, patterns to avoid, preferred libraries — anything Claude should consistently apply across files.
Project architecture
Project architecture
Directory structure, module boundaries, how the build system works, where generated files go, key abstractions and their purpose.
Workflow and process
Workflow and process
How to run tests, how to build, branch naming, PR process, how to deploy to staging — operational context Claude needs to work efficiently.
Things to avoid
Things to avoid
Explicit don’ts are often more useful than do’s. List anti-patterns, deprecated APIs, files that should never be modified directly, and commands that require human review.