The Tech ArchiveThe Tech ArchiveThe Tech Archive
Small BusinessMarketingDevelopers
ArticlesTopicsSeriesAbout

Get the practical AI brief

Verified, no-hype AI tips you can actually use - in your inbox. Free.

No spam. We verify what we send. Unsubscribe anytime.

The Tech ArchiveThe Tech Archive

The Tech Archive

AI news, analysis & explainers

AboutSmall BusinessMarketingDevelopersArticlesTopicsSeriesMethodologyAI DisclosureCorrections

© 2026 All rights reserved.

Back to home
0 readers reading
  1. Home
  2. Articles
  3. Artificial Intelligence
  4. How to Audit Your Prompts for Claude 5: The Context Engineering Workflow Anthropic Used to Cut 80%

Contents

How to Audit Your Prompts for Claude 5: The Context Engineering Workflow Anthropic Used to Cut 80%
Artificial Intelligence

How to Audit Your Prompts for Claude 5: The Context Engineering Workflow Anthropic Used to Cut 80%

Claude 5 models work better with less prompt scaffolding. Here is the step-by-step Claude Code context engineering audit — rules to judgment, progressive disclosure, /doctor — so your CLAUDE.md stops getting in the way.

Sham

Sham

AI Engineer & Founder, The Tech Archive

13 min read
1 views
July 30, 2026

Verdict: If you are using Claude Opus 5, Claude Fable 5, or any model that calls itself "Claude 5 generation," the prompt file that served you on Claude 3.5 or Claude 4 is now a tax, not a guardrail. On July 24, 2026, Anthropic published the supporting evidence: they removed over 80% of Claude Code's own system prompt for Opus 5 and Fable 5 with "no measurable loss on our coding evaluations" (Anthropic, July 24 2026). The lesson is not "delete everything" — it is "delete what the model can now derive." This guide is the audit you can run on your own CLAUDE.md, skills, and agent harness prompts so the 5-generation models stop fighting your guardrails and start using their judgement.

Last verified: 2026-07-30 · Volatile facts (model names, command availability) flagged inline.

  • Claude Code's own system prompt was cut 80%+ for Opus 5 / Fable 5 — no eval loss.
  • Six pattern swaps replace the old "more rules = safer" default.
  • Run /doctor in Claude Code to rightsize your CLAUDE.md and skills automatically.
  • What stays: facts the model cannot derive — brand voice, pricing constraints, sign-off authority, non-obvious architecture.
  • Cost: the audit costs you an hour per repo; the payoff is fewer tokens, fewer conflicts, and often better code.

What changed and why older prompts hurt Claude 5

Claude 5-generation models (Opus 5, Fable 5) follow weaker, longer prompts worse and stronger, shorter prompts better. Anthropic's own team had hand-tuned Claude Code's system prompt to cover the worst-case behaviors of Claude 3- and 4-era models. When Opus 5 shipped on July 24, 2026, the team discovered those constraints now produce conflicting instructions the model has to mediate before it can work (Anthropic, "The new rules of context engineering for Claude 5 generation models").

The concrete example that lands hardest:

  • Old prompt: "Default to writing no comments. Never write multi-paragraph docstrings or multi-line comment blocks — one short line max."
  • New prompt: "Write code that reads like the surrounding code: match its comment density, naming, and idiom."

Same intent, far fewer words, and zero rigid ceiling. Claude 5 can observe the existing commenting style and match it — without being told what "matching" looks like. Anthropic's term for the cleanup is "unhobbling" — removing constraints that once prevented failures the model no longer produces.

Why this matters outside Anthropic: anything built for a weaker model — your CLAUDE.md, your SKILL.md files, your agent harness system prompt — is now doing the same thing. Each redundant or categorical rule burns reasoning tokens as Claude 5 reconciles the rule with the surrounding context it can already see.

The 80% audit: a step-by-step workflow

Most write-ups summarise what Anthropic did. What you actually need is the workflow for doing it to your own repo. Run these six steps in order; each one is a single pattern-swap you can grep for.

Step 1 — Swap rigid rules for judgement prompts

Find every "never do X" and "always do Y" instruction in your system prompt and CLAUDE.md. For each one, ask: can Claude 5 infer this from surrounding context? If yes, replace the rule with a judgement phrase; if no, keep the rule.

