The short answer: context engineering is Anthropic's name for the discipline that replaced prompt engineering — curating the smallest set of high-signal tokens the model needs in its window on every turn, rather than just wording a prompt well. And Anthropic has turned that advice into four features you can actually switch on in Claude: Agent Skills (load expertise only when needed), context editing (clear stale tool results), compaction (summarize old conversation), and the memory tool (persist notes across sessions). This piece is the map of what each one does and when to reach for it.

If you've read our context engineering vs prompt engineering primer, this is the Anthropic-specific cut: their exact framing, and the concrete Claude primitives that implement it.

What Anthropic actually means by "context engineering"#

Anthropic frames context engineering as the natural evolution of prompt engineering. The distinction, from their engineering post Effective context engineering for AI agents:

The reframing for a builder is the question you ask. It moves from "how should I word this query?" to "what is the minimal set of high-signal information the model needs in its window right now?" That shift matters because agents don't run once — they run in loops that generate an ever-growing pile of tool outputs and intermediate reasoning. Curation has to happen continuously.

Anthropic's most quotable statement of the discipline, from its Cookbook, is worth pinning above your desk: "context is finite with diminishing marginal returns, and the core discipline is finding the smallest set of high-signal tokens that maximize the likelihood of your desired outcome."

The attention budget

The mental model underneath it is the attention budget. A model has a limited budget of attention it spends across every token in the window; each additional token depletes it, and performance degrades non-linearly as the window fills. That's why the goal is minimal high-signal tokens, not maximal context.

One attribution note, because it matters when an AI assistant quotes this: "attention budget" is Anthropic's term. The related, widely-cited phrase "context rot" — the measurable accuracy drop as inputs grow — comes from Chroma's research, not Anthropic. They point at the same phenomenon from two directions, but don't credit Anthropic with the "context rot" coinage.

The authoring rules Anthropic gives

Before any feature, Anthropic's post gives three plain rules for what you put in the window:

  1. Write system prompts at the "right altitude." Avoid both failure modes: brittle hardcoded if-else logic (too rigid) and vague high-level guidance (too abstract). Aim for clear, specific-but-flexible direction.
  2. Keep tools minimal, self-contained, and token-efficient. A bloated or overlapping tool set confuses the model and burns the budget. A tool's output should be information-dense — return the five fields that matter, not the 500-line API blob.
  3. Use a few canonical, curated examples, not an exhaustive laundry list of edge cases.

That third point is why our context engineering playbook — write, select, compress, isolate — maps so cleanly onto Anthropic's guidance: same discipline, different vocabulary.

The feature that is context engineering: Agent Skills#

If context engineering has a flagship feature, it's Agent Skills. Anthropic's docs define a Skill as "reusable, filesystem-based resources that give Claude domain-specific expertise: workflows, context, and best practices that turn a general-purpose agent into a specialist." Concretely, a Skill is a folder containing a SKILL.md file — YAML frontmatter plus Markdown instructions — and optional bundled scripts, reference docs, and templates. Claude uses a Skill automatically when a request matches its description; you don't invoke it by hand.

What makes Skills a context-engineering primitive rather than just a prompt library is progressive disclosure — Skills load in three levels, and Anthropic publishes the token cost of each:

LevelWhen it loadsCostWhat it holds
1. Metadataname + descriptionAlways, at startup~100 tokens per SkillUsed to decide whether to trigger the Skill
2. Instructions — the SKILL.md bodyOnly when the Skill is triggeredunder ~5k tokensThe workflow, steps, examples
3. Resources — bundled files/scriptsOnly when referenced during execution~0 until usedReference docs load when read; scripts run in bash and only their output enters context — the code never does

Anthropic's key line is the whole pitch: "until a Skill is triggered, only its name and description occupy context," which means "you can install many Skills without context penalty." That's the attention budget, enforced by architecture. Dormant expertise costs ~100 tokens; it only spends the budget when it's actually relevant.

Two practical consequences:

Agent Skills were announced Oct 16, 2025; the open Agent Skills standard followed on Dec 18, 2025.

The three primitives for long-horizon tasks#

Skills manage what expertise loads. The next problem is what happens when a task runs long enough to overflow the window anyway. Anthropic ships three API primitives for that, and the trick is knowing which pressure each one relieves.

Context editing — clear stale tool results

clear_tool_uses_20250919 (behind the context-management-2025-06-27 beta header) automatically clears tool results once the conversation grows past a threshold. Oldest results clear first and are replaced with a placeholder, while the tool_use record is kept so Claude still knows it made the call. It's configurable — trigger defaults to 100k input tokens, keep defaults to the 3 most recent tool uses — and it's lossless for anything re-fetchable, at no inference cost. Reach for it first when your agent makes many tool calls whose raw outputs are bulky but reproducible.

Compaction — summarize old conversation

compact_20260112 (beta header compact-2026-01-12, a genuinely 2026 addition) summarizes older context as you approach the window limit — default trigger 150k input tokens — and on later requests drops everything before the summary and continues from it. Custom instructions let you dictate what to preserve. Anthropic calls this "the recommended strategy for managing context in long-running conversations and agentic workflows." Use it when the window is filling with accumulated dialogue and reasoning rather than tool output. The art, in Anthropic's words, "lies in the selection of what to keep versus what to discard" — compact too aggressively and you lose the subtle detail that mattered. We walk the setup in Claude's server-side compaction how-to, and weigh it against clearing in context editing vs compaction for long-running agents.

Memory tool — persist across sessions

memory_20250818 (now GA, no beta header) gives Claude a file-based /memories directory it can view, create, edit, and delete. Crucially, it runs client-side: Claude requests the operations, and your application executes them against storage you control — it is not Anthropic-hosted persistence. The API auto-injects a protocol telling Claude to check its memory before starting. This is the "just-in-time" idea made durable: rather than loading everything up front, the agent records what it learns and reads it back on demand, across sessions. Our three-tiers-of-agent-memory guide covers how to wire the storage layer behind it.

Anthropic reports these compose well in its own research agent: compaction cut peak context from 335K to 169K tokens; clearing bounded the peak at 173K; and memory cut a second session's peak from 334K to 173K. We examine what those numbers do and don't prove in the 84% and the 39%.

Sub-agents: context isolation as a strategy#

The last technique isn't a header — it's an architecture. In Anthropic's production multi-agent research system, a lead agent spawns sub-agents that each get a self-contained task, an output format, and a fresh, isolated context window. The heavy, noisy search context stays inside the sub-agent; only the distilled result returns to the lead, protecting the lead's attention budget. Anthropic found the isolation most valuable when a subtask generates a lot of context (say, a filter-heavy lookup) but most of it is irrelevant to the main thread — and its Opus-lead, Sonnet-sub-agent configuration beat a single-agent baseline by more than 90%, with performance closely tied to spreading tokens across independent windows.

The rule of thumb: when a single step produces lots of throwaway context — a big web search, a large file scan — push it into a sub-agent and return only the answer.

The one-paragraph version#

Context engineering is Anthropic's discipline of spending a finite attention budget wisely: keep the window to the smallest set of high-signal tokens. Skills let you install expertise that stays dormant at ~100 tokens until it's needed. Context editing sweeps out stale tool results; compaction summarizes old conversation; the memory tool persists notes across sessions; and sub-agents quarantine noisy context in a fresh window. You don't need all of it on day one — start by trimming your tools and system prompt, then add each primitive as the specific kind of window pressure it solves actually shows up.