Prompt

7 minute read

llms.txt Prompt: Draft the File From Your URL List

A reusable llms.txt prompt that drafts the file from your own URL list, groups pages into sections, writes a note per link and never invents URLs. Includes a real test run.

Abstract illustration for llms.txt Prompt: Draft the File From Your URL List

This llms.txt prompt turns a list of your URLs into a first draft of an llms.txt file. It picks the pages that best explain your site, groups them under clear headings and writes a one-line note for each link. You then check the draft, fix it and publish it at the root of your site.

The page explains each variable, gives the full prompt and shows one real run on an invented site. It also lists the checks that catch the usual mistakes, such as invented URLs. An llms.txt file is a proposal for AI tools, not a Google ranking factor, so treat it as a low-cost extra.

What this llms.txt prompt does

The prompt follows the format proposed at llmstxt.org: an H1 with the site name, a short summary in a blockquote, optional context, then H2 sections that list links with short notes. An "Optional" section holds pages a tool can skip when it has little room.

It selects only from the URLs you supply and never adds new ones. It also explains which pages it left out and why. As a result, you get a draft you can review line by line instead of a file full of guesses.

When to use it

Use it when you want a curated llms.txt file and already have a page list, such as a sitemap export or a crawl. It suits sites from a few dozen to a few hundred important pages.

  • You are creating your first llms.txt file and need a starting structure.
  • Your site changed and the existing file no longer reflects your best pages.
  • You want notes that describe each page more clearly than its title does.

However, if you only need a quick file from a sitemap, our free llms.txt generator builds one in your browser without an AI model. For very large sites, pick the sections by hand first and run the prompt per section.

Inputs and variables

Replace every bracketed variable before you run the prompt. Each one gives the model context it cannot guess.

  • [SITE_NAME]: the name as it should appear in the H1, for example "Northwind Bikes".
  • [SITE_SUMMARY]: two or three factual sentences on what the site offers and for whom.
  • [URL_INVENTORY]: one page per line as URL, title and, if you have it, a short purpose. Export it from your sitemap, CMS or crawler.
  • [PRIORITIES]: what AI tools should understand first, for example "repair guides and warranty terms". Write "none" if you have no preference.

Use only public pages. Leave out account, checkout, staging and noindex URLs before you paste the list.

Reusable prompt — version 1.0

Copy the prompt below as it is. Instructions and data sit in separate XML-style tags, a structure the OpenAI and Anthropic prompting guides recommend.

You are helping a website owner draft an llms.txt file for [SITE_NAME].

<task>
Draft an llms.txt file in Markdown using only the pages in <urls>.
</task>

<format>
1. One H1 line: # [SITE_NAME]
2. One blockquote line that summarises the site, based on <summary>.
3. Optionally, one short paragraph of context a reader needs first.
4. H2 sections that group related pages. Under each, list links as:
   - [Page name](URL): one factual sentence on what the page helps with
5. A final "## Optional" section for useful pages a tool can skip.
</format>

<rules>
1. Use only URLs from <urls>, copied exactly. Never invent, shorten or "fix" a URL.
2. Prefer pages that explain the site, its products, policies and core guides. Leave out tag pages, pagination, thin pages and duplicates.
3. Base each note on the title and purpose given. If they are unclear, write "Needs a description" instead of guessing.
4. Do not add claims about rankings, traffic, awards or prices that are not in the input.
5. Follow <priorities> when choosing the first section.
</rules>

<output>
First the llms.txt draft in a code block.
Then a list "Left out" with each excluded URL and a short reason.
Then a list "Check before publishing" with anything you were unsure about.
</output>

<summary>[SITE_SUMMARY]</summary>
<priorities>[PRIORITIES]</priorities>
<urls>
[URL_INVENTORY]
</urls>

The rules come before the data, so the model reads the limits first. In addition, the "Left out" list makes every exclusion visible, so you can restore a page the model dropped by mistake.

How to use it

Any capable chat model can run this llms.txt prompt. A low temperature setting, where your tool offers one, keeps the notes plainer and more consistent.

  1. Export your public URLs with titles, and remove private or noindex pages.
  2. Fill in the four variables and paste the whole prompt into a new chat.
  3. Copy the code block into a text editor and compare every URL with your list.
  4. Edit the notes so each one is accurate, then save the file as llms.txt.
  5. Upload it to the root of your site and check it with our llms.txt checker.

Example input and output

