LongCut logo

Your CLAUDE.md Is Missing One Section

By Daniel Jindoo

Summary

Topics Covered

  • The Smartest Intern Still Needs Onboarding
  • XML Tags Beat Sentences for AI Prompts
  • Stop Rules Tell AI When Done Is Done
  • The Model Isn't the Bottleneck, Your Rules Are

Full Transcript

Have you ever thought about that your AI may be doing too much, calling tools you didn't ask for, reading files you didn't point it at, searching when it already had the answer.

Hear me out. This space is moving really, really fast.

I'm sure you know it already.

The prompt you wrote last year worked, but same prompt that you're using today, probably garbage.

You didn't change anything, so what exactly changed?

The model changed.

There's a section missing from your prompt right now and almost nobody writes it correctly.

I used to be inside the AI info business.

I watched prompt courses get sold for $2,000 promising people a $200K job.

The course was outdated in six months.

The job barely existed.

Everything moved so fast.

It made me really, really sick.

All that money down the drain for what exactly?

And that's why I'm just exposing here what's really important today.

So when I tell you operating rules are the real shift, I'm telling you what I wish someone told me back then.

Okay, so what actually changed?

As you already know, everyone keeps saying prompts are dead.

Prompts are dying, blah, blah, blah.

They're not, exactly.

They just got promoted.

Let's think of it like this.

I want you to imagine that you hire the smartest intern in the world, like a real PhD level genius, the works, but it's day one and they don't know how your company runs yet.

You have two options here.

You could tell them just go handle customer service and walk away, or you could hand them an onboarding document, SOP document, that tells them the scripts, the policies, when to escalate, et cetera, and what done looks like.

Same intern and two very different outputs.

What that means basically is the old prompt was the first version, go handle customer service.

It's a sentence.

It's a wish basically, right?

The new prompt is the onboarding document, and the onboarding doc has a name, actually two names, depending on which model you're using.

OpenAI calls theirs AGENTS.md and

Anthropic calls theirs CLAUDE.md.

I'm sure you heard of it, but stay with me for now. In plain English, they're just plain text files with a fancy ending that the AI reads every time you talk to it.

It's same idea, just different file name, MD file.

Both are markdown files that you commit to your code base and your AI reads them every single session, whether you're running Codex, which is OpenAI's coding agent, Claude Code, Anthropic's version, or any of the agent stuff in between, Antigravity or whatever.

So your prompt is now a file, not a sentence, a file.

AGENTS.md is the new prompt.

CLAUDE.md is the new prompt.

The whole game moved from the chat box into your repo.

And I think most people didn't get the memo on this one.

What that means is the stuff you write inside these files is what I keep calling operating rules. Same thing.

operating rules. Same thing.

The file is just where they live.

This is the part that broke the prompt course business overnight because you can't sell a $2,000 course on writing one file that's mostly just free to copy. I mean, some people gatekeep, but

to copy. I mean, some people gatekeep, but that's not my intention today.

I'm going to give it away for completely free, the exact operating rules that I'm using.

Okay.

Let me show you the two files I actually use, both running my own work right now.

This is my CLAUDE.md.

This is my AGENTS.md.

The one Codex reads.

Notice both are in XML tags, not sentences, not bullet points, tags.

There's a reason why.

Anthropic specifically recommends XML tags in their official prompting documents.

And the reason it works is that the AI reads in chunks, not in flow.

So the tag tells it exactly what each chunk is for.

So user_profile is who I am and communication_protocol is how I want it to talk.

Each chunk has its own job, and because Opus 4.7 reads instructions more literally now, the cleaner the boundaries, the more predictable the output.

Sentences let the model guess where one instruction ends and another begins.

Tags, however, do not.

Does that make sense?

That's why this format works for both MD files.

Now why don't we go inside each one?

CLAUDE.md has five blocks here, who I am, how I want it to talk, how I want it to think, first principles, transfer learning, and how I want responses structured, and my core philosophy.

That's about it.

Notice what's not in there though. No tool rules, no stop

though. No tool rules, no stop rules, nothing about verification or recovery either.

Chat is mostly thinking with me, not doing work for me.

The boundary is my next message though. I don't need an execution contract.

message though. I don't need an execution contract.

Now let's scroll down the AGENTS.md here.

Same five blocks at the top, but there is a whole new section called execution_contract.

What that means, 12 sub-rules covering when to persist, when to stop, how to check its own work, how to recover when a tool call fails, how to handle missing context, whether to ask me or make a guess.

This is the execution contract OpenAI's guidance keeps talking about, right?

Codex does things.

It calls tools and edits files.

