Wiki llms txt

From microsoft/skills · View interactive version

Wiki llms txt is an AI agent skill from the GitHub repository microsoft/skills. 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.

How to use this skill

Skill file

llms.txt Generator

Generate llms.txt and llms-full.txt files that provide LLM-friendly access to wiki documentation, following the llms.txt specification.

When This Skill Activates

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?"_
  1. Determine default branch: Run git rev-parse --abbrev-ref HEAD
  2. Do NOT proceed until resolved

llms.txt Format (Spec-Compliant)

The file follows the llms.txt specification:

# {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:

# {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

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:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.