llms.txt Generator
Generate or refresh a site's llms.txt (and, on request, llms-full.txt) from its sitemap, route tree, docs navigation, or content directory, following the llmstxt.org conventions: an H1 with the site name, a blockquote summary, H2 sections of links each with a one-line description taken from the page's own metadata, and an Optional section for secondary pages. Use when a site or docs repository needs the file created, or an existing one checked against the pages that actually exist today.
Give this skill a site or docs repository and it builds llms.txt from the sitemap, route tree, docs navigation, or content folder: an H1, a blockquote summary, H2 sections of links with one-line descriptions copied from each page's own metadata, and an Optional section. It verifies every link and refreshes the lists on later runs.
Install to ~/.claude/skills/llms-txt-generator/SKILL.md
npx agentscamp add skills/llms-txt-generatorllms.txt is a proposed convention, published at llmstxt.org, for a Markdown file at a site's root that tells a language model what the site is and which pages matter. Writing one by hand goes stale the week after. This skill builds the file from what the site already declares (its sitemap, its route tree, or its docs navigation and content directory), takes every description from the page itself, and writes the result to public/llms.txt or wherever the project serves static files. Run it again later and it refreshes the lists instead of starting over.
When to use this skill
- A docs site or content site has no llms.txt and you want one that matches the real page set.
- The file exists but links to pages that moved, or new sections were never added.
- You are asked for llms-full.txt, the single-file variant that inlines page content rather than linking to it.
- A seo-technical-auditor pass is done and the next step is readability for models.
When NOT to use this skill
- Controlling which AI crawlers may fetch the site: that is
robots.txtand its user-agent rules. llms.txt is a reading guide, not access control. - Deciding whether a page's prose is quotable: the geo-content-auditor skill.
- Writing page descriptions from nothing. The skill copies each page's own description or first sentence and reports pages that have neither; write those first.
Instructions
-
Find the inventory. In order of preference: a docs navigation config (
mkdocs.ymlnav, Docusaurussidebars.*, Starlightsidebarinastro.config.*, VitePressthemeConfig.sidebar), because it already encodes the grouping a human chose; thensitemap.xml, static or generated; then the route tree (app/**/page.*in Next.js,src/pagesin Astro) or a content directory with frontmatter. Note the canonical production origin so every link can be absolute. -
Write the header.
# <site name>on the first line, then one blockquote (>) of one or two sentences taken from the README or home page, then, if useful, a short paragraph or two of plain prose: what the product is, a versioning note, where to start. No headings inside that prose; llmstxt.org reserves H2 for link sections. -
Build the sections. Each
##section is a flat list of- [Title](https://absolute-url): one-line description. Group by what a reader needs (Getting started, Guides, Reference, Examples); for a content site, group by content type. The description comes from frontmatterdescription, the meta description, or the first sentence of the page. Pages with none go into a "needs description" list in your report, not into the file. -
Add
## Optional. Per the convention, links here can be skipped when a reader's context is short: changelogs, older versions, legal pages, long reference tables. -
Prefer Markdown targets. If the site serves a Markdown rendition of each page (a
.mdtwin, a?format=mdquery, or a dedicated route), link to that; a model reads it better than rendered HTML. -
Emit llms-full.txt only when asked. Concatenate the Markdown body of each page in section order, each preceded by its H1 and a
Source: <url>line. Include the main sections, never Optional. If the result runs to several megabytes, say so and trim to the first sections. -
Place and serve.
public/llms.txtworks for Next.js, Astro, and most static builders. Use a route handler (app/llms.txt/route.tsin Next.js) when the file must be generated at build time from a content layer. Serve it astext/plain; charset=utf-8ortext/markdown. -
Verify.
curl -s https://example.com/llms.txt | head -20, count the links, and check that each resolves:rg -o 'https?://[^) ]+' public/llms.txt | sort -u | while read -r u; do printf '%s %s\n' "$(curl -s -o /dev/null -w '%{http_code}' "$u")" "$u" done | rg -v '^200' -
Refresh mode. When the file already exists, parse its links, diff them against the inventory, and rebuild only the lists. Keep the hand-written header prose. Report what was added, removed, and moved.
NOTE
llmstxt.org is a proposal. Whether any particular assistant or crawler reads the file is up to that vendor, so treat it as a low-cost courtesy for readers that do, not as a ranking lever. AI content and search in 2026 covers where it fits.
WARNING
List only pages you want quoted, and describe each one truthfully. A description that promises more than the page delivers is a hallucination you wrote yourself, and a model that trusts the file will repeat it.
TIP
Wire the generation into the build so the file cannot drift. The /llms-txt command runs this procedure from inside Claude Code and is the easy thing to call from a prebuild script review.
Output
The llms.txt file (and llms-full.txt if requested) written to the static directory, the diff when refreshing, the list of pages that still need a description, and the link-verification result. If any link returned a non-200 status, the report says which and the file keeps the previous good entry.
Example
Generated file for a fictional command-line tool, "Orbit CLI":
# Orbit CLI
> Orbit is a command-line tool for deploying static sites to object storage. These docs cover installation, configuration, and the deploy pipeline.
## Getting started
- [Install](https://orbit.example/docs/install.md): Install with Homebrew, npm, or a prebuilt binary.
- [First deploy](https://orbit.example/docs/first-deploy.md): Deploy a folder in three commands.
## Reference
- [orbit.toml](https://orbit.example/docs/config.md): Every configuration key with its default and type.
## Optional
- [Changelog](https://orbit.example/changelog.md): Release notes back to the first public version.Filed under
claude · llms-txt · docs · ai-search · developers
Related
- SEO Technical AuditorAudit a website's source or built output (Next.js, Astro, or static HTML) for technical on-page and crawl hygiene: title and meta description length and uniqueness, self-referencing canonicals, one H1 and an unbroken heading hierarchy, presence of JSON-LD, sitemap and robots.txt, redirect chains, internal-link click depth, and image alt text, then return one findings table ordered by severity with the file or route to fix. Use when you want the crawl and markup plumbing checked across a whole site, not the quality of the writing or the correctness of the structured data.
- 9 Best Claude Skills for SEO (and AI Search)Compare Claude skills, commands, and agents for technical SEO audits, structured data, answer-engine readiness, llms.txt, content briefs, landing pages, Core Web Vitals, and brand voice.
- SEO SpecialistUse this agent to review a site or a set of pages for search and answer-engine performance and get one prioritized plan: it checks technical hygiene with the seo-technical-auditor skill, the match between each page's title, H1, and lead and the query it targets, title and meta wording, internal linking, answer-first structure with the geo-content-auditor skill, and structured data with the schema-markup-generator skill, then ranks the fixes by effect and effort. Read-only; it never edits a page or invents a search volume. Examples: "review our docs site for SEO and tell me what to fix first", "why does this guide rank but never get cited by AI Overviews", "audit the ten pages in this folder and give me a plan".
- llms.txtGenerate or refresh llms.txt from the project's routes, sitemap, or docs navigation, write it to the static directory, and verify that every link resolves.
- GEO Content AuditorAudit one published page or draft for answer-engine and LLM-citation readiness: an answer-first lead, question-shaped headings each answered in their first sentence, one fact per sentence, figures with a date and a source beside them, definitions that can be quoted whole, consistent entity names, and a visible FAQ block, then return a pass-or-fix scorecard and an ordered rewrite plan with replacement text. Use when you want to know why a page is not being quoted by AI Overviews or chat assistants and what to change in the prose, not in the markup or the crawl setup.
- Does AI-Written Content Rank in 2026? What Google Actually SaysWhat Google's own documentation says about AI-generated content in 2026: what it rewards, what scaled content abuse is, how AI features cite, and a checklist.
- llms.txtllms.txt is a proposed Markdown file at a site's root that gives AI models a curated summary and link list, so they can find the right pages at inference time.
- Readme GeneratorGenerate or refresh a project README grounded in the actual repository. Use when a project has no README, a stale one, or you want install/usage/scripts/structure sections that match the real code.