We ran version 1.0 once on Claude Opus 5.5 on November 15, 2026. The site is invented for this example: a bike shop with repair guides. The input listed 12 URLs, shortened here; the output is trimmed, and trims are marked with "…".

SITE_NAME: Northwind Bikes
SITE_SUMMARY: Northwind Bikes sells city and touring bikes in Oregon and
publishes free repair guides for home mechanics.
PRIORITIES: repair guides and warranty terms
URL_INVENTORY:
https://northwind.example/guides/fix-a-flat-tire, Fix a flat tire
https://northwind.example/guides/adjust-disc-brakes, Adjust disc brakes
https://northwind.example/warranty, Warranty terms
https://northwind.example/tag/brakes, Tag: brakes
https://northwind.example/blog/page/2, Blog page 2
…
# Northwind Bikes

> Northwind Bikes sells city and touring bikes in Oregon and publishes
> free repair guides for home mechanics.

## Repair guides
- [Fix a flat tire](https://northwind.example/guides/fix-a-flat-tire): Steps to find a puncture, patch or replace the tube and refit the tire.
- [Adjust disc brakes](https://northwind.example/guides/adjust-disc-brakes): How to centre the caliper and stop brake rub.
…

## Policies
- [Warranty terms](https://northwind.example/warranty): What the warranty covers and how to make a claim.

## Optional
- [About Northwind Bikes](https://northwind.example/about): Who runs the shop and where it is.

Left out:
- https://northwind.example/tag/brakes: tag archive that repeats the guide links.
- https://northwind.example/blog/page/2: pagination page.

Check before publishing:
- The warranty note is based on the title only; confirm what the page covers.

In this run, every URL in the draft came from the input, and the model flagged one note it could not confirm. That single run is an illustration, not a benchmark; another model or input may behave differently.

How to check the output

Review the draft before it goes live. A wrong URL or an inflated note in llms.txt misleads every tool that reads it.

  • URLs: every link matches a line in your input exactly and returns HTTP 200.
  • Coverage: your most important pages appear, and nothing private or noindex slipped in.
  • Notes: each sentence describes the page truthfully, with no invented prices, awards or results.
  • Format: one H1, one blockquote, H2 sections and Markdown links, as in the llmstxt.org proposal.
  • Left out: you agree with each exclusion, or you add the page back by hand.

Troubleshooting

Most bad drafts come from unclear input. These fixes address the common cases.

  • The model adds URLs you did not give: repeat rule 1 at the end of the prompt and paste fewer URLs per run.
  • Notes repeat the titles word for word: add a short purpose to each line of the inventory.
  • Sections are too broad: name the sections you want in [PRIORITIES], for example "Guides, Policies, Products".
  • The file is too long: ask for at most 30 links outside the Optional section.

Limitations

The prompt drafts a file; it does not decide whether llms.txt helps your site. The format is a community proposal, and Google says there are no additional requirements or special optimizations needed to appear in its AI features. Therefore, measure any effect yourself and keep investing in clear, crawlable pages.

Output varies by model, version and input. The model cannot see your pages, so it relies on the titles and purposes you supply. Treat every draft as a starting point that a person must check and edit.

Version history

Each version is dated so you can tell which prompt produced an older draft.

  • 1.0: November 15, 2026. First version, tested once on Claude Opus 5.5.

Frequently asked questions

Quick answers to the questions readers ask most about this topic.

Which AI models does this llms.txt prompt work with?

Any capable chat model that follows structured instructions, such as current models from OpenAI, Anthropic or Google. We tested it once on Claude Opus 5.5. Results vary by model, so check every draft before you publish it.

Will an llms.txt file improve my Google rankings?

No such effect is documented. Google says there are no additional requirements or special optimizations needed to appear in its AI features. Treat llms.txt as a low-cost proposal for AI tools and measure any effect yourself.

How many URLs can I paste at once?

Start with up to about 150 lines. With longer lists, models are more likely to drop or alter URLs, so split a large site into sections and run the prompt once per section.

Should I use this prompt or the llms.txt generator tool?

Use the free generator for a quick file built directly from your sitemap. Use this prompt when you want curated sections and clearer notes, then check the result with the llms.txt checker.

Sources

These pages support the format and the prompting approach above.

  1. llmstxt.org: The /llms.txt file proposal llmstxt.org
  2. Google Search Central: AI features and your website developers.google.com
  3. OpenAI: Prompt engineering guide developers.openai.com
  4. Anthropic: Claude prompting best practices platform.claude.com