Every session starts from zero. Claude does not remember that yesterday you asked it to reply in Vietnamese, or that the source/raw folder holds material that must never be copied. CLAUDE.md is the file it reads before your first message, every time. Think of it as the style guide you give a new writer before their first article: it does not make them more talented, it makes them right from the start.
What is in ours
The DevOps Peach CLAUDE.md has a few short sections. Paraphrased:
# DevOps Peach
Static learning site in site/index.html, content in content/<track>/.
Reply to the owner in Vietnamese. The site itself is English only.
## Never
- Copy from source/raw. Use placeholders: example.com, 192.0.2.x, changeme-example.
- Edit tools/preview/drafts.txt, docs/content-schema.md or .claude/.
- Commit or push unless asked. On the default branch, create a branch first.
## Before merge
- Graded content (quiz, commands, final) must pass the tech-reviewer agent.
- Run python3 tools/check_content.py <module-dir>, then build_site_data.py.
## Tracks
- Cert roadmap covers AWS, Azure, Kubernetes, Linux and AI only.
- Cert practice banks live in content/cert/<id>.md ...
Where each line came from
| Line | The mistake that created it |
|---|---|
| Reply in Vietnamese | Long English answers the owner had to translate |
| Placeholders only | A lab example once contained a real-looking IP |
| Never commit unless asked | An early session committed half-finished work |
| Cert roadmap scope | Google Cloud was added to the wrong list twice |
| tech-reviewer before merge | A quiz shipped with two correct answers |
That is the method: every time you correct Claude twice for the same thing, add one line.
Rules for a good CLAUDE.md
- Short. Ours is under 80 lines. Every line is read every session, so it costs tokens forever.
- What the code cannot tell. Do not describe the folder tree; Claude can read it. Write the decisions, the forbidden places and the commands that must pass.
- Give the reason when it is not obvious. "Use placeholders (the site is public)" is followed more reliably than "use placeholders".
- Personal notes go elsewhere.
CLAUDE.local.mdis for your own, uncommitted preferences. - Let Claude draft it.
/initwrites a first version from the repository; then delete half of it and add the lines from your own mistakes.
The reward is quiet: after a few weeks you stop repeating yourself, and new sessions behave like someone who has been on the team for a month.