You explain yourself to it on Monday. On Tuesday you explain yourself again.
Not the task. The task changes. What you repeat is everything around it: how you like things written, the words you never use, the thing it did last week that you had to undo. You end up re-training it every morning.
There is a file that stops this. Before I show you, I need to be clear about which Claude we are talking about, because there are two places you can use it and this only works in one of them.
First, which Claude this is about
Most people meet Claude in a web browser. You go to a website, you type in a box, it types back. It is a conversation. It cannot see anything on your computer and it cannot change anything on your computer. You copy things in, you copy things out.
This article is about the other one. Claude Code runs on your computer, either in its own desktop app or in a terminal.
A terminal is the plain window where you type instructions to your computer instead of clicking on things. It comes free with Windows and with Mac. It looks unfriendly. It is not.
The difference that matters here is simple.
Claude in a browser Claude Code on your computer
------------------- ----------------------------
A conversation in a tab Works inside a folder
Cannot see your files Opens and changes your real files
You copy things in and out It works on the actual documents
Because Claude Code works inside a folder, you can leave a note for it in that folder. It reads the note every time it starts. That note is what this whole article is about.
The browser version has no folder, so it has nowhere to keep a note like this. It has its own settings for preferences, which are worth filling in, but they are a different thing and they are not what this covers.
If you have never installed Claude Code, that is the starting point, and the tutorial before this one walks through it. Come back afterwards.
What the file does
Here is the same request, asked twice. Once in an empty folder. Once with the file in place. This is real output from my machine, not an illustration.
Before
Autumn portrait sessions are officially open, and spots tend to
fill up fast once the leaves start turning. Reply to this email
or reach out directly to grab your preferred date and time before
the calendar fills up.
After
Autumn sessions are open, and I would love to have you back in
front of the camera.
If you would like to book a time, just reply to this email and I
will get you scheduled.
The second one dropped the urgency, because the file said not to use it. It also wrote to people who have already sat for her, because the file said that was the point. Neither of those was in the question I asked.
Notice that the first one is not bad. It is a perfectly competent marketing email. It is just not hers. That is the real argument for this file: the default is capable and anonymous, and the file is what makes it sound like you.
The file is called CLAUDE.md. It is plain text. You can write a useful one in fifteen minutes.
The thing to understand before you write it
Think about a new assistant on their first morning.
You do not hand them your to-do list for the month. You tell them who you are, how you like things done, and the two or three things you never want to see. The tasks come later, and they change daily. The briefing does not.
CLAUDE.md is the briefing. Not the to-do list. That one distinction is most of what people get wrong.
What you need
- Claude Code working on your computer.
- A folder you actually work in. A real one, not a practice one.
- Fifteen minutes.
Step 1: Open the folder you work in
Claude Code reads the file from the folder you start it in. Not the one above it. This matters more than it sounds, and it is the most common reason the whole thing appears not to work.
cd path/to/your-folder
Swap path/to/your-folder for the real one. On Windows you can right-click the folder, choose “Copy as path”, and paste it straight in.
You should see: the text in front of your cursor change to that folder.
Step 2: Make the file
Make a new text file in that folder and call it CLAUDE.md. Use whatever you normally use to make a text file. Notepad is fine. TextEdit is fine. Your code editor is fine, if you have one.
The name matters. It is CLAUDE.md, in capitals, ending in .md. That ending means it is a text file that allows a little formatting. You do not need to learn any formatting to use it.
You should see: an empty file sitting in your folder, next to whatever else is in there.
Step 3: Write the six things
This is the part people get wrong, so it gets the most room. Six headings. You do not need all six on day one, but you will want all six eventually.
Who you are, and what you are doing. Two lines. What the work is, what you make, who it is for. This single piece of context does more work than any rule you write, because it lets Claude make sensible choices about the hundred things you never thought to mention.
Your directives. The hard rules. The ones that are not suggestions and are not open to interpretation. Say so plainly, in those words, so there is no confusion about which rules bend and which do not.
How you like to be spoken to. Short answers or full explanations. Whether you want the reasoning or just the outcome. Whether you want to be asked before it does something, or told after.
What annoys you. This is the most valuable section and the one almost nobody writes. Think about what you have corrected twice this month. That correction belongs here, permanently, instead of being made again on Thursday.
How you write. Your spelling. Words you never use. Punctuation you cannot stand. If you have a voice, describe it, because otherwise you get the flat middle-of-the-road version that everybody else gets.
What you are actually trying to do. The wider goal, not this week’s job. In the example below, that one line changed who the email was written to.
Here is the whole file that produced the difference at the top of this page. It is short on purpose.
# About me and how I work
I am a portrait photographer. I work on my own and I write all
my own emails.
## Directives
These are rules. Do not break them.
- Never use exclamation marks.
- Never use urgency. No "spots are filling fast", no "before
they are gone".
- Never invent a price, a date or a discount I did not give you.
## How I write
Plain and warm. Short sentences. I would rather sound like a
person than a brochure.
## What I am actually trying to do
Get people who have already sat for me to come back. I am not
chasing new clients.
That is the entire thing. Four headings, nine lines of content.
What does not belong in it: today’s tasks, your to-do list, or instructions for one specific job. Those go in the conversation. This file is who you are, not what you want done by Friday.
Save it and close it.
Step 4: Check that it worked
Start Claude Code in that folder.
claude
Now ask it to do something your file has an opinion about. Not something you spelled out word for word. Something it would have to work out from what you wrote.
Write a two-sentence email to my clients letting them know
autumn portrait sessions are open.
You should see your own preferences come back at you without having asked for them. In my case that meant no urgency and a message aimed at people who had already booked before.
If the answer sounds like it would sound for anybody, the file is not being read. The next section covers why.
There is also an exact check. Inside a session, run /context and look for your file in the list under Memory files. If it is not in that list, Claude cannot see it, and no amount of rewriting the contents will help.
Step 5: Add to it every time you correct something
This is the habit, and it matters more than the setup.
When you catch yourself making the same correction twice, stop and put it in the file. That is the entire system. It gets better every week without you ever sitting down to improve it.
If something looks wrong
I ran each of these on my own machine.
Nothing changed at all. Most likely the file is empty. I tested it with a blank CLAUDE.md and the answer went straight back to the generic version, exactly as though the file did not exist. An empty file is not an error, so nothing warns you. Open it and check there is something in it.
It works in one folder and not another. You started Claude Code from the wrong place. I asked the same question from the folder one level up and got a completely different answer, because from up there the file was invisible. Use cd to get into the right folder first, every time.
You named it claude.md in lowercase. On Windows this still works, because Windows ignores capitals in filenames. I tested it and the rules still applied. Use CLAUDE.md anyway, so nothing breaks the day that folder moves to a machine that does care about capitals.
What you just built
You have a file that tells Claude Code who you are, and it reads it every time you open that folder. The explaining is done once instead of every morning.
Now go and add the seventh thing. Whatever you corrected it on this week, the one that irritated you, write it down as a directive.
That is what the file is really for. It is where corrections go so they only have to happen once.
Forward → Upward ↑ Onward ↗︎
Mstimaj
Sources and Further Reading
- Claude Code documentation: how Claude remembers your project, the official reference for where
CLAUDE.mdfiles live and how they load. - How to Get Claude Code Running in Your Terminal (No Coding Needed), the tutorial before this one.
Join the Conversation
Share your thoughts and connect with other readers