Skip to content
Select theme

Generate llms.txt

Prompt for AI-generating an llms.txt file from a project description

universal
generation
You give
Name, description and a list of site pages
You get
A ready llms.txt file
Level
Easy
Next
Audit llms.txt

Why

Get a first draft of llms.txt in a minute. The model sorts links into sections and writes the notes; you check the addresses.

When to use

  • The site has no file yet, and the list of important pages is clear.
  • You need to show colleagues what the file will look like.

For a large site a generator is more convenient: it collects pages from the sitemap.

What to fill in

Variable What it is Example
[name] project or site name Acme Docs
[description] one or two sentences about the project Payment API documentation
[pages] addresses and titles of the main pages a list of 10-30 lines

Prompt

Prompt
You know the llms.txt format by the second edition of the proposal (llmstxt.org).
Write an llms.txt file for the project.
Name: [name]
Description: [description]
Pages:
[pages]
Rules:
1. The first line is an H1 heading with the project name.
2. Then a blockquote with a one or two sentence description.
3. Then sections with H2 headings, each with a list of links.
4. Link format: - [Title](address): a short note.
5. Put secondary links into the Optional section.
6. Use only addresses from my list. Do not invent anything.
Return only the file content, no explanations.

What you get

llms.txt
# Acme Docs
> Documentation of the Acme payment API.
## Documentation
- [Quick start](https://acme.dev/quickstart.md): the first payment in five minutes
- [API reference](https://acme.dev/api.md): methods and parameters
## Optional
- [Changelog](https://acme.dev/changelog.md)

Check the result

  1. Every address comes from your list and opens.
  2. There is one H1 heading.
  3. There are no headings between the description and the first section.
  4. The file has no promises or advertising phrases.