wiki-llms-txt
microsoft/skills
根據 llms.txt 規格,產生 llms.txt 和 llms-full.txt 檔案,讓大型語言模型能以適宜的方式存取維基文件。
...展開全部llms.txt 產生器
產生 llms.txt 並 llms-full.txt 符合 llms.txt 規格的檔案,讓大型語言模型(LLM)能便捷地存取維基文件。
當此技能被觸發時
- 使用者要求生成
llms.txt或提及 llms.txt 標準 - 使用者希望將文件設定為「LLM 友善」或「LLM 可讀」
- 使用者要求為語言模型生成專案摘要檔案
- 使用者提及
llms-full.txt或提及「語境擴展型文件」
原始碼儲存庫解析(必須優先處理)
在生成之前,請先解析來源儲存庫的上下文:
- 檢查是否存在 git remote:執行
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
所有檔案
0 個檔案安裝 wiki-llms-txt
請下載並將技能檔案解壓縮至您的 .claude/skills/ 目錄中。
下載 ZIP複製儲存庫並將技能檔案複製到您的專案中。
git clone https://github.com/microsoft/skills/tree/main/.github/plugins/deep-wiki/skills/wiki-llms-txt # Copy SKILL.md to your .claude/skills/ directory
複製





首頁
