
Run /init to generate a starter CLAUDE.md from your project, then refine it. Keep it short and specific: "Use 2-space indentation" works better than "Format code properly". Only write down what Claude can't work out from your files. For each line ask whether removing it would cause Claude to make mistakes. If not, cut it. Run /context all and look under Memory files to confirm the file loaded.
For preferences that are only yours, like what Claude should call you, use a CLAUDE.local.md in the same folder. Claude reads it alongside CLAUDE.md. Ask Claude to keep it out of git, the project's saved history, so it isn't shared with anyone else on the project.
# How to work with me
- Explain what you're about to change in plain English before you change it.
- Ask me before deleting anything.
- After a change, tell me how to check that it worked.Make me a private CLAUDE.local.md for my own preferences: call me Sam, and explain every change in one plain sentence. Make sure it stays out of git, so it isn't shared with anyone else on the project.Why it works
It's the place to write down what you'd otherwise re-explain, like "run the tests before committing". In our test, with the starter above Claude asked before deleting an unused file. Without it, Claude deleted the file straight away.
Watch out
Claude treats CLAUDE.md as guidance, not a guarantee. A very long file makes Claude miss parts of it, so aim for well under 200 lines.