Pattern to grep Replace with Example rule that should stay
Never write, Always use, Default to no "Match the surrounding {code,style,idiom}" "Never commit secrets" — model cannot infer policy

The test: if removing the rule makes you afraid because Claude 5 could legitimately not know a business constraint, it stays. If removing it just makes the prompt shorter, it goes.

Step 2 — Replace tool-usage examples with interface design

Older advice told you to show Claude examples of how to use a tool. On Claude 5, examples constrain exploration — the model is "more imaginative than the examples we give it," per Anthropic's report (Anthropic, July 24 2026).

Instead of a few-shot, design the tool's parameters to self-document:

  • An enum of status values (pending, in_progress, completed) with a one-line note ("keep exactly one item in_progress at a time") communicates more than a 5-example showcase.
  • Parameter names like merge_strategy, dry_run, require_review carry context the model reads natively.

The rule for this step: if a tool's behaviour needs three paragraphs of examples to explain, the interface is wrong. Fix the interface.

Step 3 — Convert one monolithic file into a tree of selectively-loaded skills

This is the highest-payoff change and the easiest to get wrong. Claude Code's prompt used to push you to put everything in CLAUDE.md because earlier models would not find context elsewhere. Claude 5 has auto-loaded skills, artifacts, and auto-memory (Claude Code best practices) — it does not need CLAUDE.md to be an encyclopedia.

Progressive disclosure means: load context at the moment it is needed, not at session start.

Build it like this:

  1. CLAUDE.md — keep under ~50 lines. State only: what the repo is, and the gotchas Claude cannot see (e.g., "all shared types live in src/types.ts and nowhere else — do not duplicate them").
  2. Skills per workflow — when a particular workflow runs (SEO audit, frontend design, deployment), a corresponding SKILL.md is loaded only then. Do not load the SEO skill during a backend refactor.
  3. References via @ mentions — when a SKILL needs deeper detail, attach the relevant file (@path/to/state.json, @path/to/mockup.html) at call time. Do not pre-bake it into the system prompt.

If your CLAUDE.md is more than 100 lines, you almost certainly have content that should be a skill. See our deeper write-up on how Skill-by-Demonstration replaces rote prompting for the full mechanics.

Step 4 — De-duplicate instructions across layers

Older models needed repetition: the same instruction in the system prompt and the tool description, because they would "forget" instructions earlier in a long context. Claude 5 does not need this, and duplication now creates conflicts — model has to decide which copy to obey.

Pick one home for each instruction:

  • Behaviour that is about a specific tool → put it in that tool's description. Delete the copy from CLAUDE.md.
  • Behaviour that is about the repo / product / brand → keep it in CLAUDE.md.
  • Grep your CLAUDE.md for any line that names a tool: that line probably belongs in the tool description, not here.

Step 5 — Replace manual memory with auto-memory

Every "# save this to memory" prompt you have written is now obsolete. Claude Code on Claude 5 keeps auto-memory — it automatically records relevant facts about the work and the user as the session progresses. Per Anthropic's guide (July 24 2026), the team removed the manual #-hotkey-to-CLAUDE.md step entirely.

You should:

  • Delete from your CLAUDE.md any instruction that reads "save this to your memory" or "remember this for next time." Claude 5 does this on its own.
  • Keep a simple spec markdown file only if Claude truly needs a reference point it cannot derive (e.g., a design rubric). Otherwise skip the file.

Step 6 — Promote plain markdown specs to rich references

Plain markdown specs were a stopgap. On Claude 5 you can hand the model tighter, higher-fidelity references:

  • Code as spec — a working test suite is a better spec than any prose, because it is unambiguous and executable. Point Claude at the test file rather than describing the contract in markdown.
  • HTML artifacts — a real HTML mockup beats a text description or screenshot of a design, because Claude reads HTML fluently and can match element structure exactly.
  • Rubrics for taste — Claude can write correct but tasteless code. If you have a design standard (API naming, error shape, accessibility), encode it as a rubric Claude can run a verifier agent against.

What stays: the irreducibles you must NOT delete

