Loading documentation on demand instead of up front
Pasting whole docs into context works once and costs every turn after. How to let Claude open the right document only when a task needs it.
The quickest way to give Claude your docs is to paste them. It is also the most expensive, because they then ride along in context whether the task needs them or not.
Give it a map, not the territory
## Docs
- docs/ARCHITECTURE.md: hosting, payments, the one API route. Read before touching deploys.
- docs/SEO.md: head tags, sitemap, robots. Read before adding a route.
- docs/UI.md: tokens and components. Read before any styling change.Each line says what is in the file and when it matters. Claude opens the one it needs, when it needs it. This is the same idea as a skill's references/ folder, described in the references folder.
Keep the docs findable
- One topic per file, with a heading that says what it covers.
- Stable paths: moving a doc silently breaks the map.
- A short summary at the top of each, so a skim is enough to decide.
If the map itself grows long, it has probably become a CLAUDE.md problem: see when CLAUDE.md gets too long.
Questions
Should I paste documentation into my prompt?
For a one-off question, fine. For work you do repeatedly, point Claude at where the docs live instead, so they are read only when relevant.
How does Claude know which document to open?
Tell it: a short map in CLAUDE.md or a skill saying which file covers what, and when to read it.
Does this make answers worse?
Not when the map is good. Claude reads the relevant file in full at the moment it needs it, rather than carrying every file through every turn.