llms.txt generator
llms.txt is a Markdown file at the site root (https://example.com/llms.txt) that gives language
models a short, curated summary of a site and links to its most useful pages. Format
(llmstxt.org):
# Site or brand name
> One-paragraph summary: who you are, what you offer, for whom.
Optional extra context in plain paragraphs (no headings).
## Section name
- [Page title](https://example.com/page): one-line description of what the page answers
## Optional
- [Less important page](https://example.com/other)
Be straight with the user about what it does: it's an emerging convention. Some AI tools and agents read it; Google has said it doesn't use it for Search. It's cheap to add and harmless, but it's not a ranking factor and doesn't replace crawlable pages, good titles or structured data.
Step 1: Draft from the sitemap
Run the bundled script (standard-library Python 3.9+) by its full path: in Claude Code,
${CLAUDE_SKILL_DIR} is this skill's folder; elsewhere, use the folder this SKILL.md was loaded from.
python "${CLAUDE_SKILL_DIR}/scripts/llms_txt.py" https://example.com --json # draft + stats
python "${CLAUDE_SKILL_DIR}/scripts/llms_txt.py" https://example.com --out llms.txt # write the draft
python "${CLAUDE_SKILL_DIR}/scripts/llms_txt.py" https://example.com --max-pages 60 --json # big sites
It finds the sitemap (robots.txt Sitemap: lines, then /sitemap.xml, /sitemap_index.xml,
/wp-sitemap.xml, else homepage links), reads titles and meta descriptions of the shallowest
pages, and groups pages by their first path segment. Unread pages go under ## Optional.
If the script can't run, build the draft by hand from the sitemap and the key pages.
Step 2: Edit the draft (this is where the value is)
The script's output is raw material. A good llms.txt is curated, so before handing it over:
- Rewrite the summary line so it says plainly who the business is, what it offers, where and for whom. One or two sentences, no slogans. This line is what a model is most likely to repeat.
- Keep the pages that answer real questions: services or products, pricing, about, contact, key guides, case studies, docs. Drop thin, duplicate, legal-boilerplate, tag and paginated pages.
- Fix titles and descriptions: remove brand suffixes and marketing fluff, and make each description say what the page answers ("Prices for Shopify stores in Dubai, AED ranges").
- Order sections by importance, most useful first, and give them human names ("Services", "Guides"), not URL slugs.
- Keep it short: usually 10–40 links. Put long-tail pages under
## Optionalor leave them out. - Check every URL is a canonical, indexable, 200 page on the same domain.
If the user wants llms-full.txt too, it holds the full text of the key pages in Markdown. Only
suggest it for documentation-style sites, because it's long and needs upkeep.
Step 3: Deliver
Give the final file in a code block (or write it to llms.txt if you have file access), then the
install step: upload it to the web root so it loads at https://their-domain/llms.txt as
text/plain or text/markdown. On WordPress that means the site root via FTP/file manager or an
SEO plugin that supports it; on Shopify, upload it under Content → Files and add a URL redirect from /llms.txt to it. Suggest
adding a reminder to update it when key pages change.