К основному содержанию
команда

llms — команда для Claude Code: генерация llms.txt для проекта

Собирает llms.txt и llms-full.txt по вики проекта: краткий указатель со ссылками и полную версию с встроенным текстом страниц.

Установить в Claude Code · Вручную: положить файлы Все способы и платформы ↓
.claude/commands/llms.md
Открыть на GitHub

Что делает llms

Команда проходит по репозиторию и уже сгенерированной вики, собирает название проекта, описание, технологии, страницы в wiki/, гайды в onboarding/ и README. Дальше пишет два файла в wiki/. Первый — компактный, со ссылками и короткими пояснениями к каждой. Второй — тот же каркас, но содержимое страниц вставлено целиком в блоки <doc> с атрибутами title и path.

Перед генерацией команда требует разобраться с источником: проверяет git remote get-url origin и спрашивает, локальный это репозиторий или есть URL. От ответа зависит вид ссылок — абсолютные вида REPO_URL/blob/BRANCH/path или относительные пути. Ветку берёт из git rev-parse --abbrev-ref HEAD. Пока это не выяснено, работа не начинается, поэтому в репозитории без настроенного remote команда первым делом задаст вопрос.

Формат подчинён спецификации llms.txt: один заголовок H1, блокquote с плотным описанием, разделы H2 со списками [Название](ссылка): пояснение. Раздел «Optional» помечает то, что инструменты могут пропустить ради экономии контекста. Названия разделов берутся из реального каталога вики, а не из шаблона. В llms-full.txt из встроенных страниц вырезается frontmatter VitePress, а таблицы, диаграммы Mermaid и ссылки-цитаты остаются как есть.

Какие задачи решает

  • собрать из вики проекта компактный указатель для языковых моделей
  • отдать агенту полный текст документации одним файлом
  • разложить страницы вики по разделам с понятными описаниями
  • подставить в ссылки правильный URL репозитория и ветку
  • проверить, что ссылки из указателя ведут на существующие файлы

Примеры запросов агенту

  • Сгенерируй llms.txt и llms-full.txt для вики этого проекта
  • Собери llms.txt по страницам из wiki/, ссылки делай относительными
  • Обнови llms-full.txt: вставь полный текст страниц в блоки <doc>

Как установить llms

Вручную: положить файлы

.claude/commands/llms.md

Вызов — /llms. Для всех проектов — ~/.claude/commands/

Вопросы о llms

Как установить llms в Claude Code?

Положите файл команды по пути .claude/commands/llms.md, и вызов /llms появится в Claude.

Что делает команда llms?

Генерирует llms.txt со ссылками на страницы вики и llms-full.txt с их полным содержимым, следуя спецификации llms.txt.

Что нужно сделать перед запуском?

Разрешить вопрос с источником: команда проверяет git remote get-url origin и спрашивает, локальный это репозиторий или есть URL. Без этого она дальше не идёт.

Исходный текст

llms.md · MIT
---
description: Generate llms.txt and llms-full.txt files for the wiki — LLM-friendly project summaries following the llms.txt specification
---

# Deep Wiki: Generate llms.txt

