Claude Code (CLAUDE.md)

Claude Code reads CLAUDE.md at the repository root and merges it with any nested CLAUDE.md files in subdirectories. Plain markdown, structured by section headers. Claude also reads ~/.claude/CLAUDE.md as a personal global instruction.

File path
CLAUDE.md
Length cap (recommended)
~600 lines
Frontmatter
No
File globs
No

Format quirks

  • CLAUDE.md at the repo root is the primary file
  • Nested CLAUDE.md files are merged when working in subdirectories
  • Claude treats each H2 section as a category — keep headers stable
  • Personal-global instructions live at ~/.claude/CLAUDE.md

Browse stack examples

Every stack page in the library has a one-click copy button for Claude Code (CLAUDE.md). Open any of these and pick "Claude Code (CLAUDE.md)" from the format dropdown.

See all 20 stacks

Official docs: https://docs.claude.com/en/docs/claude-code/memory