So it needs rules for the work, not just rules for the talk.

That's the real split.

Both files share the personality, the AGENTS.md adds the work manual on top.

the AGENTS.md adds the work manual on top.

The catch here is if you only write a CLAUDE.md and you then go use Codex, you

CLAUDE.md and you then go use Codex, you get an agent with no rules of engagement.

That's quite obvious, right?

It's a different platform.

So it works hard, but you can't really predict where it stops.

If you only write an AGENTS.md and then talk to Claude in chat, you get a robot with no personality.

Just wrong scope, wrong outcome, wrong platform.

So this is a very beginner friendly explanation, you got to know about that.

Now, both files I just showed you are missing the same thing here.

Well, my CLAUDE.md is

missing it entirely.

This is the same thing I told you about at the start, the section almost nobody writes it correctly.

It is the section that fixes the overworking problem from the hook that I mentioned, which is stop rules.

That's the section.

Stop rules are exactly what they sound like.

They tell the AI when to stop, stop searching, stop calling tools, stop reading files, stop asking follow up questions, stop trying to be helpful past the point it was already useful.

So I'm assuming most of you have felt this.

You give Claude or Codex a simple task and it ends up calling 14 different tools, reading files you didn't really mention, burning through your budget and coming back with a nine page report when you really just wanted three bullet points for the simple answer.

So that is not the model being dumb.

That is you forgetting to tell it when done is done.

What done looks like.

Same intern logic, right?

You wouldn't onboard a new hire and never tell them when their shift ends.

But that's exactly what you're doing to your AI.

What that means in plain English, stop rules look like this.

Stop after one search, stop when you have three valid options.

Stop if the answer is in the file I already gave you.

Don't ask clarifying questions, make your best guess and move on.

That's it.

That's the missing section, and almost nobody writes it because it feels weird to tell a smart, very, very smart system to stop being thorough and rigorous about it.

Oh.

Now let me show you what this actually looks like.

Same task, same model, two different prompts.

First, the old prompt, the way most people write it, you're an expert engineer, review this repo thoroughly, think step by step, identify all issues, be comprehensive.

Watch what happens here.

It's reading every file, including the ones in node modules here.

It's calling search, it's pulling in tests, still going, we're at 30 seconds, still going, 45 seconds.

Now it's giving me a four page report covering things I didn't really ask for, half of which aren't actual problems. Bad bad bad.

That is the be comprehensive trap.

Smart models with a vague stop condition is a no, no, no.

Now the same task with operating rules.

Review the repo.

Focus only on files I changed in the last week.

Output, top three issues, one sentence each plus the file path, stop after three.

Do not read tests, do not read config files, make your best guess if a file is ambiguous, don't ask me.

Okay, let's have a look at this.

It pulls the diff, three issues, three file paths done in 12 seconds.

Same model and using the same brain, just different operating rules.

One cost me four minutes and a page of noise and the other cost me 12 seconds and shipped exactly what I asked for.

Can you see the difference here?

This is the whole video in one comparison.

The model isn't exactly the bottleneck here.

Your operating layer is, and this exact pattern is what AI agencies charge a couple thousand dollars to set up.

It's the same six pieces with a logo on top.

The file is free, the thinking is the work.

So I have a couple of things that you can take home with you.

First, if you're using Claude Code or Codex, you should have a CLAUDE.md or AGENTS.md

CLAUDE.md or AGENTS.md

in your repo.

The prompt is a file now.

If you don't have one, that's where you start today.

Second, my take on this is you don't need a prompt engineering course anymore.

You need to write one file and then iterate on it.

That's it. Meanwhile, learn to speak your mind, learn how to ask better questions.

Third, and this one is gold. Anthropic

actually published their own system prompts like the one they use to make Claude behave the way it does in the apps.

Simon Willison maintains the comparison.

Why don't you go read it?

You can literally copy how Anthropic instructs Claude. Cheapest masterclass on operating-rule

Claude. Cheapest masterclass on operating-rule writing on the internet that nobody probably knows exists.

If you want my two files, the AGENTS.md

and the CLAUDE.md I actually use in my life and business, I'm giving them away free, link in the description.

It includes the stop rules templates, and a one pager on the document order trick that bumps Claude's accuracy up to 30%.

Why don't you just sign up for my newsletter and it's yours.

It's free.

Anyway, that's it for today, and if you want to see more, why don't you comment down below on what you want to see next.

For the next video, I don't know yet what I'm going to cover, but you tell me, because that's how our channel runs.

You ask, I build, we all learn.

See you in the next video.

Loading...

Loading video analysis...