shiichan

Cut your system prompt by 80% and lose no performance! The new context engineering rules for Claude 5 models

Hi, I'm Shii-chan! Today I found a behind-the-scenes post about Claude Code, and I got a little too excited about it — the whole approach to "context engineering" for engineers just changed!

Claude Blog claude.com

What was announced?

This one comes from the Claude Blog, written by Anthropic engineer Thariq Shihipar. The topic is rethinking how you build context — system prompts, CLAUDE.md files, skills — for Claude 5 generation models like Claude Opus 5 and Claude Fable 5. Anthropic actually cut over 80% of Claude Code's system prompt, and saw no measurable drop in coding eval performance!

The story so far

Until now, Claude models needed a lot of strict rules packed into their context to avoid worst-case outcomes, like accidentally deleting a file. That often meant contradictory instructions were sitting side by side, like "keep documentation intact" next to "don't add comments." Tool usage was also taught mostly through long lists of concrete examples.

What changes

The newer Claude 5 generation models have better judgment and can infer user intent from surrounding context, so a lot of the contradictory rules and overly strict constraints can simply be removed. If you're building a custom agent or your own Claude Code setup, this means you can audit your system prompt, CLAUDE.md, and skills and trim them down with confidence. Anthropic also built a claude doctor command that automatically checks and helps optimize the size of your skills and CLAUDE.md files.

Dive Deep

The post walks through several concrete shifts in how context gets built:

  • Rules to judgment: instead of spelling out rules like "keep comment density minimal, avoid multi-line docstrings," the guidance becomes judgment-based, like "match the surrounding code's comment density, naming, and style"
  • Examples to tool design: instead of teaching tool usage through examples, the tools themselves are redesigned to hint at correct usage, like defining a Todo tool's status field as an enum of pending, in_progress, and completed
  • Progressive disclosure: instead of stuffing every detail about code verification and review into the system prompt, that information moves into skills that get pulled in only when needed. Some tools also use lazy loading, where the agent uses ToolSearch to look up the full definition only when it's needed
  • Removing duplication: instead of describing tool usage in both the tool description and the system prompt, the guidance now lives only in the tool description
  • Automated memory: instead of manually appending notes to CLAUDE.md, the system now automatically saves memories relevant to the work
  • More sophisticated specs: instead of a simple markdown spec file, references now include HTML artifacts, code references, test suites, and rubrics for evaluation

The recommended context architecture has four layers: the system prompt, which conveys product-level context; CLAUDE.md, which briefly covers the repo's purpose and pitfalls; skills, which act as lightweight guides pulled in as needed; and references, files loaded via @-mentions like specs or mockups. For references, code-shaped files and HTML mockups tend to give better, higher-fidelity results than prose descriptions or screenshots.

Wrap-up

  • Cutting Claude Code's system prompt by over 80% caused no measurable drop in coding eval performance
  • Claude 5 generation models have better judgment, so contradictory rules and excessive constraints can be removed
  • Key shifts: rule lists to judgment-based guidance, examples to tool design, and everything-upfront to progressive disclosure
  • The claude doctor command automatically checks and helps optimize skills and CLAUDE.md sizing
  • This one's especially useful if your own CLAUDE.md or custom agent prompts have grown bloated and unwieldy!