Most people using Claude Code are neglecting the one file that the AI always reads before starting any task.
That file is named "CLAUDE.md".
Anthropic's official documentation states clearly: if a CLAUDE.md file exists in the folder, Claude Code will always load it before beginning work—even if you don't ask it to.
In other words, what you write here changes the AI's initial behavior by 100%. While you have to re-type prompts every time, CLAUDE.md works across every conversation once it's written.
The leverage is on a different level.
Conversely, unless you organize this file, no matter how much you polish your prompts, the benefits will be nearly zero. The AI will deviate every time. You'll have to re-explain premises every time. Even for the same task, the quality will vary by day. The cause isn't the model or your prompting skill—it's this file.
Today, I will reveal exactly "what and how to write" in CLAUDE.md, including copy-pasteable examples.
For those with poor performance, CLAUDE.md is just a "memo"
To be honest, I struggled at first too.
For a while on X, there were many articles saying "folder contents are important" or "CLAUDE.md is important." I saw them and opened my folders.
The contents were a mess.
I didn't know what was where. Similar data was scattered everywhere. The AI couldn't find the knowledge it needed, and every time it generated an output, it wasn't the answer I wanted.
CLAUDE.md was the same. Rules for where to save what weren't finalized. I didn't even understand what CLAUDE.md was in the first place. So, I just kept adding instructions from the top as I thought of them.
As a result, it grew to 300 or 400 lines. It easily exceeded 200 lines.
It is recommended to keep CLAUDE.md to 200 lines at most.
A CLAUDE.md that is too long becomes a "long text where the AI doesn't know what's important."
In this state, the AI re-reads the entire file every time and tries to guess, "So, which part applies to this task?" When guessing is involved, inconsistency follows. Naturally.
CLAUDE.md is not a "notepad." It is a "map for judgment" that the AI refers to every time. Changing your perception of this is half the battle.
Write only these 5 things in CLAUDE.md
You don't need to overcomplicate it. A strong command center invariably contains these five elements:
- ① Priority Rules: The lead declaration to be followed before any output
- ② Keyword → Location Routing Table: Which jobs go where
- ③ Decision Tree for Locations: How to judge items not in the table
- ④ Task Handling: How and where to record what needs to be done
- ⑤ Confidential Information Handling: Drawing the line on what must not be shared
When these five are in place, the AI stops "guessing" and starts "referencing." The root of inconsistency disappears.
Now, let's look at how to write each one with actual examples.
Setting ① Declare "Priority Rules" at the top
The very first thing to write is a declaration to fix the AI's initial move. It's a warning: "Before you think, follow the rules below first."
▼ Writing Example
Priority: Before outputting or saving anything, always check the rules below before acting. Locations must be decided using the "Keyword Table" and "Decision Tree" below. If you cannot decide, do not proceed on your own; ask a question.
Just by placing this at the top, the AI stops "just moving its hands." it starts checking the rules every time before acting. This fixes the starting point.
Setting ② Include a "Keyword → Location" mapping table
The next most effective thing is a work distribution table. Link "if this request comes, put it here/look here" using keywords.
▼ Writing Example
Keyword → Location ・Blog/Articles → Publishing/Blog/ ・Expenses/Receipts → Accounting/Vouchers/ ・Minutes/MTG Memos → Records/Minutes/
The trick is to write it exactly in the words you normally use. The AI looks at the words in the table and can choose the location without hesitation.
The tip for the distribution axis is to cut by "function (task)" rather than "business." This way, even if businesses or products increase, the table won't break.
Setting ③ Include a "Decision Tree" for when it's lost ← This is the most effective
Of the five, this has the biggest impact. How to handle things not in the table or things that are ambiguous.
Both humans and AI stop when they are lost. They deviate because they are lost. So, just eliminate the room for hesitation. Let them follow a YES/NO path from the top.
▼ Writing Example
Before saving, follow these steps in order: Q1. Is it confidential information (API keys/passwords)? → YES: Go to .env. End. Q2. Is it raw data just downloaded from outside? → YES: Go to Assets/. Q3. Which job is it? → Go to one of: Publishing / Sales / Accounting / Records. → If a single location cannot be determined by the end, do not proceed; ask exactly 2 questions.
So, how does behavior change before and after adding a decision tree? Specifically, in two ways.
Change 1: It performs the same action for the same request every time.
Claude Code operates on probability. It doesn't remember the previous conversation when the chat changes. So without a decision tree, even for the same "save the minutes" request, it fluctuates.
Without a Decision Tree:
- 1st time → Saved to Meeting/
- 2nd time → Memo/Minutes/
- 3rd time → For some reason, the Assets folder
With a Decision Tree:
- Every time it follows the same path: Q1→Q2→Q3 → Always the same place
Behavior changes from "probabilistic fluctuation" to a "fixed procedure." Reproducibility means you can build upon it.
Change 2: It stops making mistakes with overconfidence when lost.
The scariest AI behavior is "confidently being wrong." Like throwing a video recording and the minutes made from it into the same place.
- Forcing it through by guessing → ❌
- Stopping and checking with 2 questions → ✓
The last line is subtly effective. Just by writing "If you can't decide, don't rush, ask," you structurally reduce the mass production of off-target deliverables.
The smarter the AI, the better it performs when given a "template" rather than total freedom.
Setting ④ & ⑤ Task Handling and Confidentiality
The remaining two can be short. But you must write them.
④ Fix "where and how to leave" tasks. Without this, things to do get scattered with every conversation.
▼ Writing Example
Task Handling ・Consolidate all to-dos into a single "tasks.md" file. ・When finished, do not delete; move to "Completed" and leave a 1-line result.
⑤ Write the boundaries for confidential information clearly. This is the lifeline for accident prevention.
▼ Writing Example
Confidential Information ・Write API keys/passwords only in .env. ・Never paste them into chats, code, or records.
With these two, tasks don't get scattered, and things that shouldn't go out stay in. They work as your two defensive shields.
Keep CLAUDE.md "under 200 lines." If it overflows, move it to another file.
Some of you might have realized that if you write everything in CLAUDE.md, it will get longer and longer.
That's correct. This is important. If you make CLAUDE.md too long, it actually becomes less effective. Since the AI reads this from start to finish every time, if it's too long, the sense of "what is important" gets diluted.
The guideline is under 200 lines.
If it doesn't fit, move detailed rules to a separate file (e.g., "rules_detail.md"). Then, at the top of CLAUDE.md, give instructions on "when to read it."
▼ Writing Example (Just add one line to the top declaration)
Priority: Before outputting/saving, always follow the rules below. Read "rules_detail.md" only when writing a blog post.
The trick here is to add a condition like "only when..." rather than "always read." This way, the AI won't open that file for unrelated tasks, but for necessary tasks, it will go "CLAUDE.md → rules_detail.md."
This keeps the main body thin while allowing you to add as many detailed rules as you want. The point is to make it a call-on-demand system.
CLAUDE.md is the "Entrance and Commander," and details are "Call-in separate files." If you remember this division of roles, your rules won't collapse no matter how much they increase.
To be honest, it won't become a different beast in one shot
I'll be honest here.
I reorganized a mess of 300-400 lines into 5 blocks. After that, the first thing I felt wasn't a "dramatic change."
First, it just stopped getting lost. That's all.
The world doesn't change in one shot. It kicks in gradually. It returns the same movement for the same request, off-target results decrease, and knowledge accumulates. Before you know it, it's moving like a different beast. That's how it works.
If you expect flashy magic, you'll be disappointed. But reproducibility will definitely build up.
Summary: For those who think doing everything is a hassle
Don't overthink it. What you need to do today is open your CLAUDE.md (or create one if you don't have it). That's it.
For those who find doing everything a hassle, here is the priority list with time estimates:
- First 5 mins: Write 3 questions for ③ Decision Tree (Biggest impact)
- +7 mins: Add ① Priority Rules and ② Routing Table
- +3 mins: Add ④ Task and ⑤ Confidentiality boundaries
Total 15 minutes. This will align them in the order of ①→②→③→④→⑤. If it looks like it will exceed 200 lines, move the details to a separate file and have it read from the top. That's all.
You don't need to overstuff it. Just organize it. With just this, the same Claude Code you were using yesterday will start moving like something else entirely.
People who want to improve Claude Code's performance always look for prompt techniques. But the real leverage is further upstream. It's the single file that the AI reads first every time.
The difference between the top 5% and the remaining 95% isn't talent or prompting skill. It's just whether they organized one CLAUDE.md file or left it alone.
Start by copying and pasting the 3 decision tree questions from this article.
Finally
Finally, let me confess one thing.
The slides I usually put out are all made by AI. I no longer have a single slide made by hand.

