lib-docs
lib-docs
llms.txt is author-published — no curation lag, no enrichment layer that can hallucinate — so prefer it over context7.
-
Probe:
bash scripts/llms-probe.sh <docs-domain>— outputs TSVkind \t url \t size(index= llms.txt page list,full= llms-full.txt whole corpus). Paths vary per site; probe instead of hardcoding URLs. -
Fetch:
full≤ ~500 KB → WebFetch it directly. Larger or size?→ WebFetch the index, then fetch only the matching page links, in parallel. Cloudflare's llms-full.txt is ~46 MB — a blind full fetch blows the context window. -
Probe failed → context7 via the
ctx7CLI (one-timebunx ctx7@latest login):bunx ctx7@latest library <name> [query] # resolve library ID first — IDs aren't guessable bunx ctx7@latest docs <libraryId> "<query>" # specific queries rank far better than broad onesRetry with
--researchonly when the default answer is shallow — it spawns sandboxed agents and costs more.
Most Mintlify/GitBook-hosted docs publish llms.txt; Tailwind and most pre-1.0 or community libraries don't — those go straight to context7.