0PricingLogin
Claude Architect · Lesson

User / Project / Directory Levels

Where each CLAUDE.md lives and who it applies to.

Three Places a CLAUDE.md Can Live

Claude Code reads memory from three levels, and each one answers a different question: who does this rule apply to?

  • User level~/.claude/CLAUDE.md: your personal preferences, on your machine only.
  • Project level./CLAUDE.md or .claude/CLAUDE.md: shared with the whole team via version control.
  • Directory level — a CLAUDE.md inside a subfolder: scoped to that subtree only.

Knowing which file a rule belongs in is a core Claude Certified Architect skill. Put it in the wrong place and either your teammates miss it, or your personal habits leak into everyone's workflow.

User Level — Personal, NOT Shared

The user-level file at ~/.claude/CLAUDE.md lives in your home directory. It applies to every project you open on this machine, but it travels with you, not the repo.

Critically, it is NOT shared via version control. A new teammate cloning the repo will never see it. So it is the right home for personal taste: your preferred commit-message style, how chatty you like responses, or shell aliases you favor.

It is the wrong home for anything the team must agree on — coding standards, build commands, security rules.

# ~/.claude/CLAUDE.md  (personal, machine-local, never committed)

## My preferences
- Keep explanations short; show the command, not a paragraph.
- Prefer `rg` over `grep` and `fd` over `find` on my machine.
- Use Conventional Commits for messages.

All lessons in this course

  1. User / Project / Directory Levels
  2. The @path Import Syntax
  3. .claude/rules/ with Frontmatter Paths
  4. Monolith vs Modular Rules
← Back to Claude Architect