● ● ○ ○ ○ ○ ○ ○ ○   Lesson 2 of 9

Build a docs Skill · A brown-bag

Borrow the publisher's index

"Search the docs" sounds like we must scrape and index 765 pages ourselves. What if someone already did?

Why · the problem

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:

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?

What · the solution approach

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:

  1. A ready-made manifest (for search). One file, goteleport.com/docs/llms.txt, with 765 lines — one per page — each like - [Title](url.md): one-line description, grouped under ## Section headings.
  2. A clean markdown twin of every page (for fetch). Add .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 valid llms.txt … 765 - [Title](url.md): description lines … Every page has a clean markdown twin … purpose-built LLM endpoints, no HTML scraping needed." — CORPUS.md, Act A
The design call We do not build an index. We borrow the publisher's. As the corpus puts it: "Highest ROI given Teleport already did the indexing work." Updating the skill becomes "re-fetch llms.txt" — not "re-crawl the site."
How · the mechanics

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:

question ─▶ search ─▶ read llms.txt manifest (765 one-line entries) │ ▼ picks the best page fetch ─▶ GET that page's .md twin (clean markdown, token-counted) │ ▼ not enough? related ─▶ list sibling pages (same ## section)
The loop grows a third, optional move: 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:

Progressive disclosure Reveal information in layers, smallest first. The agent reads cheap one-line entries to choose a page, then spends tokens on the full page only for the one it picked — instead of dumping all 765 pages into its context. It keeps the agent fast and its context small. We'll meet this idea again — applied to the skill file itself.

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):

1. What does an 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.

2. How do you "fetch" a page's clean text, and why is it nice?

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.

3. What is progressive disclosure, in the search → fetch loop?

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.