Chapter 5 · Progressive Disclosure¶
Progressive disclosure is the loading model from chapter 1 — and it's also a writing strategy: the skill author decides what lives at each level. Done well, your skill is simultaneously cheap when idle and complete when active.
The three budgets¶
| Level | What lives here | Budget | Loaded |
|---|---|---|---|
| 1 · Metadata | name + description |
~100 tokens | Always, for every skill |
| 2 · Body | The SKILL.md content below the frontmatter | < 5,000 tokens / 500 lines recommended | When the skill activates |
| 3 · Resources | references/, scripts/, assets/ |
Unbounded in principle | On demand, during execution |
The discipline: level 1 earns the activation, level 2 runs the task, level 3 carries the weight. Every time you're tempted to grow level 2, ask whether the content is needed for most activations, or only for some. If only some, it belongs at level 3.
When to split content out¶
Move content into references/ when any of these is true:
- It's longer than ~100 lines and needed by only part of the workflow.
- It's platform- or provider-specific. An AWS deploy skill has AWS, GCP, and Azure branches — most runs need exactly one:
cloud-deploy/
├── SKILL.md # shared workflow + routing
└── references/
├── aws.md # read only when target is AWS
├── gcp.md # read only when target is GCP
└── azure.md # read only when target is Azure
The SKILL.md routes: "If the target cloud is AWS, read
references/aws.md before writing any commands."
- It's a big catalog of examples. Five worked examples fit in the body;
forty belong in a reference file the agent consults when it hits an
unfamiliar case.
- It's deep domain documentation — a spec, an API reference, a glossary —
that only some activations need.
The one-level-deep rule¶
Link directly from SKILL.md to each reference file, and stop there. Reference files should not link to further reference files: agents that follow a chain of three links often read partially and act on half the information. If a reference file is getting too big, split it sideways into sibling files the SKILL.md links individually — with a stated condition for reading each.
Name and route references by when, not by topic¶
The SKILL.md must tell the agent when to open each file. A reference the agent can't decide about is a reference it will either always load (wasted context) or never load (dead weight):
## Reference files
- [references/conventional-commits.md](references/conventional-commits.md) —
read before drafting if you're unsure which type or footer a change needs.
- [references/examples.md](references/examples.md) — read when the diff is
unusual (refactors spanning many files, reverts, release commits) and no
example below matches.
Upgrading commit-crafter¶
In the quickstart we linked two reference files from
commit-crafter. Here's what moved and why.
In the body we kept only what every commit needs: the workflow, the
boundaries, and the subject-line rules. references/conventional-commits.md
carries the full type catalog, scope conventions, footer rules, and breaking
change semantics — needed to draft, but pure lookup. It starts:
# Conventional Commits reference
Format: `type[(scope)][!]: subject`
## Types
| Type | Use for | Version effect |
|---|---|---|
| feat | New user-facing capability | minor |
| fix | Bug fix | patch |
| perf | Performance improvement with no behavior change | patch |
| refactor | Code change that neither fixes nor adds behavior | none |
| docs | Documentation only | none |
| test | Tests only | none |
| build | Build system, dependencies | none |
| ci | CI configuration | none |
| chore | Maintenance that isn't any of the above | none |
| revert | Reverts a previous commit | matches reverted commit |
## Footers
- `BREAKING CHANGE: <explanation>` — required whenever `!` is present...
(continued)
references/examples.md carries staged-diff → message pairs, ordered
from common to exotic. The agent reads it only when the diff is unusual.
The result: the body stays ~60 lines, while the skill's total knowledge grew by 200 lines. That's progressive disclosure paying off — more capability, same activation cost.
Anti-patterns¶
The wall of text
A 900-line SKILL.md that "has everything" costs more context than the task itself and gets skimmed. Split it.
The nesting doll
SKILL.md → references/a.md → references/a-details.md → … Agents partially read chains. Keep it one level deep.
The unrouter reference
A reference linked with no when to read condition either always loads (you've hidden the problem, not solved it) or never loads.
Premature splitting
A skill with six reference files, each 30 lines, is worse than one 180-line body — now every activation may need six reads. Split when content is large and conditional, not for tidiness.
Chapter 6 · Deterministic Scripts — the most underused capability in the skill format.