"Less is more" is the wrong takeaway — the right one is "only what the model cannot derive." Anthropic is explicit that the audit is subtraction of capability rules, not a wholesale purge. The items below survive because they encode business knowledge Claude 5 cannot infer from the codebase:

  • Brand voice and tone (your style guide, not Claude's defaults).
  • Pricing constraints and discount rules (the model cannot know your margins).
  • Sign-off authority (who must approve a release — not in the repo).
  • Confidentiality / compliance rules (which files cannot be sent to third-party APIs, etc.).
  • Non-obvious architectural decisions ("types live in one monolithic file — do not split it").

If Claude could infer it by reading the repo, delete it. If it requires business knowledge the model cannot have, keep it. That is the entire decision.

How to actually run this: the /doctor command

Anthropic shipped a tool to do the audit automatically. In Claude Code, run /doctor (or claude doctor from the CLI). It inspects your CLAUDE.md and skill files and recommends rightsizing for the newer generation of models. It is the same diagnostic Anthropic's team used internally before deleting their own system prompt.

Watch out — /doctor is the team's opinion on what the 5-generation prompt should look like, measured on Anthropic's own coding evals. The 80% figure is also self-reported and the post does not break down which task categories held up and which softened (aiweekly.co analysis, July 25 2026). Treat it as a strong starting point — then run your own eval on your own codebase before you call the migration done.

If you also run Hermes Agent as your agent OS, the same audit applies: your role briefs and skill bundles are the equivalent of CLAUDE.md and should follow the same rules-to-judgement, progressive-disclosure pattern.

Comparison: old prompt vs. cleaned-up Claude 5 prompt

Dimension Claude 3.5 / 4 era (old) Claude 5 generation (new)
Pacing of rules Many categorical rules to fence worst cases Few rules; model infers from context
Examples for tools Few-shot examples Interface design (enums, parameter names)
Context loading Everything up front in CLAUDE.md Progressive disclosure via skills loaded on demand
Instruction location Repeated in system prompt + tool Single source — lives with the tool
Memory Manual #-hotkey to CLAUDE.md Auto-memory
Spec format Plain markdown files Code, test suites, HTML artifacts, rubrics
Audit tool None /doctor command

What this means for you

For developers using Claude Code: run /doctor this week. Anything it flags as redundant for the 5-generation is rebuilding wasted reasoning tokens back into your budget. The cleanup usually pays for itself in the first session.

For teams building their own agent harness: your prompts built for Claude 3.5 are now anti-features. Schedule a one-day audit per repo using the six steps above. If you have shipped a heavy CLAUDE.md from a previous Hermes Agent setup, you might also want to look at our Claude Opus 5 effort-dial cost strategy — a leaner prompt compounds with the effort dial for the cheapest Opus-5-tier tokens.

For founders running regulated codebases: the "trust the model's judgement" framing lands differently when a regulator will read your prompt file. Keep every compliance rule, sign-off rule, and confidentiality rule. Only the capability rules are safe to delete — the business rules stay regardless of model generation.

For solo builders on Opus 5 right now: start with one repo this weekend. Delete the top ten "never/always" rules, replace them with judgement phrases, and ship one feature each way. You will know within a day whether your prompts were holding Claude 5 back or actually helping it.


FAQ

Q: Does Claude 5 still need any CLAUDE.md file? A: Yes, but a short one — describe the repo's purpose and the gotchas Claude cannot see (e.g., where shared types live). Anything Claude 5 can infer from the filesystem should be deleted. Most audits land CLAUDE.md at 30–50 lines.

Q: Will cutting 80% of my prompt hurt my output quality? A: Anthropic reports no measurable loss on their coding evals after the cut. That is the team's own measurement on their own evals. Run /doctor, batch-delete the rules it flags, and run your own eval on your codebase before calling the migration done.

Q: What is the /doctor command and where does it live? A: /doctor (or claude doctor from the CLI) is the Claude Code command Anthropic shipped alongside the context-engineering guide. It inspects your CLAUDE.md and skill files and suggests rightsizing for the 5-generation. It started shipping around July 24, 2026 Confirmed — Anthropic, July 24 2026 (volatile: availability and exact behaviour subject to change with Claude Code releases).

Q: What stays if I clean up my CLAUDE.md? A: Everything the model cannot derive: brand voice, pricing rules, sign-off authority, confidentiality rules, and non-obvious architectural decisions ("types live in one monolithic file"). If it requires business knowledge the model cannot have, keep it. Only capability rules are safe to delete.

Q: Is "context engineering" the same thing as "prompt engineering"? A: No — prompt engineering is the building block inside context engineering. Context engineering is the broader craft of assembling the entire stack Claude sees at inference: the system prompt, tool descriptions, the user message, attached files, memory, and skills. The Claude 5 audit targets every layer, not just the user prompt (Anthropic, "Best practices for prompt engineering for 2026").

Q: Does this apply to models older than Claude Opus 5 / Fable 5? A: Cautiously — no. Anthropic is explicit that older models need stricter and stricter rules. The unhobbling gain is specific to the 5-generation; doing the same slashing on Claude 3.5 or 4 will likely reintroduce the worst-case behaviours those rules were placed to prevent. Audit per model generation.


Sources
  • The new rules of context engineering for Claude 5 generation models — Anthropic / Claude blog (Thariq Shihipar, July 24, 2026) — primary source for the 80% cut, the six pattern swaps, and the /doctor command.
  • Best practices for Claude Code — Claude Code Docs — context window dynamics, skill loading behaviour.
  • Effective context engineering for AI agents — Anthropic Engineering (Sep 29, 2025) — the framework the 5-generation audit builds on.
  • Best practices for prompt engineering for 2026 — Claude blog (Nov 10, 2025) — defining prompt engineering vs. context engineering.
  • Anthropic Deletes 80% of Claude Code's System Prompt for Claude 5 — AI Weekly (July 25, 2026) — secondary analysis flagging the 80% figure is Anthropic's own, measured on Anthropic's own evals.
Updates & Corrections
  • 2026-07-30 — First published. 80% cut figure, /doctor command, and Opus-5 / Fable-5 attribution verified against Anthropic's primary post (July 24, 2026). Volatile: /doctor exact behaviour and the 80% breakdown by task category are not disclosed in the primary source — re-verify on the next Claude Code release.

Get the practical AI brief

Verified, no-hype AI tips you can actually use - in your inbox. Free.

No spam. We verify what we send. Unsubscribe anytime.

Tags

#["AI agents"#"context-engineering"#"Claude Code"#"Claude 5"#"claude-md"

Discussion

0 comments
Sham

Sham

AI Engineer & Founder, The Tech Archive

AI engineer (Azure AI-102/AI-900). Writes practical, tested, hype-free guides on using AI for real work and small business at The Tech Archive.

Related Articles

View all
Buzz by Block: Is Jack Dorsey's Free AI Agent Workspace Actually Usable in 2026?
Artificial Intelligence

Buzz by Block: Is Jack Dorsey's Free AI Agent Workspace Actually Usable in 2026?

17 min
How to Automate Your Lead Pipeline With an AI Agent in 2026: The 6-Step System
Artificial Intelligence

How to Automate Your Lead Pipeline With an AI Agent in 2026: The 6-Step System

16 min
Google's July 2026 Gemini Updates: 3 New Models, an Always-On Agent, and Smarter Video Explained for Small Business
Artificial Intelligence

Google's July 2026 Gemini Updates: 3 New Models, an Always-On Agent, and Smarter Video Explained for Small Business

14 min
The Fastest AI Model in 2026: Can a Diffusion LLM Actually Beat ChatGPT-5 on Speed (and What Builders Should Do About It)?
Artificial Intelligence

The Fastest AI Model in 2026: Can a Diffusion LLM Actually Beat ChatGPT-5 on Speed (and What Builders Should Do About It)?

12 min
India's $1.5 Trillion Manufacturing Bet by 2035: Can It Actually Happen This Time?
Artificial Intelligence

India's $1.5 Trillion Manufacturing Bet by 2035: Can It Actually Happen This Time?

15 min
Open Weight vs Closed AI Models in 2026: A Builder's Decision Framework After the NVIDIA-Microsoft Coalition Letter
Artificial Intelligence

Open Weight vs Closed AI Models in 2026: A Builder's Decision Framework After the NVIDIA-Microsoft Coalition Letter

14 min