CLAUDE.md: teach it once
A short file Claude reads at the start of every session.
Each session starts with a fresh . is a plain text file that Claude reads at the start of every session, so you do not repeat yourself.
Run /init and Claude writes a starter file based on your project. Then keep improving it.
Where it can live
| File | Who sees it |
|---|---|
~/.claude/CLAUDE.md | Only you, in all projects |
./CLAUDE.md or ./.claude/CLAUDE.md | Your project, shared with your team through git |
./CLAUDE.local.md | Only you, in this project (keep it out of git) |
What to include, and what to leave out
| Include | Leave out |
|---|---|
| Commands Claude cannot guess | Things Claude can see by reading the code |
| Style rules that differ from the default | Obvious rules like "write clean code" |
| How to run tests | Long tutorials or API documentation |
| Quirks and gotchas | Information that changes often |
The test Anthropic suggests for every line: "Would removing this cause Claude to make mistakes?" If not, cut it. A bloated file makes Claude ignore parts of it.
Lines you can delete today
Many CLAUDE.md files still contain lines written for older models: “think step by step”, “make no mistakes” or “you are an expert programmer”. Anthropic's guidance for Opus 5.5 says these can go. Replace them with rules of engagement: what Claude may decide alone, and when it must stop and ask.
| Remove | Write instead |
|---|---|
| “Think step by step.” | “Run npm test after every change.” |
| “Make no mistakes.” | “Never edit files in /legal; ask me first.” |
| “You are an expert.” | “When a step needs no input from me, keep going.” |
# About this project A one-page website for a neighbourhood bakery. # Rules - Use plain HTML and CSS only, no frameworks. - Write in friendly British English, short sentences. - Keep everything in index.html. # Workflow - After changes, tell me how to preview the page. - Never delete files without asking.
/memory to see and edit what is stored and to switch it on or off.CLAUDE.md builder
Answer four questions to get a short starter file. Keep only lines that would prevent mistakes.
Your CLAUDE.md appears here.
/init in your practice folder. Cut every line that Claude could work out alone. Keep it under 15 lines.Check yourself
Tip: use ← and → to move between lessons.