agentleFS
Cogni-AI-OUCogni-AI-OU/cogni-ai-agent-skills/llmstxt/SKILL.md

llmstxt

Skill4 starsChanged 6 months agoMITView on GitHub

A proposal to standardise on using an /llms.txt file to provide information to help LLMs use a website at inference time. You MUST load this skill when reading websites, llms.txt, or when creating/updating that file.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

17 rules. About 0 are common, 5 are distinctive, and 12 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 12

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    When using the webfetch tool to read documentation from a website.

    line 13
  2. Very specific:

    When creating, updating, or maintaining an /llms.txt file for a project.

    line 14
  3. Distinctive:

    When retrieving context about a website to help LLMs understand its structure.

    line 15
  4. Distinctive:

    When reading local files that do not correspond to web documentation.

    line 19
  5. Distinctive:

    When the task does not involve fetching external documentation or creating LLM context files.

    line 20
  6. Very specific:

    Check for llms.txt before reading docs: When you need to read documentation from a new website, always attempt to fetch …

    line 24
  7. Very specific:

    Check for .md versions of pages: If reading a specific page https://<domain>/path/page.html, try fetching …

    line 26
  8. Very specific:

    Creating or updating llms.txt: When asked to create an llms.txt file for a site:

    line 27
  9. Very specific:

    Ensure it's located in the root path /llms.txt (or a subpath if specified).

    line 28
  10. Very specific:

    Use an H1 with the project name (required).

    line 29
  11. Very specific:

    Follow with a blockquote > containing a short summary.

    line 30
  12. Very specific:

    Use a ## Optional section for URLs that can be skipped if a shorter context is needed.

    line 34
  13. Very specific:

    Use concise, clear language in llms.txt files.

    line 38
  14. Distinctive:

    When linking to resources, include brief, informative descriptions.

    line 39
  15. Distinctive:

    Prefer markdown formats as they are easily understood by language models.

    line 40
  16. Very specific:

    Do not use llms.txt as a full sitemap (use sitemap.xml for search engines).

    line 44
  17. Very specific:

    Avoid putting large unstructured data directly in /llms.txt.

    line 45

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

llmstxt

<!-- markdownlint-disable MD013 MD023 MD031 MD032 -->

When to Use

  • When using the webfetch tool to read documentation from a website.
  • When creating, updating, or maintaining an /llms.txt file for a project.
  • When retrieving context about a website to help LLMs understand its structure.

When Not to Use

  • When reading local files that do not correspond to web documentation.
  • When the task does not involve fetching external documentation or creating LLM context files.

Core Process

  1. Check for llms.txt before reading docs: When you need to read documentation from a new website, always attempt to fetch https://<domain>/llms.txt first. This file often contains a curated overview of the documentation and links to LLM-friendly markdown files.
  2. Look for expanded context files: Some sites provide /llms-ctx.txt (expanded context without optional URLs) or /llms-ctx-full.txt (full expanded context). Fetching these can provide all the documentation in a single context-friendly file.
  3. Check for .md versions of pages: If reading a specific page https://<domain>/path/page.html, try fetching https://<domain>/path/page.html.md (or index.html.md for directories) as it might provide a clean markdown version.
  4. Creating or updating llms.txt: When asked to create an llms.txt file for a site:
    • Ensure it's located in the root path /llms.txt (or a subpath if specified).
    • Use an H1 with the project name (required).
    • Follow with a blockquote > containing a short summary.
    • Include zero or more markdown sections with detailed information.
    • Include zero or more H2 (##) sections containing "file lists" of URLs.
    • In file lists, use standard markdown links [name](url) optionally followed by : and notes.
    • Use a ## Optional section for URLs that can be skipped if a shorter context is needed.

Best Practices

  • Use concise, clear language in llms.txt files.
  • When linking to resources, include brief, informative descriptions.
  • Prefer markdown formats as they are easily understood by language models.

What to Avoid

  • Do not use llms.txt as a full sitemap (use sitemap.xml for search engines).
  • Avoid putting large unstructured data directly in /llms.txt; link to detailed .md files instead.

Common Pitfalls

  • Forgetting to check llms.txt first: Jumping straight to searching individual HTML pages can lead to parsing complex HTML and missing curated LLM context. Always fetch /llms.txt or /llms-ctx.txt first.
  • Incorrect file structure: Failing to include the required H1 or blockquote summary when generating the file.
  • Overlooking .md extensions: Wasting tokens on raw HTML when appending .md to the URL could yield clean markdown.

References

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.