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
100%
Does it follow best practices?
Impact
100%
1.53xAverage score across 3 eval scenarios
Passed
No known issues
Creates spec-compliant llms.txt and llms-full.txt files for documentation projects.
Read
references/llms-txt-spec.mdfor the full specification, format details, and directory submission information.
Explore the docs project to gather:
src/content/, src/pages/, docs/) to understand sections and hierarchyFormat 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:
: Description after each linkWhere to place it:
public/llms.txtstatic/llms.txtValidate before saving:
>) ✓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.
For llms.txt:
For llms-full.txt:
Tell the user:
> summaryhttps:// URLs always/llms.txt, not /docs/llms.txt658c481
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.