Lead Gen Jay
Memory & CLAUDE.mdLesson 1 of 36

Introduction

2 min readLesson 1

Memory enables Claude to retain context across sessions and conversations. It exists in two forms: automatic synthesis in claude.ai, and filesystem-based CLAUDE.md in Claude Code.

Without memory, every Claude Code session starts from zero. Claude won't remember your preferred coding style, your project's architecture, or the conventions your team follows. You'd repeat the same instructions every time you open a new session. Memory solves this by giving Claude persistent context it can reference automatically.

In Claude Code, memory lives in files called CLAUDE.md. These are plain text files that Claude reads at the start of every session. You can place them at three levels:

  • Project-level — a CLAUDE.md file in your project root, checked into version control and shared with your team
  • User-level~/.claude/CLAUDE.md, your personal global instructions that apply to every project
  • Project-personal — stored in ~/.claude/projects/, specific to a project but private to you

To add a memory, you can tell Claude directly during a session:

"Remember to always use single quotes in this project"

Claude will write that preference into the appropriate CLAUDE.md file. You can also edit these files manually — they're just text. A typical entry might look like:

## Code Style
- Use single quotes for strings
- Prefer async/await over .then() chains
- Run tests with: npm test

Key takeaway: CLAUDE.md is the single most impactful file in your Claude Code workflow. A well-maintained memory file transforms Claude from a generic assistant into a context-aware teammate that knows your stack, your conventions, and your preferences from the first message of every session.