Work like a pro

CLAUDE.md: teach it once

A short file Claude reads at the start of every session.

4 min13 / 18

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

FileWho sees it
~/.claude/CLAUDE.mdOnly you, in all projects
./CLAUDE.md or ./.claude/CLAUDE.mdYour project, shared with your team through git
./CLAUDE.local.mdOnly you, in this project (keep it out of git)

What to include, and what to leave out

IncludeLeave out
Commands Claude cannot guessThings Claude can see by reading the code
Style rules that differ from the defaultObvious rules like "write clean code"
How to run testsLong tutorials or API documentation
Quirks and gotchasInformation 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.

RemoveWrite 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.”
CLAUDE.md example
# 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.
Also available: auto memoryClaude can save its own notes across sessions as it learns your preferences. Use /memory to see and edit what is stored and to switch it on or off.
Rules are advice, hooks are guaranteesCLAUDE.md is guidance Claude usually follows. If something must happen every single time, use a hook (a small script that runs automatically) instead.

CLAUDE.md builder

Answer four questions to get a short starter file. Keep only lines that would prevent mistakes.

Your CLAUDE.md appears here.
Try it now: Run /init in your practice folder. Cut every line that Claude could work out alone. Keep it under 15 lines.

Check yourself

1. What is CLAUDE.md?
2. Which line deserves a place in CLAUDE.md?
3. Which command creates a starter CLAUDE.md?
4. Which line belongs in a modern CLAUDE.md?

Tip: use ← and → to move between lessons.