agentleFS
romankurnovskiiromankurnovskii/get-llms-txt/skills/llms-txt-audit/SKILL.md

llms-txt-audit

Skill3 starsChanged 20 days agoMITView on GitHub

Agent skill: audit any website for llms.txt presence, freshness, and validity; generate a compliant llms.txt from site content if missing or stale. Works with Claude Code, Cursor, Codex, and any agent that reads SKILL.md.

  • Installs packages

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. JakeLabate/Claude-SEO-Skills★ 3same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If found, parse and verify:

    line 58
  2. Very specific:

    If missing, stale, or generate_if_missing=true:

    line 97
  3. Distinctive:

    Run the skill validator:

    line 243

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 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

llms-txt-audit

Audit any website for llms.txt — the emerging standard for LLM-friendly site summaries. Detect missing, stale, or malformed files. Generate a compliant llms.txt from crawled content when needed.

Attribution: Method adapted from romankurnovskii.com/llms-txt-guide


When to Use This Skill

  • Site owners preparing for AI-era discoverability — ensure your site has a valid llms.txt
  • SEO/AEO practitioners auditing client sites for LLM-readiness
  • Developers integrating llms.txt generation into CI/CD pipelines
  • Researchers studying AI crawler behavior and site indexing patterns

Prerequisites

  • Target website must be publicly accessible (or provide auth credentials)
  • Python 3.10+ with httpx, beautifulsoup4, lxml, markdownify
  • Optional: get-llms-txt CLI installed (pip install get-llms-txt)

Inputs

ParameterTypeRequiredDescription
urlstringYesRoot URL of the site to audit (e.g., https://example.com)
max_pagesintegerNoMaximum pages to crawl for content extraction (default: 50)
check_freshness_daysintegerNoFlag llms.txt as stale if older than this many days (default: 30)
generate_if_missingbooleanNoAuto-generate llms.txt if missing or stale (default: false)
output_pathstringNoLocal path to write generated llms.txt (default: ./llms.txt)

Procedure

1. Discover llms.txt

# Check standard locations
curl -sI "$URL/llms.txt"        # Root
curl -sI "$URL/.well-known/llms.txt"  # Well-known path
  • Follow redirects (301/302)
  • Record HTTP status, Last-Modified, Content-Length, Content-Type

2. Validate llms.txt Structure

If found, parse and verify:

# Required: H1 title (site name)
# Required: One-line description (≤ 200 chars)
# Required: At least one link section with entries

## Section Name
- [Link Title](https://example.com/page) — One-line benefit/description

Validation checks:

  • File exists and returns 200 OK
  • Contains H1 title (first non-empty line starting with # )
  • Contains description paragraph after H1
  • Contains at least one ## section with - [Title](URL) — description entries
  • All URLs are absolute and reachable (HEAD 200)
  • Last-Modified ≤ check_freshness_days ago (if header present)
  • File size > 100 bytes (not empty placeholder)

3. Crawl Site for Content (if generating or validating coverage)

BFS crawl from root URL:
- Respect robots.txt
- Follow only same-domain links
- Skip: /api/, /admin/, /login/, /cart/, /checkout/, *.pdf, *.zip, *.exe
- Extract: <title>, <meta description>, <h1>, main content text
- Limit: max_pages

For each page, compute:

  • Title (from <title> or first <h1>)
  • Description (from <meta name="description"> or first 160 chars of content)
  • URL (canonical)
  • Priority (heuristic: homepage > docs > blog > landing > other)

4. Generate llms.txt

If missing, stale, or generate_if_missing=true:

# Site Name
One-sentence description of what the site does for visitors.

## Core Pages
- [Home](https://example.com) — What this site offers in one line
- [Documentation](https://example.com/docs) — Technical reference and guides
- [API Reference](https://example.com/api) — Endpoint specifications

## Guides & Tutorials
- [Getting Started](https://example.com/guides/getting-started) — First steps for new users
- [Authentication](https://example.com/guides/auth) — How to authenticate API calls

## Blog / Updates
- [Latest Release](https://example.com/blog/v2-release) — What's new in v2
- [Changelog](https://example.com/changelog) — Full version history

Generation rules:

  • Group links under logical ## sections (Core, Guides, API, Blog, etc.)
  • Each entry: - [Title](URL) — one-line benefit for the reader
  • Sort by priority within each section
  • Cap at ~50 total links (LLM context window friendly)
  • Include attribution comment: <!-- Generated by llms-txt-audit skill — romankurnovskii.com/llms-txt-guide -->

5. Output Report

Return structured result:

{
  "url": "https://example.com",
  "llms_txt": {
    "found": true,
    "location": "https://example.com/llms.txt",
    "status": 200,
    "last_modified": "2026-09-15T10:30:00Z",
    "size_bytes": 2847,
    "valid": true,
    "fresh": true,
    "validation": {
      "has_h1": true,
      "has_description": true,
      "has_sections": true,
      "links_reachable": 47,
      "links_broken": 0
    }
  },
  "crawl": {
    "pages_crawled": 42,
    "candidate_links": 89,
    "selected_links": 47
  },
  "generated": false,
  "output_path": null
}

If generated:

{
  "url": "https://example.com",
  "llms_txt": { "found": false },
  "crawl": { "pages_crawled": 42, "candidate_links": 89, "selected_links": 47 },
  "generated": true,
  "output_path": "./llms.txt"
}

Installation

As a Skill within get-llms-txt (recommended)

This skill is bundled in the get-llms-txt repository at skills/llms-txt-audit/.

# Clone the parent repo
git clone https://github.com/romankurnovskii/get-llms-txt

# Link or copy the skill to your agent's skills directory
ln -s $(pwd)/get-llms-txt/skills/llms-txt-audit ~/.config/claude-code/skills/llms-txt-audit
# Or for Cursor:
ln -s $(pwd)/get-llms-txt/skills/llms-txt-audit ~/.cursor/skills/llms-txt-audit
# Or for Codex:
ln -s $(pwd)/get-llms-txt/skills/llms-txt-audit ~/.codex/skills/llms-txt-audit
# Or for OpenCode:
ln -s $(pwd)/get-llms-txt/skills/llms-txt-audit ~/.opencode/skills/llms-txt-audit

Standalone (legacy)

# Option 1: Clone the standalone skill repo
git clone https://github.com/romankurnovskii/llms-txt-audit-skill ~/.config/claude-code/skills/llms-txt-audit

# Option 2: Add as git submodule
git submodule add https://github.com/romankurnovskii/llms-txt-audit-skill .agents/skills/llms-txt-audit

Standalone CLI (Python)

pip install httpx beautifulsoup4 lxml markdownify
# Run the audit script directly
python scripts/audit_llms_txt.py --url https://example.com --generate

Usage Examples

Audit only (report)

python scripts/audit_llms_txt.py --url https://example.com --max-pages 50

Audit + generate if missing/stale

python scripts/audit_llms_txt.py --url https://example.com --generate --output ./llms.txt

Check freshness with custom threshold

python scripts/audit_llms_txt.py --url https://example.com --check-freshness-days 7

Output Files

  • llms.txt — Generated file (if --generate used)
  • audit_report.json — Full structured report
  • .logs/audit_llms_txt_<timestamp>.log — Execution log

Validation

Run the skill validator:

python ~/.agents/skills/skill-creator/scripts/quick_validate.py /path/to/llms-txt-audit-skill

License

MIT — see LICENSE


Related

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.