CtrlK
BlogDocsLog inGet started
Tessl Logo

llms-txt-creator

Create or fix llms.txt and llms-full.txt files for a documentation project, following the llmstxt.org specification. Use this skill whenever someone needs to create an llms.txt file, generate a full documentation text dump (llms-full.txt), or fix a malformed llms.txt. Also use when optimizing a docs site for AI crawlers, when setting up AI discoverability files, or when the user mentions making their docs readable by LLMs, ChatGPT, Perplexity, or other AI systems.

100

1.53x
Quality

100%

Does it follow best practices?

Impact

100%

1.53x

Average score across 3 eval scenarios

SecuritybySnyk

Passed

No known issues

SKILL.md
Quality
Evals
Security

llms-txt Creator

Creates spec-compliant llms.txt and llms-full.txt files for documentation projects.

Read references/llms-txt-spec.md for the full specification, format details, and directory submission information.

When to Use This Skill

  • Creating a new llms.txt from scratch (item #1)
  • Creating or auto-generating llms-full.txt (item #2)
  • Fixing a malformed or incomplete llms.txt
  • Adding llms.txt to an existing docs project

Workflow

Step 1: Understand the project

Explore the docs project to gather:

  1. Project name and description — read package.json, README.md, or the site's H1/homepage
  2. Content structure — list the content directory (src/content/, src/pages/, docs/) to understand sections and hierarchy
  3. Site URL — find in astro.config.mjs, next.config.js, or package.json homepage field
  4. Framework — Astro, Next.js, Docusaurus, etc. (determines where to place the file)

Step 2: Create llms.txt

Format requirements (see references/llms-txt-spec.md for full spec):

# [Project Name]

> [One-paragraph description of what the project is, who it's for, and what the docs cover. Should be 2-4 sentences.]

## [Section Name]

- [Link text](https://full-url/path): Brief 5-10 word description
- [Link text](https://full-url/path): Brief description

## [Section Name]
...

Curation guidelines:

  • Include 20-40 links total — curate, don't dump everything
  • Put the most important content first (Getting Started, Key Concepts)
  • Group links into 3-6 logical H2 sections matching the site's top-level structure
  • Always use absolute URLs (https://...)
  • Always include : Description after each link

Where to place it:

  • Astro/Next.js/Vite: public/llms.txt
  • Docusaurus: static/llms.txt
  • Other: site root's static assets directory

Validate before saving:

  • H1 present ✓
  • Blockquote present (line starting with >) ✓
  • At least one H2 section ✓
  • All URLs are absolute ✓
  • Links point to real pages (spot-check 3-5)

Step 3: Create llms-full.txt (if requested)

Option A — Build script (recommended for maintained docs):

Create scripts/generate-llms-full.js (or .mjs):

import { glob } from 'glob';
import { readFile, writeFile } from 'fs/promises';
import matter from 'gray-matter';
import path from 'path';

const SITE_URL = 'https://YOUR_SITE_URL'; // update this
const CONTENT_DIR = 'src/content'; // update this

const files = (await glob(`${CONTENT_DIR}/**/*.{md,mdx}`)).sort();
const parts = [
  `# [Project Name] — Full Documentation`,
  `Generated: ${new Date().toISOString()}`,
  `Source: ${SITE_URL}`,
  `Pages: ${files.length}`,
  '',
];

for (const file of files) {
  const raw = await readFile(file, 'utf8');
  const { data: fm, content } = matter(raw);
  const title = fm.title || path.basename(file, path.extname(file));
  const slug = file
    .replace(CONTENT_DIR, '')
    .replace(/\.(md|mdx)$/, '')
    .replace(/\/index$/, '');
  parts.push('---');
  parts.push(`# ${title}`);
  parts.push(`URL: ${SITE_URL}${slug}`);
  parts.push('');
  parts.push(content.trim());
  parts.push('');
}

await writeFile('public/llms-full.txt', parts.join('\n'));
console.log(`✓ Generated llms-full.txt (${files.length} pages)`);

Add to package.json scripts:

{
  "scripts": {
    "build": "node scripts/generate-llms-full.mjs && [existing build command]"
  }
}

Option B — Static generation (for projects without a build pipeline):

Manually concatenate the 10-20 most important pages into a single file using the format above.

Step 4: Verify

For llms.txt:

  • Open the file and read it — does it represent the project accurately?
  • Check that 3-5 random links in the file would resolve if visited

For llms-full.txt:

  • Check the file size (should be >10KB for a real docs project)
  • Verify the header is correct (date, page count)
  • Confirm a few page sections are present with correct titles

Step 5: Report

Tell the user:

  1. Where the file(s) were created
  2. How many links are in llms.txt (and which sections)
  3. For llms-full.txt: page count and file size
  4. Next step: run the build to verify the file is served correctly
  5. Remind them about directory registration (item #25): submit to llmstxthub.com, llmstxtdirectory.org

Common Mistakes to Avoid

  • No blockquote → llms.txt parsers may skip the file; always include > summary
  • Relative URLs → use full https:// URLs always
  • Too many links → curate to 20-40; more is not better
  • Wrong placement → must be at /llms.txt, not /docs/llms.txt
  • Manual llms-full.txt → auto-generate in build to keep it fresh
Repository
kubical-ai/aeo-geo-optimization
Last updated
Created

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.