Token Efficiency Encyclopedia

Progressive Disclosure

An agent capability — a skill, a playbook, a per-harness tool reference — is usually written as a body of documentation far larger than any single task needs. Progressive disclosure structures that documentation into levels, so that only a one-line pointer is preloaded and the deeper levels enter the context window only when the agent actually decides to use the capability.

The canonical implementation is Anthropic Agent Skills: a skill is a directory whose SKILL.md carries YAML frontmatter with a name and a description. Only that name and description are injected into the system prompt for every skill installed. When the model judges the skill relevant, the harness reads the body of SKILL.md into context. Files referenced from that body — references/*.md, scripts/, templates, schemas — are loaded only if the skill's instructions send the agent there. Three levels, each one paid for only when reached.

Principle

Preload a discovery-sized pointer; load the full instructions on selection; load the long tail only on demand. The cost of having a capability available becomes independent of the size of its documentation, so a library of capabilities can grow without a per-turn tax.

Techniques

Name + Description Index

Only the metadata of each capability sits in the always-present context: enough for the model to decide whether this is the right thing, never enough to perform it. Descriptions must therefore be written for triggering — naming the concrete situations that should select the skill — rather than for summarizing.

Body on Selection

The instruction body loads when the capability is invoked. This is where the procedure lives. Keeping it out of the preloaded level is what lets an agent carry hundreds of skills at a fixed cost.

Reference Files on Demand

Long reference material — API tables, edge-case catalogs, format specs — lives in separate files that the body links to, with a one-line hint about when the agent should open each. The agent reads them only along the branch it is actually walking.

Audience-Sharded References

Where documentation varies by environment, split it per environment rather than writing one document covering all cases with conditionals. A tool reference sharded into one file per harness means an agent loads only its own harness's file; a single combined file would charge every agent for every harness.

Executable Instead of Explained

A scripts/ directory holds code the agent runs rather than prose the agent reads. The token cost is the invocation line, not the algorithm, which also makes the step deterministic. See Generator Invocation.

Trade-offs

Level Preloaded cost Loaded when Risk
Name + description Per capability, every turn Always Bad descriptions → wrong or missed triggering
Instruction body None On selection One extra read before work starts
References / scripts None On demand inside the body Agent may skip a file it needed

The failure mode is not cost but recall: a level that never loads is documentation the agent behaves as if it does not have. Each pointer must state the condition under which to follow it.

Anti-patterns

See Also

Tools