At a glance
WHAT IT’S REALLY ABOUT
Use CLAUDE.md to give Claude Code persistent project context
- CLAUDE.md is a Markdown file in a project’s root that Claude Code automatically reads each session to avoid re-learning your codebase from scratch.
- Its contents are effectively appended to your prompt, acting like an onboarding guide that encodes stack details, conventions, and workflow commands.
- You can generate an initial CLAUDE.md via the /init command, then refine it based on where you repeatedly have to correct the model.
- Claude Code supports a hierarchy of memory: a project-level CLAUDE.md shared in version control and a user-level CLAUDE.md for personal preferences across projects.
- Practical tips include explicitly telling Claude to “save to memory” after corrections and using @file-path references to point Claude at relevant internal docs.
IDEAS WORTH REMEMBERING
5 ideasCLAUDE.md reduces repeated re-discovery of your codebase.
Without it, Claude may re-explore dependencies and implemented features each session and make assumptions; with it, sessions start aligned to your reality.
Treat CLAUDE.md as a concise “prompt extension” that sets defaults.
Because its content is appended to your prompt, it’s ideal for durable guidance like stack, folder conventions, code style, and preferred patterns.
Use /init to bootstrap, then iterate based on real friction points.
Auto-generated files provide a starting baseline, but the most valuable content comes from adding the specific corrections you repeatedly make.
Encode concrete conventions to improve first-try code generation quality.
Examples include indentation, named exports, where API routes belong, or preferring server actions—details that help Claude create components and features that match your project immediately.
Leverage memory hierarchy to separate team norms from personal preferences.
Commit the project-level CLAUDE.md for shared standards, and keep a user-level CLAUDE.md in your config folder for your own cross-project preferences (e.g., comment style).
WORDS WORTH SAVING
5 quotesOne of the most useful parts of Claude Code is the CLAUDE.md file. It gives Claude Code persistent memory about your project.
— Claude
When you open up Claude Code without a CLAUDE.md file, it's like it has to start fresh every single time.
— Claude
It's a Markdown file that you add to the root of your project, and Claude Code reads it automatically every time you start a session. It's like an onboarding script for your code base.
— Claude
Simply put, the contents of CLAUDE.md file are appended to your own prompt.
— Claude
The difference between a frustrating Claude Code session and a productive one comes down to the context, and the CLAUDE.md file is how you provide that context.
— Claude
High quality AI-generated summary created from speaker-labeled transcript.
Get more out of YouTube videos.
High quality summaries for YouTube videos. Accurate transcripts to search & find moments. Powered by ChatGPT & Claude AI.
Add to Chrome