Three mechanisms get called “prompt reuse,” and they solve different problems. Prompt caching reuses computation for an identical prefix (a cost lever at run time). Modular prompts reuse authored components across prompts (a maintenance lever). Skills package a procedure that is loaded into context only when needed (a context lever). Scenario questions usually hinge on picking the mechanism that matches the problem and then configuring it correctly.
Prompt caching: design the stable prefix
Caching matches an exact prefix in a fixed order: tools, then system, then messages. A change at any level invalidates that level and every level after it. You enable it either with a top-level cache_control field (automatic caching, where the breakpoint moves forward as a conversation grows) or with explicit breakpoints on individual content blocks, up to four per request. Anthropic’s placement rule: put cache_control on the last block whose prefix is identical across the requests that should share a cache. A per-request value such as a timestamp before the breakpoint changes the prefix every time: a fresh write on every request and no reads.
The economics, from the current caching page (verify before quoting): a 5-minute cache write costs 1.25x the base input price, a 1-hour write (ttl: 1h) costs 2x, and a cache read costs 0.1x (0.025x on Fable 5.1). Taking the base price as 1 for the cached tokens:
- 5-minute TTL: one write plus one read costs 1.35 against 2.0 uncached, so a single reuse inside the window pays for itself.
- 1-hour TTL: the write costs 2.0, so two requests cost 2.1 against 2.0 and it pays off from the third request (2.2 against 3.0). It earns its premium only when gaps between requests exceed five minutes.
The lifetime is measured from the start of the request that writes or reads the entry, not from the end of its response, and each hit refreshes it. Behaviours that appear in scenarios:
- Minimum length. Cacheable prefixes have a per-model minimum (from 512 up to 4,096 tokens depending on the model; Haiku 4.5 is at the top of that range). A shorter prefix is processed without caching and no error is returned, so confirm hits in
usage. - Concurrency. An entry becomes available only after the first response begins. Fanning out many parallel requests with the same prefix produces many writes; send one, wait for its first response, then send the rest.
- What invalidates. Editing tool definitions invalidates everything; toggling web search or citations, changing
tool_choice, adding images, changing thinking or effort settings, and changingoutput_config.formatcan each invalidate part of the cache. Hold top-level effort constant inside a cached conversation. - Verification.
cache_creation_input_tokensandcache_read_input_tokensreport writes and reads;input_tokenscounts only tokens after the last breakpoint.
Caching reduces the cost of re-reading a repeated prefix. It does not change how output tokens are generated, and cached tokens still count toward the context window (see 6.4). With compaction, put cache_control on the system prompt so only the new summary is a fresh write.
Common exam distractor
Answers that place the breakpoint after the unique user message, cache a prefix that contains per-request data, claim caching speeds up output generation or shrinks the context window, or expect N parallel first-time requests to yield N-1 hits are all wrong. The winning design puts stable content first, the breakpoint on the last stable block, variable content after it, and a warm-up request before any burst.
Modular prompts: components with owners and an assembly order
Split a large prompt into components that change at different rates: role and policy (rarely), tool definitions, domain reference, few-shot examples, task instructions, and per-request variables. Assemble them in stable-to-volatile order, which serves clarity and caching at once (see 6.2). Give each component an owner, a version and its own eval, and record which component versions each deployed prompt uses. Two trade-offs to name: a shared policy component removes drift but widens the blast radius, so every change is re-evaluated against all consumers; and per-tenant variants (or a feature flag that toggles a tool) multiply cache prefixes, because each variant is a different cache.
Skills: packaged instructions loaded on demand
An Agent Skill is a directory with a SKILL.md plus optional reference files and scripts. Anthropic’s docs describe three loading levels (progressive disclosure): level 1 is the name and description only, always in context at roughly 100 tokens per skill; level 2 is the SKILL.md body, read when the skill triggers (under 5k tokens); level 3 is bundled files, read only when needed, while scripts run and only their output enters context. Consequences: many skills can be installed cheaply, bundled reference material costs nothing until used, and the description is the routing signal. Authoring rules to know: name up to 64 characters of lowercase letters, numbers and hyphens (not containing the reserved words “anthropic” or “claude”); description non-empty, up to 1,024 characters, stating what the skill does and when to use it, written in the third person; keep the body under about 500 lines, split detail into files linked one level deep, and test across the models you will use.
Choosing the mechanism: facts and rules that are true for every request belong in the system prompt (and can be cached); a multi-step procedure used occasionally belongs in a Skill; a deterministic operation belongs in a script inside the Skill. In Claude Code, descriptions stay in context while the body loads on invocation and then persists; allowed-tools pre-approves tools rather than restricting them (disallowed-tools removes them). The API docs state that custom Skills do not sync across surfaces (claude.ai skills are per user, API skills are workspace-wide, Claude Code skills are filesystem or plugin based), so keep source in Git as the single source of truth; Claude Code also documents a separate path for loading skills enabled in a signed-in claude.ai account, so check the current behaviour for your surface. Using Skills through the API requires the code execution tool.
Key concept: reuse is also a governance problem
A shared prompt component or Skill changes the behaviour of every consumer at once. Treat it like a dependency: version it, review it, evaluate it before promotion, pin the version in production, and keep a rollback. Anthropic’s Skills guidance says exactly this, and the same discipline applies to shared system-prompt components.
Versioning and governance
In the Skills API you reference skills in container.skills with a type, skill_id and optional version (up to 20 skills per request). If you omit version you get the latest, so a new version uploaded by anyone in the workspace immediately changes what production runs; pin specific versions in production and use latest only in development. Custom skills are workspace-scoped: any API key in the workspace can read, invoke and delete them, so multi-tenant platforms should use a separate workspace per tenant. Anthropic’s enterprise guidance adds a security review before deployment (scripts, network calls, hardcoded credentials, MCP references), evaluation suites with a few representative queries that cover should-trigger, should-not-trigger and ambiguous cases, testing across the model tiers you use, separation of duties between author and reviewer, a registry of owner, version, dependencies and evaluation status, and limiting how many skills load at once because selection accuracy can degrade as descriptions accumulate. Note also that Agent Skills are not covered by zero-data-retention arrangements, which matters in regulated designs (see 4.4).