The New Rules of Context Engineering for Claude 5 Models: A Developer Guide

TL;DR
Anthropic removed over 80% of Claude Code's system prompt for Claude 5 models.
Context engineering was always the higher-leverage skill than prompt engineering. But the rules just changed. On July 24, 2026, Anthropic published that it removed over 80% of Claude Code's system prompt for Claude 5 generation models, naming Claude Opus 5 and Claude Fable 5, with no measurable loss on its coding evaluations.
The old rules were written for older models that needed guardrails. Claude 5 models have better judgement. They do not need the same constraints. If you are still writing CLAUDE.md files and skills like it is 2025, your context is overconstrained and you are leaving capability on the table.
This post covers the six specific shifts Anthropic documented, what they mean for your CLAUDE.md files, and how to audit your own context with claude doctor.
If you are new to context engineering, start with the original context engineering guide first. This post is the Claude 5 update.
Last updated: October 16, 2026. Re-read against the Anthropic blog post (published July 24, 2026). Corrections in this update: the audit command is /doctor inside Claude Code, the "50 lines" rule of thumb is removed because Anthropic does not give one, and the model list now matches what the post names.
Official Sources#
| Source | Link |
|---|---|
| Anthropic's new rules post | claude.com/blog |
| Claude Code overview | docs.anthropic.com |
| Memory and CLAUDE.md | docs.anthropic.com |
| Skills reference | docs.anthropic.com |
| Dynamic Workflows | claude.com/blog |
| Fable 5 prompting field guide | claude.com/blog |
| Anthropic context engineering | anthropic.com |
The Six Shifts#
Anthropic documented six specific context engineering myths that no longer apply to Claude 5 models. Each one has a direct implication for how you write CLAUDE.md files, design skills, and structure your system prompts.
Shift 1: Rules -> Judgement#
Old approach: Give Claude explicit rules. "Default to writing no comments. Never write multi-paragraph docstrings. Do not create planning documents unless asked."
New approach: Let Claude use judgement. "Write code that reads like the surrounding code: match its comment density, naming, and idiom."
The old rules were necessary because older models would write incorrect comments or create unnecessary files without explicit guardrails. Claude 5 models can infer the right behavior from context. Overconstraining them forces extra reasoning cycles to reconcile conflicting instructions.
What to change in your CLAUDE.md: Review every rule that starts with "always" or "never." Ask whether Claude 5 can figure this out by looking at the codebase. Replace hard rules with contextual guidance.
Shift 2: Examples -> Interface Design#
Old approach: Give Claude examples of how to use every tool or function.
New approach: Design clear interfaces. Use expressive parameter types and names that hint at correct usage. An enum status: "pending" | "in_progress" | "completed" teaches Claude how to use a Todo tool better than a paragraph of examples.
Anthropic found that examples actually constrain Claude 5 models to a narrower exploration space. Instead of showing the model how to use something, design the tool itself to be self-explanatory.
What to change in your skills: Look at skills that contain extensive "for example" sections. Strip the examples and instead invest in better tool parameter design. If a tool needs examples to be usable, the tool interface is wrong.
Shift 3: Everything Upfront -> Progressive Disclosure#
Old approach: Put all context in the system prompt so Claude always has it.
New approach: Use progressive disclosure. Load context only when needed. Claude Code now uses deferred-loading tools where the agent must search for full definitions before using them.
The same applies to your CLAUDE.md files. A common mistake is making CLAUDE.md a central repository for every possible practice. Instead, use a tree of files that load at the right time. For example, move verification instructions into a skill that Claude Code calls selectively, rather than listing them in the system prompt.
What to change in your CLAUDE.md: Anthropic says to keep it lightweight: describe briefly what the repo is for, spend most tokens on gotchas, and skip the obvious things Claude can see in the file system. Move specialized knowledge (deploy procedures, testing conventions, review checklists) into separate skill files and reference them from the main file. See the dynamic workflows guide for the pattern.
Shift 4: Repetition -> Simple Tool Descriptions#
Old approach: Repeat instructions in both the system prompt and tool descriptions, because older models might miss instructions at the start of the context window.
New approach: Put instructions on how to use a tool in its tool description rather than the system prompt. Anthropic says earlier models sometimes needed repeated instructions or favored the end of the context window, and that it was able to delete the repeated examples for the newer models.
What to change in your context: Deduplicate. If your CLAUDE.md and your skills both describe the same workflow, pick one. Put the canonical description in the skill or tool description and remove it from CLAUDE.md.
Shift 5: Memory in CLAUDE.md -> Auto-Memory#
Old approach: Use # hotkey to manually save memories to CLAUDE.md.
New approach: Anthropic says Claude now automatically saves memories that are relevant to the work and to you, so the # hotkey for writing to CLAUDE.md is no longer the recommended route.
This does not mean CLAUDE.md is obsolete. It means CLAUDE.md should focus on project-level context that is known before the session starts (architecture, gotchas, conventions). Runtime learnings (user preferences, decisions made during a session) are handled by auto-memory.
What to change in your CLAUDE.md: Remove any instructions about manually saving memories. Keep only persistent project context that Claude cannot infer from the codebase.
Shift 6: Simple Specs -> Rich References#
Old approach: Store specs as simple markdown files for Claude to reference.
New approach: Use rich references. HTML artifacts created by Claude's artifacts feature, test suites that serve as executable specs, or code examples from other codebases that Claude can port.
Rubrics are another form of reference. A rubric defines good taste in a particular domain (API design, error handling, UI patterns) and can be used by verifier agents in dynamic workflows to check outputs against standards.
What to change in your context: Instead of writing long markdown specifications, write test suites first and let Claude infer the spec from the tests. Use the artifact system for interactive mockups and visual references.
The claude doctor Command#
Anthropic says it put these best practices into a command, claude doctor, and that you use /doctor inside Claude Code to rightsize your skills and CLAUDE.md files. The post does not list what the command checks or how it reports, so run it and read the output rather than assuming.
Inside a Claude Code session:
/doctor
The principles it encodes are the ones above: overconstrained rules, duplicated instructions, excessive examples, and context that should be split into progressively-disclosed files.
What This Means for Your System Prompt#
If you are building your own agent harness with the Claude API, these shifts apply directly to your system prompt design. The same patterns that Anthropic used to shrink Claude Code's system prompt by 80% apply to any agent that uses Claude 5 models:
- Remove guardrails that Claude 5 models do not need. Test by deleting a rule and running your eval suite. If scores hold, the rule was overconstraint.
- Replace examples with better API and tool design. If a tool needs a paragraph of explanation, simplify the tool.
- Use progressive disclosure in your system prompt structure. Load task-specific instructions via tool definitions rather than dumping everything upfront.
- Deduplicate. If the same instruction appears in your system prompt and a tool description, delete it from one.
- Let auto-memory handle runtime learning. Do not fill your system prompt with instructions about what to remember.
For a deeper look at the motivation behind these changes, Anthropic's Fable field guide covers how Claude 5 models process instructions differently from earlier generations.
FAQ#
What changed in context engineering for Claude 5 models?#
Anthropic removed over 80% of Claude Code's system prompt for Claude 5 models. The six key shifts are: rules to judgement, examples to interface design, upfront context to progressive disclosure, repetition to simple descriptions, manual memory to auto-memory, and simple specs to rich references. The full details are in the official blog post.
Should I delete my CLAUDE.md file?#
No. CLAUDE.md files are still valuable for project-level context that Claude cannot infer from the codebase - architecture decisions, gotchas, deployment procedures, and team conventions. The change is that you should remove overconstrained rules, deduplicate instructions, and split long files into progressively-disclosed skills.
How do I run claude doctor?#
Anthropic names the command claude doctor and says to use /doctor in Claude Code to rightsize your skills and CLAUDE.md files. Run /doctor inside a session; the post does not document its output format.
Does this affect how I write skills?#
Yes. Skills should be lightweight guides that encode opinions and knowledge specific to your team or product. Avoid overconstraining them with rules and examples. Use progressive disclosure for long skills by splitting them into multiple files. Trust Claude 5 models to figure out the right behavior from minimal guidance.
Are these changes specific to Claude Code or do they apply to the API too?#
Both. The system prompt optimizations Anthropic applied to Claude Code are based on how Claude 5 models process instructions. If you build your own agent harness with the Claude API, the same principles apply: remove guardrails that newer models do not need, replace examples with better interface design, and use progressive disclosure.
Where can I read the original context engineering guide?#
The original context engineering guide covers the four-layer framework (system prompts, project context, skill libraries, memory systems) that this update builds on. Read it first if you are new to the concept.
Continue Reading#
- Context Engineering: The Highest-Leverage Skill in AI-Assisted Development - the original framework this post updates
- Claude Sonnet 5 Developer Guide - migration guide with breaking API changes
- Claude Code Dynamic Workflows Guide - progressive disclosure with skill trees
- Skills Are the New Agent Operating System - how composable skills replace monolithic prompts
- Progressive Disclosure in Claude Code - loading the right context at the right time
- Claude - current models, context limits, and pricing on one page
- Intro to Agents 101 course - context economy, compaction, and memory for agents, built hands-on
Sources#
- Anthropic, "The new rules of context engineering for Claude 5 generation models" (July 24, 2026). claude.com/blog
- Anthropic, "A field guide to Claude Fable: finding your unknowns" (2026). claude.com/blog
- Anthropic, "Claude Code overview" (2026). docs.anthropic.com
- Anthropic, "Memory and project context" (2026). docs.anthropic.com
- Anthropic, "Claude Code Skills" (2026). docs.anthropic.com
- Anthropic Engineering, "Effective context engineering for AI agents" (2026). anthropic.com
Get the next deep dive like this in your inbox
One email a week on Context Engineering and the rest of the AI dev stack. Free.
Read next on Claude Code
Context Engineering: The Highest-Leverage Skill in AI-Assisted Development
Context engineering is designing the persistent context around every AI interaction: CLAUDE.md files, system prompts, skill libraries and memory systems.
14 min readClaude Sonnet 5 Developer Guide: Migration, API, and Effort Levels
Claude Sonnet 5 migration guide: the three breaking API changes from Sonnet 4.6, the new effort parameter, tokenizer impact and when to use each effort level.
8 min readClaude Code Dynamic Workflows: The Complete Guide
Claude Code dynamic workflows turn orchestration into a JavaScript script that runs agents in the background. How scripts, schemas, budgets and resume work.
10 min readTechnical content at the intersection of AI and development. Building with AI agents, Claude Code, and modern dev tools - then showing you exactly how it works.








