CLAUDE.md is for project-specific instructions. Memory is for things Claude Code should know about you across all projects.
How memory works
When you tell Claude Code something about yourself or your preferences, it can save that to a persistent memory file on your computer. Next time you start a session, in any project, it has that context.
Try it:
Remember that I prefer dark themes and minimal designs for all my projects
Claude Code will save this preference. Now go to your my-tool folder, open Claude Code, and ask it to add something visual. It will default to dark themes without you mentioning it.
What to put in memory
- A learning preference (“Show me one small example at a time”)
- Your aesthetic preferences (“I like clean, minimalist design”)
- Technical preferences (“I prefer Python over JavaScript when both are options”)
- Things that went wrong before (“Don’t use framework X, it caused problems”)
Memory vs CLAUDE.md
The distinction is simple:
- CLAUDE.md lives in a project folder. It applies only to that project. If you share the project with someone else, they benefit from it too.
- Memory lives on your computer. It applies everywhere. It is personal to you.
Use CLAUDE.md for project rules: “this site uses plain HTML and CSS.” Use memory for personal preferences: “I prefer dark themes.” Both are read automatically. Neither requires you to repeat yourself.