The Practice Room / The Terminal with Claude Code / Episode 8

The Terminal with Claude Code

What is a CLAUDE.md file used for?

Yesterday you asked for a result. Today you tell it something once, and it remembers.

By MstimajPublished 16 October 20262 min readLevel Start HereTool Claude Code

Sign in to save your place and mark this done. Free, no card.

Say it once

Every other lesson in this track asked for a result. This one changes what happens before you ask for anything at all.

CLAUDE.md is a plain file in your folder. Claude Code reads it every time it opens there. Everything you are tired of repeating goes in it once.

Do it yourself

  1. Open Claude Code in your folder.
  2. Type /init and press enter.
  3. It reads the folder, writes one file, and tells you.
  4. Read it back: type type CLAUDE.md and press enter.
  5. The top is what it worked out about your folder on its own.
  6. The bottom is yours. That is the part worth your time.

One file, two halves

The top half, facts

  • What this project is
  • Where things live
  • What it must never touch

The bottom half, preferences

  • How you want it to work
  • How you want to be spoken to
  • What it should ask before doing

You say it once, in a file. Instead of at the start of every conversation.

What to put in the bottom half

Who you are. I run a bakery. Explain things in plain words and assume I do not know the jargon.

How you want things done. Never delete anything without asking me first. Show me the plan before you change a file.

Your rules. Keep answers short. Do not touch the pricing file.

Write it the way you would brief a new assistant on their first morning. Short sentences, one instruction each.

The honest part

Written down does not mean always obeyed. The file makes the right behaviour much more likely, and it does not make it certain. It drifts, and you check.

That is not a flaw you can configure away. Treat the file as standing instructions to someone capable and occasionally forgetful, and your expectations will be right.

Check yourself

Which command writes the file?

/init. It reads your folder first, then writes CLAUDE.md.

Which half of the file should you edit?

The bottom. The top is what Claude Code worked out about the folder by itself.

When does it read the file?

Every time it opens in that folder. You never have to point it at the file.

You wrote a rule and it broke the rule. What is the correct expectation?

The file makes the behaviour far more likely, not guaranteed. It drifts, and you check.

When it goes wrong

type CLAUDE.md says the file does not exist. You are standing in a different folder than the one /init wrote into. Type cd on its own to check.

Your rules are being ignored entirely. Check that you edited the file in this folder. CLAUDE.md is per folder, not one setting for the whole machine.

The file has grown enormous. Cut it back. A short file that gets followed beats a long one that gets skimmed.

Words used here

System prompt • Context window • What Claude Code is

Go deeper

Anthropic's memory documentation covers where else Claude Code looks for these files, including one that applies to every project at once.

What she says in the film

Yesterday you asked for a result. Today you tell it something once, and it remembers.

You are back in the same folder, with Claude Code open.

Type slash, and the list opens. /init is the one that writes the file.

It reads your folder, then writes one file and tells you.

Open the folder. CLAUDE.md is sitting there.

To read it, type the word type, then the filename. Type shows a file on the screen.

The top is what it worked out about your folder on its own.

The bottom is yours, and this is the part worth your time.

You tell it who you are. I run a bakery. Explain things in plain words.

You tell it how you want things done. Never delete anything without asking me first.

You give it your rules. Keep answers short. Do not touch the pricing file.

Everything you are tired of repeating goes in there once.

From then on it reads all of that every time it opens here.

The honest part. Written down does not mean always obeyed. It drifts, and you check.

That is your Claude tip for today.

No permission required.

Reference card: what a CLAUDE.md file is used for. It shows slash init writing the file, what Claude Code works out on its own, and the half you write yourself: who you are, how you want things done, and what it must never touch.
The whole lesson on one card.
Next walkthroughRename every photo on your computer with AI
On your machineWant this set up on your own computer, with your own files?

Book a session and we do it together on a call.

Book an hour

Ask what did not make sense

Comments go through our own form and are read before they appear. Links are not allowed; describe it in words.

Comments are read before they appear.

The newsletter

Get the next walkthrough.

One email when something goes up. The argument, the film and the term, nothing else. One click to leave.

Have a question now? Ask Mstimaj, she knows the archive.