What Is CLAUDE.md? The File That Configures Claude Code
If you use Claude Code, there is one file that shapes every interaction you will ever have with it: CLAUDE.md. Most developers either do not have one, or have one that quietly works against them. This is what it is, and why it matters more than any other piece of configuration.
The File Claude Reads Every Session
CLAUDE.md is a markdown file that Claude Code reads at the start of every conversation. Think of it as your project's constitution — the primary source of truth for how your specific repository works. Every session, Claude reads it, so you never have to re-explain your stack, your conventions, or what commands to run.
Why It Exists
Without a CLAUDE.md, every session starts cold. Claude can read your code, but it cannot infer the things that live outside the code: that you are on Next.js 15 and not 14, that a certain directory must never be touched, that your team commits in a particular style. You end up explaining these things again and again — and slightly differently each time, so the output drifts. CLAUDE.md captures that knowledge once, in a place Claude always sees.
Where It Lives
Place CLAUDE.md in the root of your project. You do not have to write it from scratch either — Claude Code can generate a starting point by analysing your codebase with the init command, detecting your build tools, test frameworks, and existing patterns. Treat the generated file as a foundation, then refine it over time as you learn what Claude gets wrong without guidance.
What Goes In It
A good CLAUDE.md is short and specific. It includes a one-line stack description with versions, a directory map, the build and test commands, the conventions a newcomer could not guess, and a "do not touch" section for generated code and protected paths. Everything else is noise.
Why It Is the Highest-Leverage File
Because CLAUDE.md loads on every single session, its quality compounds. A precise, well-pruned file pays off thousands of times over the life of a project — every task starts from a correct understanding. A bloated or vague one imposes a small tax on every interaction. Few files in your repository have this much leverage, which is exactly why it is worth getting right first.
Beyond the File
CLAUDE.md is the foundation, but Claude Code is fully programmable — slash commands, subagents, hooks, skills and plugins all build on top of it. Getting CLAUDE.md right is the first step toward configuring Claude Code as a system shaped around how you work.