I've worked in tech for 20 years, and using AI on long projects was still a nightmare for me. What helped me was writing down what I know where the AI reads it first, so it works from that and guesses less. An early Anthropic study of people using its coding tool found that success “is determined by how well a person understands the problem they are trying to solve, not whether they’re trained in coding”.
What is CLAUDE.md?
It's where you write down, once, what you'd otherwise explain to Claude again in every session. Anthropic's docs call CLAUDE.md files "instructions you write to give Claude persistent context", and auto memory is the separate set of notes Claude writes for itself. The file works in Claude Code, which you can use in the Code tab of Claude's desktop app and which, as of 29 November 2026, is included from Pro up on Anthropic's pricing page. The Code tab if you don't code has its own page, and so does how Claude remembers across chats. In the chat app, rules live in other places, covered in where your rules have to live.
Where do you put CLAUDE.md?
In your project's top folder. Anthropic's docs give two places for a project's file, the folder itself or a .claude folder inside it, plus a .claude folder in your home folder for rules that cover every project. You don't have to create the file yourself. Ask Claude to "add this to CLAUDE.md", or run /init, which generates a starting CLAUDE.md and, if you already have one, "suggests improvements rather than overwriting it". Anthropic describe /init as reading "your codebase" to find "build commands, test instructions, and project conventions", so it's built for code projects. Give each long job its own folder and file, and see projects for long work for the chat app's version.
How do you write a CLAUDE.md that Claude follows?
Write each rule as one instruction you could check, and add it after the mistake it stops. Anthropic's docs say to write instructions "concrete enough to verify", and to add to the file when "Claude makes the same mistake a second time". Longer files "consume more context and reduce adherence", and if two instructions contradict each other, "Claude may pick one arbitrarily". My rule about pushing back came from a mistake.
I added it because when I pushed back on something, it would go, oh yeah, I didn't think of that, that's a great idea, and head off down another path. I need it to challenge me, not just agree with me.
What goes in a CLAUDE.md template?
The rules you'd otherwise repeat, each short enough to check. Anthropic's best practices say the file works best holding only what Claude couldn't work out for itself, including "Anything you've had to correct twice already". The example below was written for this page, for a long piece of work that isn't code. The first line is one of mine.
# Rules for this project
- If I ask you a question, just answer it, don't go and change the plan.
- Read status.md before you start, and update it before you finish.
- Every number needs the file or link it came from.
- Ask me before you delete or send anything.
- Call the client "the client" in drafts, never by name.
- Write in British English for a reader who is new to the project.Is CLAUDE.md necessary, and should I delete mine?
You can use Claude Code without one, but each session begins with a fresh context window, so your rules aren't there unless something carries them. If a CLAUDE.md is being ignored, cut it down rather than delete it. Anthropic's best practices say a line Claude keeps ignoring is there either because "the file has grown long enough that the line gets lost", or because it's "a rule that can't have exceptions", which belongs in a hook instead. They also say that after /init "the work is mostly removing lines". The memory docs say to review your files "periodically to remove outdated or conflicting instructions". The free setup has more of my rules to copy.
Talk it through in the free WhatsApp group.