The Complete Claude Guide
Chapter 03 · CLI

CLAUDE.md, project memory and the .claude directory

CLAUDE.md is the file where you write Claude standing instructions about the project: how to build, test and work. Together with the memory hierarchy and the .claude directory it turns the tool from generic to team-specific.

Verified against source on 2026-09-30

Video

Steps

  1. Create CLAUDE.md at the project root with standing decisions: build and test commands, conventions and boundaries. Keep it short and precise.
  2. Understand the memory hierarchy: organization, project, user and local memory, and which file wins on conflict.
  3. The .claude directory centralizes project settings, custom commands and agents. Inspect what is inside before adding anything new.
  4. Settings precedence decides what applies: local settings override project, and project overrides user. Document your choices so the team understands.
Common pitfall: A long messy CLAUDE.md hurts: contradictory or overly generic instructions confuse the tool. A few precise instructions beat many vague ones.
Hands-on exercise: Write a short CLAUDE.md for your project with a build command, a test command and two conventions. Start a new session and check the tool applies them.
Filmed demo · Video is added in the media phase

Recap

Comprehension check

What is CLAUDE.md for?

Recap

Official sources

← Previous Back to contents Next →