home / skills / linehaul-ai / linehaulai-claude-marketplace / wiki-llms-txt

This skill generates llms.txt and llms-full.txt files to produce LLM-readable project documentation from wiki pages.

npx playbooks add skill linehaul-ai/linehaulai-claude-marketplace --skill wiki-llms-txt

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
5.0 KB
---
name: wiki-llms-txt
description: Generates llms.txt and llms-full.txt files for LLM-friendly project documentation following the llms.txt specification. Use when the user wants to create LLM-readable summaries, llms.txt files, or make their wiki accessible to language models.
---

# llms.txt Generator

Generate `llms.txt` and `llms-full.txt` files that provide LLM-friendly access to wiki documentation, following the [llms.txt specification](https://llmstxt.org/).

## When This Skill Activates

- User asks to generate `llms.txt` or mentions the llms.txt standard
- User wants to make documentation "LLM-friendly" or "LLM-readable"
- User asks for a project summary file for language models
- User mentions `llms-full.txt` or context-expanded documentation

## Source Repository Resolution (MUST DO FIRST)

Before generating, resolve the source repository context:

1. **Check for git remote**: Run `git remote get-url origin`
2. **Ask the user**: _"Is this a local-only repository, or do you have a source repository URL?"_
   - Remote URL → store as `REPO_URL`
   - Local → use relative paths only
3. **Determine default branch**: Run `git rev-parse --abbrev-ref HEAD`
4. **Do NOT proceed** until resolved

## llms.txt Format (Spec-Compliant)

The file follows the [llms.txt specification](https://llmstxt.org/):

```markdown
# {Project Name}

> {Dense one-paragraph summary — what it does, who it's for, key technologies}

{Important context paragraphs — constraints, architectural philosophy, non-obvious things}

## {Section Name}

- [{Page Title}]({relative-path-to-md}): {One-sentence description of what the reader will learn}

## Optional

- [{Page Title}]({relative-path-to-md}): {Description — these can be skipped for shorter context}
```

### Key Rules

1. **H1** — Project name (exactly one, required)
2. **Blockquote** — Dense, specific summary (required). Must be unique to THIS project.
3. **Context paragraphs** — Non-obvious constraints, things LLMs would get wrong without being told
4. **H2 sections** — Organized by topic, each with a list of `[Title](url): Description` entries
5. **"Optional" H2** — Special meaning: links here can be skipped for shorter context
6. **Relative links** — All paths relative to wiki directory
7. **Dynamic** — ALL content derived from actual wiki pages, not templates
8. **Section order** — Most important first: Onboarding → Architecture → Getting Started → Deep Dive → Optional

### Description Quality

| ❌ Bad | ✅ Good |
|--------|---------|
| "Architecture overview" | "System architecture showing how Orleans grains communicate via message passing with at-least-once delivery" |
| "Getting started guide" | "Prerequisites, local dev setup with Docker Compose, and first API call walkthrough" |
| "The API reference" | "REST endpoints with auth requirements, rate limits, and request/response schemas" |

## llms-full.txt Format

Same structure as `llms.txt` but with full content inlined:

```markdown
# {Project Name}

> {Same summary}

{Same context}

## {Section Name}

<doc title="{Page Title}" path="{relative-path}">
{Full markdown content — frontmatter stripped, citations and diagrams preserved}
</doc>
```

### Inlining Rules

- **Strip YAML frontmatter** (`---` blocks) from each page
- **Preserve Mermaid diagrams** — keep `` ```mermaid `` fences intact
- **Preserve citations** — all `[file:line](URL)` links stay as-is
- **Preserve tables** — all markdown tables stay intact
- **Preserve `<!-- Sources: -->` comments** — these provide diagram provenance

## Prerequisites

This skill works best when wiki pages already exist (via `/deep-wiki:generate` or `/deep-wiki:page`). If no wiki exists yet:

1. Suggest running `/deep-wiki:generate` first
2. OR generate a minimal `llms.txt` from README + source code scan (without wiki page links)

## Output Files

Generate three files:

| File | Purpose | Discoverability |
|------|---------|-----------------|
| `./llms.txt` | Root discovery file | Standard path per llms.txt spec. GitHub MCP `get_file_contents` and `search_code` find this first. |
| `wiki/llms.txt` | Wiki-relative links | For VitePress deployment and wiki-internal navigation. |
| `wiki/llms-full.txt` | Full inlined content | Comprehensive reference for agents needing all docs in one file. |

The root `./llms.txt` links into `wiki/` (e.g., `[Guide](./wiki/onboarding/contributor-guide.md)`). The `wiki/llms.txt` uses wiki-relative paths (e.g., `[Guide](./onboarding/contributor-guide.md)`).

If a root `llms.txt` already exists and was NOT generated by deep-wiki, do NOT overwrite it.

## Validation Checklist

Before finalizing:

- [ ] All linked files in `llms.txt` actually exist
- [ ] All `<doc>` blocks in `llms-full.txt` have real content (not empty)
- [ ] Blockquote is specific to this project (not generic boilerplate)
- [ ] Sections ordered by importance
- [ ] No duplicate page entries across sections
- [ ] "Optional" section only contains truly optional content
- [ ] `llms.txt` is concise (1-5 KB)
- [ ] `llms-full.txt` contains all wiki pages

Overview

This skill generates spec-compliant llms.txt and llms-full.txt files to make project wikis LLM-friendly and easily consumable by agents. It follows the llms.txt specification, produces both wiki-relative and root discovery files, and validates links and inlined content before finalizing. Use it to create concise discovery summaries and a full inlined documentation bundle for language models.

How this skill works

The skill first resolves repository context (remote URL and default branch) before proceeding. It scans existing wiki pages or README/source files, builds a concise llms.txt with prioritized sections and relative links, and produces wiki/llms-full.txt that inlines stripped-frontmatter markdown while preserving diagrams, tables, and citations. It validates file existence, non-empty inlined docs, and ordering rules, and refuses to overwrite an existing root llms.txt not generated by this tool.

When to use it

  • You want an LLM-readable project summary or discovery file
  • You need a single-file, inlined documentation bundle for agents (llms-full.txt)
  • You want to expose wiki pages to LLMs with prioritized, concise sections
  • You are preparing docs for deployment where VitePress or agent discovery expects wiki-relative links
  • You need to validate that wiki links and inlined content are complete before publishing

Best practices

  • Resolve repository remote URL and default branch before generation to ensure correct links
  • Prefer existing wiki pages; run a wiki generator first if no wiki exists
  • Keep the blockquote summary project-specific and dense — avoid generic boilerplate
  • Order sections by importance: Onboarding → Architecture → Getting Started → Deep Dive → Optional
  • Validate that all referenced files exist and that llms-full.txt inlines full markdown content

Example use cases

  • Create ./llms.txt linking into wiki/ for agent discovery on GitHub or internal registries
  • Produce wiki/llms-full.txt to provide a single, fully inlined knowledge bundle to an LLM agent
  • Generate llms.txt from an existing README and wiki pages to improve model prompt quality
  • Validate and regenerate llms.txt during a docs release to ensure no broken links or missing inlined pages
  • Produce a minimal llms.txt when a wiki is absent by scanning README and source code for key docs

FAQ

What if there is no wiki yet?

Recommend running a wiki generator first or create a minimal llms.txt from the README and source scan; the skill can produce a lightweight llms.txt in that case.

Will this overwrite an existing root llms.txt?

No. If a root llms.txt exists and was not produced by the project’s wiki generator, the skill will refuse to overwrite it.

Does llms-full.txt preserve diagrams and citations?

Yes. The inlining preserves mermaid fences, markdown tables, and citation-style links while stripping YAML frontmatter.