You are generating `llms.txt` and `llms-full.txt` files that provide LLM-friendly access to the wiki documentation. These follow the [llms.txt specification](https://llmstxt.org/).

## 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`, use linked references: `[Title](REPO_URL/blob/BRANCH/path)`
   - Local → use relative paths to wiki files
3. **Determine default branch**: Run `git rev-parse --abbrev-ref HEAD`
4. **Do NOT proceed** until resolved

## What is llms.txt

`llms.txt` is a standardized markdown file that helps LLMs quickly understand a project. It provides:

- A concise project summary
- Links to key documentation files with brief descriptions
- Structured sections (Onboarding, Architecture, API, etc.)

Two files are generated:

| File | Purpose | Size |
|------|---------|------|
| `llms.txt` | Links + brief descriptions — fits in small context windows | Small (1-5 KB) |
| `llms-full.txt` | Full inlined content of all linked pages | Large (50-500 KB) |

## Step 1: Gather Project Context

Scan the repository and existing wiki (if generated) to collect:

1. **Project identity** — name, one-sentence description, primary language, key technologies
2. **Wiki pages** — scan `wiki/` directory for all generated `.md` files
3. **Onboarding guides** — check for `onboarding/` folder with audience-tailored guides
4. **README** — extract the core project description
5. **Key entry points** — main files, API surface, configuration

## Step 2: Generate `llms.txt`

Create `wiki/llms.txt` following the llms.txt spec format:

```markdown
# {Project Name}

> {One-paragraph summary: what it does, who it's for, key technologies. Dense and informative.}

{2-3 paragraphs of important context: architectural philosophy, key constraints, what makes this project different. Include things an LLM needs to know to give accurate answers about this project.}

## Onboarding

- [{Contributor Guide}](./onboarding/contributor-guide.md): Step-by-step guide for new contributors — environment setup, first task, testing, and coding conventions
- [{Staff Engineer Guide}](./onboarding/staff-engineer-guide.md): Architectural deep-dive for senior engineers — design decisions, domain model, component types, and failure modes
- [{Executive Guide}](./onboarding/executive-guide.md): Capability overview for engineering leaders — risk assessment, technology investment, and scaling model
- [{Product Manager Guide}](./onboarding/product-manager-guide.md): Feature-focused guide for PMs — user journeys, capabilities, limitations, and data/privacy

## Architecture

- [{Architecture Overview}](./02-architecture/overview.md): System architecture, component boundaries, and deployment topology
- [{Data Model}](./02-architecture/data-model.md): Core entities, relationships, and data invariants
- [{API Reference}](./02-architecture/api-reference.md): Endpoints, authentication, and wire format

## Getting Started

- [{Setup Guide}](./01-getting-started/setup.md): Prerequisites, installation, and first run
- [{Configuration}](./01-getting-started/configuration.md): Environment variables, feature flags, and config files

## Deep Dive

- [{Component Name}](./03-deep-dive/component.md): Description of component purpose and scope
- ...additional pages...

## Optional

- [{Changelog}](./changelog.md): Recent changes and version history
- [{Contributing}](./contributing.md): How to contribute to the project
```

### llms.txt Rules

1. **H1** — Project name (REQUIRED, only one)
2. **Blockquote** — Dense one-paragraph summary (REQUIRED)
3. **Context paragraphs** — Important notes, constraints, non-obvious things (optional but recommended)
4. **H2 sections** — Each contains a markdown list of `[Title](url): Description` entries
5. **"Optional" section** — Special meaning: these links can be skipped for shorter context. Put changelog, contributing guides, and supplementary material here.
6. **All links are relative** to the wiki directory (e.g., `./onboarding/contributor-guide.md`)
7. **Descriptions are concise** — one sentence per link, informative not generic
8. **Order matters** — put the most important sections first (Onboarding → Architecture → Getting Started → Deep Dive → Optional)
9. **Dynamic content** — derive ALL section names and page titles from the actual generated wiki catalogue, not from templates

### Content Quality

- The blockquote summary should be **dense and specific** — not "A project for doing things" but "A distributed task orchestration engine built on Orleans virtual actors, providing reliable workflow execution with at-least-once delivery guarantees for Azure-hosted microservices"
- Context paragraphs should include **non-obvious constraints** — things an LLM would get wrong without being told (e.g., "Although the API surface resembles FastAPI, it uses a custom router that does not support dependency injection")
- Link descriptions should tell the reader **what they'll learn**, not just restate the title

## Step 3: Generate `llms-full.txt`

Create `wiki/llms-full.txt` — same structure as `llms.txt` but with full page content inlined using XML-style tags.

### Format

```markdown
# {Project Name}

> {Same blockquote summary as llms.txt}

{Same context paragraphs as llms.txt}

## Onboarding

<doc title="{Contributor Guide}" path="onboarding/contributor-guide.md">
{Full markdown content of contributor-guide.md}
</doc>

<doc title="{Staff Engineer Guide}" path="onboarding/staff-engineer-guide.md">
{Full markdown content of staff-engineer-guide.md}
</doc>

...

## Architecture

<doc title="{Architecture Overview}" path="02-architecture/overview.md">
{Full markdown content of overview.md}
</doc>

...

## Optional

<doc title="{Changelog}" path="changelog.md">
{Full markdown content of changelog.md}
</doc>
```

### llms-full.txt Rules

1. **Same H1, blockquote, and context** as `llms.txt`
2. **Replace link lists** with `<doc>` blocks containing full page content
3. **Each `<doc>` tag** has `title` and `path` attributes
4. **Strip VitePress frontmatter** (YAML `---` blocks) from inlined content
5. **Preserve Mermaid diagrams** — keep them as-is inside `<doc>` blocks
6. **Preserve citations** — all `[file:line](URL)` links stay intact
7. **Preserve tables** — all markdown tables stay intact
8. **Same section order** as `llms.txt`
9. **"Optional" section** — still present but readers/tools may skip it for context savings

## Step 4: Validate

After generating both files, verify:

1. **All links in `llms.txt` point to files that exist** in the wiki directory
2. **All `<doc>` blocks in `llms-full.txt` contain actual content** (not empty or placeholder)
3. **The blockquote summary is specific** to this project (not generic)
4. **Section ordering** matches: Onboarding → Architecture → Getting Started → Deep Dive → Optional
5. **No duplicate entries** — each wiki page appears in exactly one section
6. **File sizes are reasonable** — `llms.txt` should be 1-5 KB, `llms-full.txt` should contain all wiki pages

## Output

Generate three files:

```
./llms.txt                # Root-level discovery file (repo standard path)
wiki/
├── llms.txt              # Links + descriptions (for VitePress site)
└── llms-full.txt         # Full inlined content (comprehensive reference)
```

### Root `./llms.txt` (Discovery File)

The root `./llms.txt` is the **standard discovery location** per the llms.txt spec. Coding agents and tools (including the GitHub MCP server's `get_file_contents` and `search_code`) look for `/llms.txt` at the repository root. This file should be identical to `wiki/llms.txt` but with paths adjusted to point into the `wiki/` directory:

```markdown
- [{Page Title}](./wiki/onboarding/contributor-guide.md): Description
```

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

Report a summary:

```
## llms.txt Generation Report

- `./llms.txt` — Root discovery file, {N} sections, {M} linked pages
- `wiki/llms.txt` — {N} sections, {M} linked pages, {size} KB
- `wiki/llms-full.txt` — {N} sections, {M} inlined pages, {size} KB

### Sections
| Section | Pages | Notes |
|---------|-------|-------|
| Onboarding | 4 | All audience-tailored guides |
| Architecture | 3 | Core architecture pages |
| Getting Started | 2 | Setup and configuration |
| Deep Dive | {N} | Component documentation |
| Optional | {N} | Changelog, contributing |
```

$ARGUMENTS

© microsoft · MIT · microsoft/skills

Похожие слэш-команды

Все слэш-команды по теме «Тексты и документация» →
create-architecture-documentation davila7 Слэш-команда для Claude, которая собирает документацию по архитектуре проекта: диаграммы, ADR и описание компонентов. 6 136установок update-docs davila7 Слэш-команда проходит по specs/, CLAUDE.md и README.md, отмечает выполненное и обновляет проценты готовности проекта. 3 861установок revise-claude-md официальный Anthropic Команда анализирует текущую сессию и предлагает лаконичные дополнения для файлов CLAUDE.md или .claude.local.md. Пригодится, когда проект оброс новыми командами сборки. ★ 44 770звёзд репо create-prd davila7 Слэш-команда превращает идею фичи в документ требований: проблема, объём работ, метрики успеха и критерии приёмки. 2 431установок add-changelog davila7 Команда обновляет файл CHANGELOG.md по стандарту Keep a Changelog. Она считывает недавние коммиты через git и помогает подготовить описание релиза. 2 025установок generate-api-documentation davila7 Анализирует код эндпоинтов, находит аннотации и генерирует спецификации OpenAPI, Swagger UI или Redoc. Помогает настроить сборку документации API и шаги в CI/CD. 1 849установок

Из того же набора99

Весь набор →
slack-to-teams Разбирает существующий Slack-бот и помогает перевести его на Teams или сделать сразу под две платформы. Нужен, когда бот уже работает и его пора тянуть дальше. ★ 3 149звёзд репо install-atk Скилл проверяет работу CLI M365 Agents Toolkit и ставит расширение для VS Code. Пригодится, когда нужно развернуть ATK в проекте. ★ 3 149звёзд репо connect Субагент, который связывает один Prompt- или Hosted-агент с базой знаний в Microsoft Foundry, а при отсутствии агента может его создать. ★ 3 149звёзд репо research Проводит многошаговое исследование темы по кодовой базе: читает реальные пути выполнения и требует источник для каждого утверждения. ★ 3 149звёзд репо crisp Генерирует компактную wiki по репозиторию и сразу собирает сайт на VitePress. Пригодится, когда нужна документация, а ждать долгую сборку не хочется. ★ 3 149звёзд репо build Команда build из набора Deep Wiki упаковывает готовые markdown-страницы вики в проект VitePress. Тёмная тема, диаграммы Mermaid в тёмном режиме, зум по клику на картинки и схемы. ★ 3 149звёзд репо customize Ведёт по шагам через развёртывание модели Azure OpenAI: версия, SKU, ёмкость, политика RAI и дополнительные параметры. Пригодится, когда нужен точный контроль над конфигурацией. ★ 3 149звёзд репо finetuning Скилл ведёт дообучение моделей в Microsoft Foundry: подготовка датасета, запуск задания, деплой и оценка. Пригодится, когда базовое поведение модели не подходит. ★ 3 149звёзд репо

Спонсоры проекта

Компании, которые помогают держать аналитику открытой