And today, I'm giving away the AI that can make them with that exact same quality.
If you've read this far, you've probably already realized. Everything I've been talking about in this article boils down to one thing:
"Don't let the AI get lost."
AI doesn't fail because its ability is low. It fails because it's lost.
Give it context. Design the instructions. Leave no room for the AI to wonder. In other words, raise it as a secretary. In this article, we did that with Claude Code.
What I'm about to distribute is a ChatGPT GPTs. Just to be sure: the main text was about Claude Code, and this is a ChatGPT GPTs. The tools are different.
But the root is the same. What's needed isn't technology. It's just a design that doesn't let the AI get lost.
This GPTs is a finished product that pushes that philosophy to the limit in the single area of "slide creation." I've already finished all the work of designing the context.
I guarantee it. All you do is type in the theme. After that, the thoroughly designed GPTs will spit out slides without hesitation.
The article that first introduced this GPTs recorded 400,000 impressions. That's how many people reacted, saying "this is different."
https://x.com/masaki_aihack/status/2068646555524223366
And for a limited time only, I'm giving away a bundle of "20 bonuses" including this GPTs.
The way to receive it is simple. Start by joining the LINE Open Chat below.
I'll be honest: this GPTs wasn't finished in one go. I failed more than 50 times. It took a week to finally get it to a point where "anyone can use it." I'm giving away that manual as is.
Let me say it one more time. What's needed isn't technology. It's just the ingenuity to not let the AI get lost.
Why not end the exhaustion of slide-making today?





