A CLAUDE.md that Claude actually follows

Claude Code reads a file called CLAUDE.md at the start of every session. A good one saves you from repeating the same instructions every day. Here is what we put in ours.

Keep it short and specific

The file is read every time, so every line costs attention. Write rules Claude can act on, not wishes. "Run npm test before saying a change is done" works. "Write good code" does nothing.

The five parts we always include

Put facts in, keep history out

CLAUDE.md is the current state: what is true now. The story of how you got there belongs in a worklog or in git history. When a rule changes, edit the line; don't add a second, contradicting one.

Say what Claude must never do

A short list of hard limits is the most useful part of the file: no secrets in commits, no running database migrations without asking, no posting anything public. Put the reason next to each one, so Claude can apply it to cases you didn't list.

Start from a sample

Our free sample has these parts with placeholders to fill. Rename it to CLAUDE.md, put it in your project's root folder, and edit it as the project grows.

Get the free sample

Want ready-made versions for five common stacks? The Project Starter Kit has them, plus safe settings.