Claude-seo-skills seo-llms-txt
git clone https://github.com/lionkiii/claude-seo-skills
T=$(mktemp -d) && git clone --depth=1 https://github.com/lionkiii/claude-seo-skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/seo-llms-txt" ~/.claude/skills/lionkiii-claude-seo-skills-seo-llms-txt && rm -rf "$T"
skills/seo-llms-txt/SKILL.mdllms.txt — Generate, Validate & Audit
Analyze, generate, or validate llms.txt files per the llms.txt specification (proposed by Jeremy Howard / Answer.AI). The llms.txt standard provides a Markdown file at
/llms.txt that helps LLMs understand a website's content
structure — similar to how robots.txt guides traditional crawlers.
Adoption: 950+ sites including Anthropic, Cloudflare, Docker, Vercel, Stripe, FastHTML, Cursor, Hugging Face, and many more.
Inputs
Three modes, auto-detected from the user's input:
| Input Pattern | Mode | Example |
|---|---|---|
| Audit | |
| Generate | |
| Validate | |
- If user provides a URL without sub-command → Audit mode (fetch and check existing file)
- If user says "generate" → Generate mode (crawl site, produce llms.txt)
- If user says "validate" → Validate mode (parse and check against spec)
llms.txt Spec Reference
@skills/seo/references/llms-txt-spec.md
Quick Spec Summary
The llms.txt file must be valid Markdown with this structure:
- H1 heading (required) — Project/site name
- Blockquote (optional) — Short site summary
- H2 sections — Categorized link lists with descriptions
- Link format:
(colon + space after URL)- [Name](url): Description
section — Links useful but not essential for understanding## Optional- Companion files (optional):
— Comprehensive version with full contentllms-full.txt- Individual
page mirrors for key pages.md
Execution: Audit Mode
When user provides a URL (no sub-command):
- Fetch llms.txt: Use WebFetch to retrieve
<url>/llms.txt - Run 8-point check:
| # | Check | Pass Criteria |
|---|---|---|
| 1 | File exists | HTTP 200 at |
| 2 | Valid Markdown | Parseable as Markdown, no broken syntax |
| 3 | Has H1 | Exactly one heading |
| 4 | Has blockquote summary | line present after H1 (recommended) |
| 5 | Has H2 sections | At least one section with links |
| 6 | Link format correct | Links follow pattern |
| 7 | Has | Contains an Optional section (recommended) |
| 8 | Companion llms-full.txt | exists at same path (recommended) |
- Link spot-check: WebFetch up to 5 linked URLs to verify they resolve (HTTP 200)
- Generate score card and recommendations
Execution: Generate Mode
When user says "generate":
-
Crawl site structure:
- WebFetch the homepage — extract title, meta description, nav links
- WebFetch
(or/sitemap.xml
) — extract all URLs/sitemap_index.xml - If no sitemap, follow nav links from homepage (up to 50 pages)
-
Categorize pages into sections based on URL patterns and content:
—## Docs
,/docs/
,/documentation/
,/guides//reference/
—## Blog
,/blog/
,/articles/
,/posts//news/
—## API
,/api/
,/developers//reference/
—## Products
,/products/
,/features/
,/pricing//solutions/
—## About
,/about/
,/team/
,/company//contact/
—## Legal
,/privacy/
,/terms//legal/
— Catch-all for remaining useful pages## Optional
-
Extract metadata per page:
- Title (from
or<title>
)<h1> - Description (from
or first paragraph)meta[name=description] - Truncate description to ~100 characters
- Title (from
-
Generate llms.txt:
# Site Name > Brief site description from meta or homepage hero text. ## Docs - [Getting Started](https://example.com/docs/start): Introduction and setup guide - [API Reference](https://example.com/docs/api): Complete API documentation ## Blog - [Latest Post](https://example.com/blog/post): Description of the post ## Optional - [About](https://example.com/about): Company background - [Contact](https://example.com/contact): Get in touch -
Generate llms-full.txt skeleton (optional — note to user):
Suggest that llms-full.txt should contain the full Markdown content of all key pages concatenated. Provide the structure but note that generating full content requires crawling every page. -
Output the generated file — display it in a code block and offer to write to disk
Execution: Validate Mode
When user says "validate":
-
Load the file:
- If URL → WebFetch
<url>/llms.txt - If local path → Read the file
- If URL → WebFetch
-
Run spec compliance checks:
| # | Rule | Severity | Check |
|---|---|---|---|
| 1 | Has exactly one H1 | FAIL | Count lines (not ) |
| 2 | H1 is first heading | FAIL | First line starting with must be H1 |
| 3 | Valid Markdown | FAIL | No broken link syntax, unclosed brackets |
| 4 | Links use correct format | WARN | pattern |
| 5 | Has at least one H2 section | FAIL | At least one heading |
| 6 | No empty sections | WARN | Every H2 should have at least one link |
| 7 | Blockquote present | INFO | after H1 is recommended |
| 8 | section exists | INFO | Recommended by spec |
| 9 | No deep heading levels | WARN | Only H1 and H2 allowed (no H3+) |
| 10 | Descriptions present | WARN | Links should have after URL |
- Output pass/fail per rule with line numbers for failures
Output Format
Audit Mode Output
## llms.txt Audit: [domain] **Score: X/8 checks passed** | # | Check | Result | Details | |---|---|---|---| | 1 | File exists | PASS/FAIL | [status code or error] | | 2 | Valid Markdown | PASS/FAIL | [issue if any] | | ... | ... | ... | ... | ### Link Spot-Check | URL | Status | |---|---| | [url] | 200 OK / 404 / timeout | ### Recommendations - [Prioritized list of improvements] ### What is llms.txt? > llms.txt is a proposed standard (llmstxt.org) that provides LLMs with > a structured Markdown overview of your site. 950+ sites have adopted it. > While AI platform adoption of the standard is still emerging, early > adoption positions your site for AI search visibility — similar to how > early schema.org adoption paid off for rich snippets.
Generate Mode Output
## Generated llms.txt for [domain] [The generated llms.txt content in a code block] ### Generation Notes - Pages crawled: [count] - Sections created: [list] - Pages excluded: [count and reason] ### Next Steps 1. Review and edit the generated file 2. Upload to your site root as `/llms.txt` 3. Consider creating `llms-full.txt` with full page content 4. Add `<link rel="help" href="/llms.txt">` to your HTML head (optional)
Validate Mode Output
## llms.txt Validation: [source] **Result: X/10 rules passed** | Y warnings | Z info | # | Rule | Result | Line | Details | |---|---|---|---|---| | 1 | Has H1 | PASS/FAIL | [line#] | [details] | | ... | ... | ... | ... | ... | ### Issues to Fix - [FAIL items with specific fix instructions] ### Recommendations - [WARN items with suggestions]