extract-llms-txt
Installation
SKILL.md
Extract an llms.txt index
Produce a concise, link-based index of a documentation site in the llms.txt format, so a future agent can scan it in one read and pull only the pages a task needs — instead of crawling the site cold every time.
Resolve scope before fetching anything
Pin down three things:
- The docs root — a URL the user gave, or the official docs site for the named library/framework/SDK.
- The boundary — the whole site, or one section of it (e.g. "just the Agent SDK pages," not the entire product's docs). A narrower boundary produces a tighter, more useful index; when the user names a subsection, hold to it even if a wider official index exists.
- The output path — where the project keeps these indexes. Check for an existing convention first: a
docs/llms/directory, a reference doc pointing at prior indexes, or a mention in the project's standing agent-instructions file. Match that convention (directory, filename style) rather than inventing a new one; if none exists,docs/llms/<slug>.txtis a reasonable default.
Call this combination of docs root + boundary the resolved boundary for the rest of this skill — every later step (searching, crawling, writing) operates against it.
If the docs root can't be fetched at all — blocked, JS-only render, auth-gated — stop and tell the user rather than fabricating an index from memory.
Search for an official index first
Before crawling by hand, check whether the site already publishes one: