wiki-llms-txt
microsoft/skills
生成 llms.txt 和 llms-full.txt 文件,这些文件遵循 llms.txt 规范,为大型语言模型(LLM)提供了访问维基文档的便捷途径。
...展开全部llms.txt 生成器
生成 llms.txt 并 llms-full.txt 文件,这些文件遵循 llms.txt 规范,为大型语言模型(LLM)提供对维基文档的友好访问。
当此技能被触发时
- 用户请求生成
llms.txt或提及 llms.txt 标准 - 用户希望将文档制作成“LLM友好型”或“LLM可读型”
- 用户请求为语言模型生成项目摘要文件
- 用户提及
llms-full.txt或提及上下文扩展文档
源代码仓库解析(必须首先执行)
生成前,请解析源代码仓库上下文:
- 检查是否存在 git 远程仓库:运行
git remote get-url origin - 询问用户:“这是仅限本地的仓库,还是您有源仓库的 URL?”
- 远程 URL → 存储为
REPO_URL - 本地 → 仅使用相对路径
- 远程 URL → 存储为
- 确定默认分支:运行
git rev-parse --abbrev-ref HEAD - 在问题解决前请勿继续
llms.txt 格式(符合规范)
该文件遵循 llms.txt 规范:
# {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}
关键规则
- H1 — 项目名称(仅限一个,必填)
- Blockquote — 简明扼要、具体的摘要(必填)。必须是本项目的专属内容。
- 背景段落 — 非显而易见的限制条件,即若不明确告知,大型语言模型(LLMs)可能会出错的内容
- H2章节 — 按主题分类,每个章节包含一组
[Title](url): Description条目列表 - “可选”H2 — 特殊含义:此处的链接可被跳过以缩短上下文
- 相对链接 — 所有路径均相对于维基目录
- 动态内容 — 所有内容均源自实际维基页面,而非模板
- 章节顺序 — 最重要的放在最前面:入门指南 → 架构 → 开始使用 → 深入解析 → 可选
描述质量
| ❌ 差 | ✅ 良好 |
|---|---|
| “架构概述” | “系统架构图,展示了Orleans粒子如何通过消息传递进行通信,并实现至少一次送达” |
| “入门指南” | “先决条件、使用 Docker Compose 进行本地开发环境配置,以及首次 API 调用操作指南” |
| “API 参考手册” | “包含身份验证要求、速率限制以及请求/响应模式的 REST 端点” |
llms-full.txt 格式
结构与 llms.txt 但内联了完整内容:
# {Project Name}
> {Same summary}
{Same context}
## {Section Name}
{Full markdown content — frontmatter stripped, citations and diagrams preserved}
内联规则
- 去除 YAML 前置信息(
---块) - 保留 Mermaid 图表——保持
```mermaid围栏结构 - 保留引用——所有
[file:line](URL)链接保持原样 - 保留表格——所有 Markdown 表格保持原样
- 保留
注释——这些注释提供了图的来源信息
先决条件
当维基页面已存在时(通过 /deep-wiki:generate 或 /deep-wiki:page)。如果尚未创建维基页面:
- 建议运行
/deep-wiki:generate先 - 或者生成一份简化的
llms.txt(基于 README 和源代码扫描结果生成,不含维基页面链接)
输出文件
生成三个文件:
| 文件 | 用途 | 可发现性 |
|---|---|---|
./llms.txt |
根发现文件 | 符合 llms.txt 规范的标准路径。GitHub MCP get_file_contents 以及 search_code 请先查找此文件。 |
wiki/llms.txt |
Wiki 相对链接 | 用于 VitePress 部署和维基内部导航。 |
wiki/llms-full.txt |
完整的内联内容 | 面向需要将所有文档整合到一个文件中的代理的综合参考。 |
根 ./llms.txt 链接至 wiki/ (例如, [Guide](./wiki/onboarding/contributor-guide.md))。 wiki/llms.txt 使用维基相对路径(例如 [Guide](./onboarding/contributor-guide.md)).
如果根目录 llms.txt 目录已存在且并非由 deep-wiki 生成,请勿覆盖它。
验证清单
在最终确定之前:
- 所有被链接的文件
llms.txt确实存在 - 所有
块中llms-full.txt中的所有块都包含实际内容(非空) - 引用块是本项目专有的(而非通用的模板内容)
- 各章节按重要性排序
- 各章节间不存在重复的页面条目
- “可选”部分仅包含真正可选的内容
-
llms.txt内容简洁(1-5 KB) -
llms-full.txt包含所有维基页面
---
name: wiki-llms-txt
description: Generates llms.txt and llms-full.txt files that provide LLM-friendly access to wiki documentation, following the llms.txt specification.
license: MIT
---
# 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





首页
