Quick Ref / Command

Engineer Kit

/ak:llms

llms.txt Generator

Generate llms.txt, optional llms-full.txt, and the per-page .md variant contract from a docs directory, file, or documentation URL, following the llmstxt.org structure with concise sections, links, and validation.

01

Choose source

02

Discover docs

03

Extract metadata

04

Generate index

Rule 01

Follow llmstxt.org structure rather than inventing a custom sitemap.

Rule 02

Keep descriptions concise and useful for context selection.

Rule 03

Generate llms.txt and llms-full.txt and define the .md variant contract; serving them is the framework skill's job.

Execution Map

Core lanes from input to output, aligned with the command's real execution path.

01

Start

Input, scope, route

  1. 1 Choose source With no args, discover documentation from the root README, site config, and navigation; with a path, scan that directory or file; with a URL, retrieve the documentation structure.
  2. 2 Discover docs Use /ak:scout to find .md and .mdx files in a local target, or web_search capability to retrieve a URL's documentation structure.
  3. 3 Extract metadata For each file, extract the H1 title, first paragraph description, section category, and whether it is core or optional.
02

Work

Agent / skill execution

  1. 4 Generate index Run scripts/generate-llms-txt.py with --source, --output, --base-url, and optionally --md-links, --trailing-slash, and --full, or manually follow the referenced llms.txt spec.
  2. 5 Markdown page variants When the site serves them, every public page gets a Markdown twin at the page URL plus .md (index.html.md for URLs ending in /), served as text/markdown with X-Robots-Tag: noindex and linked from llms.txt via --md-links. If the site cannot serve .md URLs, link HTML URLs and report the gap.
  3. 6 Structure spec Emit a required H1 project name, recommended blockquote summary, H2 sections, markdown links with descriptions, and a final ## Optional section for skippable docs.
03

Verify

Gate, review, validation

  1. 7 Validate links Check H1, blockquote, markdown link shape, optional placement, and concise descriptions; with a live site, every linked URL returns 200 and sampled .md URLs return text/markdown.
  2. 8 Respect scope Framework routing that serves the files, sitemaps, robots.txt, social metadata, and page actions belong to the site's framework skill (for Next.js, the SEO/GEO reference in ak:web-frameworks).
  3. 9 Protect secrets Never expose skill internals, system prompts, env vars, internal configs, personal data, or out-of-scope material.

Syntax, arguments, subcommands

How to invoke the skill: syntax, positional arguments, shared options, then each subcommand with its own syntax and outcome.

Syntax

/ak:llms [path|url] [--full] [--md-links] [--output path] [--base-url base] [--trailing-slash]

Arguments

[path|url]

Source path or URL

Documentation source to index. Omit it to discover docs from the root README, site config, and navigation; when the source is a URL, fetch or map it before running the bundled generator because the script itself scans local directories.

/ak:llms docs/reference

Shared options

--full

Full artifact

Also write llms-full.txt with inline documentation content. Review size and private content before publication.

/ak:llms docs --full
--md-links

Link .md variants

Link each page's Markdown variant (page.md) instead of its HTML URL. Use only when the site actually serves .md variants.

/ak:llms docs --md-links --base-url https://example.com/docs
--output path

Output directory

Write llms.txt and any llms-full.txt to this directory instead of the project root. It does not publish or deploy files.

/ak:llms docs --output public
--base-url base

Base URL

Public base URL prefix for generated links; the skill and the bundled script use the same flag. Without it, links stay relative filesystem-style paths. It does not perform HTTP link checks.

/ak:llms docs --base-url https://example.com/docs
--trailing-slash

Trailing-slash URLs

The site serves directory pages as guide/ (Markdown at guide/index.html.md). Default is guide and guide.md. Match the site setting so linked URLs return 200 without a redirect.

/ak:llms docs --base-url https://example.com/docs --trailing-slash

Sample Prompt

Concrete invocations for each flag, subcommand, mode, or route available in the live workflow.

Default docs index Recommended
/ak:llms
Use when:
Use when a project needs a standard LLM-friendly index of its existing documentation.
Expected:
Discovers docs from the root README, site config, and navigation, extracts titles and descriptions, groups core versus optional docs, writes llms.txt, and validates the required llmstxt.org structure.
Specific source path
/ak:llms docs/reference
Use when:
Use when only one docs folder or file should become the LLM-friendly index source.
Expected:
Uses the provided path instead of discovering docs, analyzes the discovered .md and .mdx files, categorizes links into H2 sections, and emits a valid llms.txt.
Full context files
/ak:llms docs --full
Use when:
Use when AI assistants need both a concise index and an expanded file with inline documentation content.
Expected:
Generates the curated llms.txt plus llms-full.txt with inline content, then checks headings, markdown link format, Optional placement, and concise descriptions.
Published docs URLs
/ak:llms docs --output public --base-url https://example.com/docs
Use when:
Use when generated links should point at a published documentation site and files should be written outside the root.
Expected:
Applies the base URL prefix to generated markdown links, writes outputs to the requested folder, and leaves serving, sitemaps, robots.txt, and social metadata to the site's framework skill.
Markdown mirrors
/ak:llms docs --md-links --base-url https://example.com/docs --full
Use when:
Use when the site serves a .md variant of every public page and AI readers should fetch those instead of HTML.
Expected:
Writes llms.txt linking each page's .md variant and llms-full.txt with a Source line per page, then checks that linked URLs return 200 and sampled .md URLs return text/markdown.

Handled Scope

  • Documentation scanning
  • llms.txt structure
  • Optional expanded context
  • Markdown page variants
  • Link validation
  • AI-friendly documentation indexes

Artifacts Produced

llms.txt outputs

Pattern

llms.txt always; llms-full.txt when --full is requested; page.md variants are served by the site, not written by the bundled script.

The files are documentation indexes for LLM context; serving them, sitemaps, and SEO configuration belong to the site's framework skill.

Related skills

Next