Load it when it's needed
D3 · IntegrationGuide lines 3.8, 2.4
There are two ways to give Claude what it might need. Monolithic context puts everything into every request: simple, no lookup step, and cheap with prompt caching when the content is small and stable. Progressive discovery keeps only a short index in context and loads the detail when the task calls for it.
Monolithic context breaks down as content grows. Every token costs money and time, and dozens of procedures or tools in view at once dilute attention: the model mixes up similar steps or picks a similar but wrong tool. A bigger context window raises the limit but fixes none of that.
The tools for loading on demand differ by what is being loaded. Skills keep only a name and description in context and load the full instructions when a task matches, which suits procedures that must be followed whole. Tool search finds the relevant tools among many. Retrieval or reading a resource on demand suits huge reference data where each question needs a few facts.
Change one fact
An airline's service agent carries 25 long procedures (lost baggage, refunds, pet travel and so on), about 70,000 tokens in all, in every request. Each conversation uses one or two of them, and each procedure must be followed step by step. Replies are slow and costly, and the agent sometimes mixes steps from two procedures. What should the architect change?
Words in the stem that signal this trap
- “each task uses only a few of them”
- “picks a similar but wrong tool” or “mixes up steps”
- “small, stable and needed on every request”
- “a very large reference consulted occasionally”
- “a model with a larger context window”
- “must be followed step by step”
Practice
A telecom's field-service agent used to load 30 repair procedures in every request; they are now 30 Skills. Since the change, it often answers without loading the matching Skill. Each Skill's description reads only “Procedure” and a number, such as “Procedure 14”. What should the architect change?
- Go back to loading all 30 procedures in every request, with prompt caching.
- Add a system-prompt rule telling the agent to check every Skill before replying.
- Merge the 30 Skills into one large Skill that always loads in full.
- Rewrite each Skill's description to say what it covers and when to use it.
Show answer
Answer: D. The deciding fact: the agent decides which Skill to load from its description, and “Procedure 14” says nothing. Clear descriptions make on-demand loading work.
- A ❌ Works for small content needed every time; 30 procedures bring back the cost and the mixing.
- B ❌ Works sometimes, but it cannot match tasks to Skills whose descriptions say nothing.
- C ❌ Works only as monolithic context under another name, with the same cost and confusion.
- D ✅ Rewrite each Skill's description to say what it covers and when to use it.
A bank's phone voice assistant must start speaking within one second. It uses a 5,000-token set of card and account rules that changes monthly, and about half of all calls need some part of it. A colleague proposes moving the rules into Skills that load on demand. What should the architect recommend?
- Move the rules into Skills so that calls not needing them stay lean.
- Index the rules for retrieval and fetch the matching section on each call.
- Keep the rules in the prompt as a stable prefix, with prompt caching on.
- Expose the rules as an MCP resource that the assistant reads when needed.
Show answer
Answer: C. The deciding fact: a one-second start for a small, stable set of rules. Any on-demand load adds a step before speaking, while a cached prefix is cheap and instant.
- A ❌ Works for long content used now and then, but loading a Skill adds a step the voice budget cannot afford.
- B ❌ Works for large reference data; for 5,000 tokens the search step costs more time than it saves.
- C ✅ Keep the rules in the prompt as a stable prefix, with prompt caching on.
- D ❌ Works for large data read occasionally; here the extra read delays half of all calls.
An accounting firm's assistant must follow twelve long filing procedures exactly, step by step. Today the procedures are split into chunks, and the five most similar chunks are retrieved for each request. Reviewers find it often skips steps that sit in chunks it did not retrieve. What should the architect change?
- Package each procedure as a Skill that loads in full when the task needs it.
- Retrieve the ten most similar chunks instead of five for each request.
- Use larger chunks so that each one holds more of a procedure's steps.
- Load all twelve procedures into every request and cache them as a prefix.
Show answer
Answer: A. The deciding fact: the procedures must be followed whole, and chunk retrieval returns fragments. A Skill loads the entire procedure only when it is needed.
- A ✅ Package each procedure as a Skill that loads in full when the task needs it.
- B ❌ Works to raise recall, but chunks can still miss steps and more unrelated text arrives.
- C ❌ Works partly, but chunk boundaries still split procedures somewhere.
- D ❌ Works for small content needed every time; twelve long procedures bring back cost and confusion.