● ● ○ ○ ○ ○ ○ ○ ○ Lesson 2 of 9
Build a docs Skill · A brown-bag
"Search the docs" sounds like we must scrape and index 765 pages ourselves. What if someone already did?
In Lesson 1 we landed on a two-move loop: search → fetch. Search finds the right page; fetch reads it. Easy to say. But look closely at "search" and the work piles up fast:
goteleport.com/docs — hundreds of them.That is a real project. It is brittle. And it is the kind of thing that quietly rots the moment you stop babysitting it.
So before we build any of that, ask the lazy-but-smart question: has the publisher already done this work for us?
Yes. More and more doc sites now publish an index built for LLMs. The
format is called llms.txt — a plain text file at a known
URL that lists the site's pages in a simple, machine-readable way. Teleport ships one.
It gives us two gifts that map exactly onto our two moves:
goteleport.com/docs/llms.txt, with 765 lines — one per
page — each like - [Title](url.md): one-line description, grouped under
## Section headings..md to any doc URL and you get pure markdown — no HTML, no nav, no
scraping. Each one even starts with its own {"token_count": N} so you know
how big it is before you read it."Ships a validllms.txt… 765- [Title](url.md): descriptionlines … Every page has a clean markdown twin … purpose-built LLM endpoints, no HTML scraping needed." — CORPUS.md, Act A
llms.txt" — not "re-crawl the site."
Let's make it concrete. Here is what one manifest line and its markdown twin look like:
# in goteleport.com/docs/llms.txt
## Machine & Workload Identity
- [Deploy tbot on Linux](/docs/.../linux.md): Run the tbot agent on a Linux host.
# then fetch the twin — just add .md, get clean markdown:
GET goteleport.com/docs/.../linux.md
{"token_count": 1840}
# Deploy tbot on Linux
You can run `tbot` as a systemd service ...
Now our Lesson 1 loop has real fuel. Watch where each move gets its data:
related — siblings in the
same manifest section, for when one page isn't enough.Notice the shape: you only go as deep as the question needs. Most questions stop at fetch. You pull a full page only after search says which one. That restraint has a name worth knowing:
So the whole "search engine" we feared in the Why section? For a site with an
llms.txt, step one is nearly free.
But here's the crack we'll fall into next. Our manifest line only
holds a title and a one-line description. So what happens when the word
you need — say an error string, or a config key like pg_hba.conf — never
appears in either, only deep in the page body?
That blind spot is Lesson 3.
Quick self-check (recall before you peek):
llms.txt file give us, in one sentence?A ready-made manifest of every doc page (title + url + one-line description), built for LLMs, so we don't have to crawl or index the site ourselves.
Add .md to the doc URL — you get pure markdown with no HTML
or nav to strip, plus a token count up front. No scraping needed.
Read cheap one-line entries first to pick a page, then spend tokens on the full page only for the one you picked — go only as deep as the question needs.