Anthropic cut 80% of Claude Code's system prompt and replaced it with six new context rules

Rules became judgment, examples became interfaces — one tool description shrank from about 9,100 characters to a single sentence and an enum
By Thariq / Anthropic07-25 · 10 min read⚑ Tutorial / how-to
🎧 Listen to the podcast0:00 / --:--
0:00 / --:--
Tool tutorial · XiaoHu Explains
60-second summary
  • Those "never do X" rules you've packed into CLAUDE.md and your skills are probably holding you back now: Anthropic cut more than 80% out of Claude Code's system prompt, and coding benchmarks showed no measurable loss
  • Hard-coded rules used to be necessary because older models couldn't be trusted to judge for themselves — even knowing a rule was wrong for some cases, it had to stay. The old "default to no comments" line has been replaced with a single guiding principle: code should read like the code around it
  • Adding one more constraint isn't free: the system prompt might say "keep docs when needed," a skill might say "no comments," and you might say "just do it the usual way" — all three can show up in the same request, and Claude has to reconcile the conflict before it can even start
  • TodoWrite's tool description went from about 9,100 characters down to one sentence, a three-value enum, and one constraint. Want to trim your own skills and CLAUDE.md? Run /doctor in a session
⚑ This material comes from Anthropic's Thariq walking through the redesign of his own team's product. "Cut more than 80%" and "no measurable loss on coding benchmarks" are Anthropic's own figures — the original post doesn't say whether that's measured in characters or tokens, and doesn't list which benchmarks. The image showing conflicting instructions is labeled by Anthropic itself as an illustrative example, not an actual excerpt from a real prompt.
1 A counterintuitive number

They cut 80% of Claude Code's system prompt

Thariq Shihipar (@trq212), a member of Anthropic's technical staff, posted a long thread on X about something they'd just done to Claude Code: for the new Opus 5 and Fable 5 generation of models, they cut more than 80% out of the system prompt. Coding benchmarks showed no measurable loss.

Claude Code's system prompt
What got cut: hard-coded bans, repeated reminders, and process instructions that sat there taking up space even when unused (categorized by this site based on the article's six replacements)
Kept
The cut ratio is illustrative, based on the original's "over 80%" figure. Anthropic hasn't disclosed whether that's measured in characters or tokens.

First, what actually got cut. When you send Claude a message, it reads far more than that one line: the system prompt, the skills you've installed, the project's CLAUDE.md, memories it's stored on its own, files you've @-referenced — all of it gets stitched into one big block, and the line you typed is just a small piece of it. Anthropic calls the discipline of organizing all that, and deciding when each piece shows up, context engineering.

A prompt is the one thing you're asking for. Context is the entire workbench you hand over.

There's a fundamental difference from writing a prompt: a prompt is one-off — you know exactly what you want this time. Context is general-purpose — it has to serve thousands of future requests whose content you can't know in advance, so it can't get too specific. That's the hard part: you're writing guidance for a problem that doesn't exist yet.

2 Rules → judgment

Rules that once had to be hard-coded can now be deleted

Take one real rule. Here's what Claude Code's early system prompt said about comments:

Old version · original system prompt
In code: default to writing no comments. Never write multi-paragraph docstrings or multi-line comment blocks — one short line max. Don't create planning, decision, or analysis documents unless the user asks for them — work from conversation context, not intermediate files.
By default, don't write comments in code. Never write multi-paragraph docstrings or multi-line comment blocks — one short line, max. Don't create planning, decision, or analysis documents unless the user asks for them; work from the conversation context instead of producing intermediate files.

This rule was necessary at the time. When Claude Code first launched, the top priority was keeping it from causing damage — like deleting files. So the guidance had to be written extremely firm, even when it wasn't always right. The comments rule was exactly that kind of not-always-right rule: some users have their own documentation habits, and some genuinely complex code deserves multi-line comment blocks. But the models back then wouldn't hold back without it — they'd write comments that were wrong nine times out of ten. Even knowing the rule would misfire on some people, it was the only option.

The new generation of models has good enough judgment that this misfiring is no longer necessary. The system prompt now covers the same ground in a single line:

New version · original system prompt
Write code that reads like the surrounding code: match its comment density, naming, and idiom.
Code should read like the code around it — comment density, naming, and idiom should all match.
Old: a ban

It dictated exactly how many comments to write. The more rigid the rule, the more wrong it got whenever a case didn't fit — with zero room to adjust.

New: a criterion

It doesn't dictate how many comments to write — it dictates what to measure against: the surrounding code. The reference point changes with the project, so the rule never has to be rewritten for each one.

Those old guardrails existed to head off the worst-case outcome. Once the worst case stops happening, the guardrail should come down, letting the model lean on surrounding context and its own judgment instead.

Related on this site
Inside Anthropic: the harness scaffolding is being torn down
3 The cost of conflict

Three conflicting instructions, landing in a single request

There's a more practical reason for cutting rules, too. Reading through their own team's Claude Code conversation logs, they found that a single request often surfaced several instructions fighting each other at once.

Three conflicting instructions in a single request: the system prompt says keep docs when needed, the skill says no comments, the user says just do it the usual way
All three lines get stitched into the same context and sent in together. These three lines are Anthropic's own illustrative example, not an actual quote. Image: Thariq / X

Claude can usually guess what you actually want. But it has to reconcile these conflicting lines before it can decide what to do. You might think tacking one more constraint onto a skill is free — in reality, every one you add can collide with another one somewhere else, and reconciling them takes real effort.

That's also why cutting 80% didn't cost any score: what got removed wasn't just filler text, but the conflicts that text created.

4 Six side-by-sides

Six outdated habits, and what replaced them

Thariq listed six practices that have been passed down for years and no longer hold up, and gave a replacement for each:

Give Claude RulesGive Claude rules
→
Give Claude JudgementLet Claude judge for itself
Give Claude ExamplesGive Claude examples
→
Design InterfacesDesign the interface
Put it all upfrontPut it all upfront
→
Use Progressive DisclosureUse progressive disclosure
Repeat YourselfRepeat yourself
→
Simple Tool DescriptionsSimple tool descriptions
Memory in Claude.MDsMemory written into CLAUDE.md
→
Auto-memoryAuto-memory
Simple SpecsSimple spec files
→
Rich ReferencesRich references
The crossed-out items on the left are the outdated habits; the ones on the right are current practice. The English wording is Anthropic's own. Source: Thariq / X

The first pair is covered above; the other three each get their own section. Let's clear the two lighter ones first.

Repeat yourself → simple tool descriptions

Earlier Claude models sometimes needed the same thing said several times before it stuck, and they paid more attention to instructions near the end of the context than near the beginning. So the system prompt used to explain how to use a tool once, and the tool's own description explained it again. Those duplicated explanations are gone now — how to use a tool lives only in that tool's description.

Memory in CLAUDE.md → auto-memory

The old workflow was to hit the # shortcut and have whatever you wanted remembered get written into CLAUDE.md automatically. Now Claude saves memories about this work and about you on its own — you don't have to stuff them into a file by hand.

5 Examples → interfaces

Skip the examples — design the tool itself

Teaching a model to use a tool used to have one iron rule: give it plenty of examples. Now they've found that, for this newest generation of models, examples do the opposite — they box the model into a narrow slice of the possibility space. Show it a handful of use cases, and it'll keep circling back to those same handful.

The TodoWrite tool description before and after: about 9,100 characters before, down to one sentence, a status enum, and one constraint after
The same TodoWrite tool's description, before on the left and after on the right. The sentence on the right trails off into an ellipsis, meaning the current description continues past what's shown here. Image: Thariq / X

What replaces examples is interface design: making the tool, script, or file itself self-explanatory. The key is in the parameters — the values a parameter can take should communicate the usage on their own.

TodoWrite is the example. Its status field takes only three values: pending, in_progress, completed. Just having that enum there tells the model how to use it: a task has exactly these three states, no more, no fewer. The requirement doesn't need an example either — one line, "keep only one task in in_progress at a time," says it all.

≈9,100
Characters before the rewrite — packed with a when-to-use checklist and sample cases
3 values
After the rewrite, usage rides on the status enum plus one line: only one task in progress at a time

That's a shift from a year ago. Anthropic's 2025 piece on context engineering said "providing examples, or few-shot prompting, remains a widely recommended and endorsed best practice" — and back then, the only thing they warned against was stuffing a prompt with a long tail of edge cases. One model generation later, examples themselves went from a recommendation to a liability.

6 Put it all upfront → progressive disclosure

You don't need it all upfront — load it when it's needed

Claude Code was originally built just for coding, so its system prompt was packed with detailed instructions on how to do code review and how to do verification. Most of the time none of that was needed, but when it was, it was critical — so it just sat there taking up space regardless.

The current fix is to make it appear on demand: code review and verification have each been moved into their own separate skill, which Claude pulls up only when it needs to. This approach is called progressive disclosure: load whichever piece is actually needed, and nothing else.

Everything upfront
System prompt
Full code-review process
Full verification process
Full definitions for every tool
Every rule that might ever apply
Takes up space even when unused, and easily collides with something said elsewhere
Loaded on demand
System prompt (product context only)
Code-review skill · on standby
Verification skill · on standby
Lazy-loaded tools · name only
Just the piece this run actually needs
Dashed boxes cost only a one-line name — the full definition arrives only when called

The same approach applies to tools. Claude Code now has far more tools wired up than before, and some of them are lazy-loaded: normally, only their name sits in the context, and the model has to call ToolSearch to pull the full definition before it can use one. Without a search, a tool costs one line for its name; its full, often thousand-word description never loads — and it's precisely because it doesn't load that they can afford to wire up more tools in the first place.

Starting context Bash · Read · Edit always-on TaskCreate name only Monitor name only WebFetch name only ToolSearch("task") After the search Bash · Read · Edit always-on TaskCreate full definition Monitor name only WebFetch name only Dashed-box tools cost only a one-line name; full definitions never enter the context — only the one used gets expanded Starting context Bash · Read · Edit always-on TaskCreate name only Monitor name only WebFetch name only ToolSearch("task") After the search Bash · Read · Edit always-on TaskCreate full definition Monitor name only WebFetch name only Dashed boxes cost only a one-line name — full definitions never load
How a lazy-loaded tool enters the context (illustration by this site; tool names drawn from Claude Code's actual lazy-loaded tools)

Your own CLAUDE.md and skill files should be organized the same way. Thariq called out a common mistake: many people cram every practice they might ever need into a single file, on the theory that if it's not written down, Claude won't find it. The right move is to split it into a file tree that loads on demand.

7 Specs → references

A spec doesn't have to be a document — it can be code, or a test suite

First, what "spec" means here: it's what you write for Claude describing "what I want this to look like." People have traditionally written it as a markdown document — Claude Code's plan mode has always leaned heavily on files like that — and storing a spec in the codebase for a long-running project to reference is the same idea. Both still work, but you can go further now: Claude can handle far more complex references.

HTML artifact

A plan doesn't have to be markdown. An HTML page built with the artifacts feature works just as well as a reference.

A test suite

A sufficiently detailed test suite is itself a spec — it defines "what correct looks like" more precisely than prose ever could.

A function in another codebase

If the behavior you want has already been implemented somewhere, just point Claude at that code — even if it's written in a different language.

A rubric

Write down, item by item, what makes for a good API design, and Claude can send out several instances of itself carrying that rubric to check whether the output matches your taste.

He's more direct about why code-based references work better in A Field Guide to Fable — another piece by the same author, Anthropic's official usage manual for Fable 5. Some things you can't describe: maybe you lack the vocabulary, or maybe describing them precisely would just take too long. In that case, the best move is to hand over a reference, and the best reference of all is source code. Back in this piece, his example is: for the same design, giving Claude an HTML draft usually works far better than a written description or a screenshot.

You can use @ to bring files in as references… In general, favor things in code, because it gives Claude clear, high-fidelity instructions in a language it knows extremely well. — Thariq Shihipar, "The new rules of context engineering for Claude 5 generation models" (the ellipsis marks a separate passage in the original)
8 Layers

Context is built from six layers — what goes in each one

Put the previous points together and you get a layered placement guide. First, here's how what Claude actually reads in a single request gets assembled:

The six layers of context: your prompt, references, system prompt, CLAUDE.md, skills, and memory
The line you typed sits at the top; below it, in order, come references (files brought in with @, specs, design drafts, codebases, artifacts), the system prompt, CLAUDE.md, skills, and memory. Image: Thariq / X

Of these six layers, the top one — the line you just typed — is yours in the moment, and the bottom one, memory, is stored by Claude on its own; neither needs your arranging. The four layers in between are the ones you actually have to set up:

System prompt

This layer is tied to product context — it tells Claude what product it's operating inside and what job it's doing. If you're using Claude Code, you basically never touch it; if you're building your own agent framework, this is the layer worth putting real effort into.

CLAUDE.md

Keep it light — just explain plainly what this repo does. Spend most of the tokens on the codebase's specific pitfalls — a convention like "all your types live in one file and nowhere else" is worth writing down. Don't write facts Claude can pick up just by glancing at the file system or the repo. When there's too much detail, use progressive disclosure: if verification has several unusual requirements, turn it into a separate verification skill and point to it from CLAUDE.md.

Skills

Treat a skill as a lightweight guide that lets Claude find information when it needs it — don't over-specify, except in places that genuinely matter. Split long skills into multiple files for progressive disclosure. What belongs in a skill, above all, is the judgment, knowledge, and practice that's specific to you, your team, or your product.

References

It sits above the system prompt, closest to the line you typed, and it's the only one of these four layers that changes every time: bring in whatever you want Claude to follow this round.

Related on this site
Claude skill installed but won't trigger? Fix these two things first
9 Try it

Want to trim things down? Start by running a checkup command

Anthropic built this whole approach into a command for trimming your skills and CLAUDE.md. The original's description of it: "We've baked these best practices into claude doctor — run it in Claude Code with the /doctor command."

The two entry points aren't quite the same. Testing this on Claude Code 2.1.220: the command-line claude doctor's help text says it "checks whether your Claude Code installation is healthy, reads settings files in the current directory, and doesn't prompt for trust" — and adds at the end that for a full checkup that can actually fix problems, you should run /doctor inside a session. So if you want help trimming your skills and CLAUDE.md, run the slash command inside a session, not the CLI one.

Claude Code ships fast, so the version you're running might behave differently — run claude doctor --help once to check the current wording.

These six replacements rest on one premise: "this new generation of models has better judgment," and the original names Opus 5 and Fable 5 specifically. If your workflow runs on an older model, or on a different provider's model, whatever those guardrails were originally blocking might still be a problem — test in a small scope before you start deleting. The original doesn't elaborate on this point.

✅ Trim your own context
Material you can lift straight from this piece: the old and new system-prompt lines verbatim, the six old habits set against their replacements, and the checklist of what belongs in each of the four layers.
Source
The new rules of context engineering for Claude 5 generation modelsThariq Shihipar (member of Anthropic's technical staff)·Original X post·Same-day version on Anthropic's official blog·2026-07-24
Editor's note
In-article photos are from the original piece, made by the author. The English in the six-item comparison table is taken from the same image in the original; the translation and layout here are ours. The "everything upfront vs. loaded on demand" two-column graphic and the lazy-loaded-tool diagram were both drawn by this site. The categorization of what got cut in the opening "cut ratio" figure is this site's own grouping based on the article's six replacements — the original only gave the 80% figure. The distinction between claude doctor and /doctor was verified by this site on Claude Code 2.1.220 and doesn't appear in the original. The quote about examples from the 2025 context-engineering piece is drawn from the first link under Further Reading.
↑ End of article
✓ This article is free to read in full

Members can copy or download the full Markdown, and let their AI subscribe and ask.

Read the original ↗
📮 New explainers, straight to your inbox

Found this useful? Leave your email — every new explainer, the moment it's out. Unsubscribe anytime.