選項
首頁首頁 Skill 文件 wiki-architect

wiki-architect

microsoft/skills microsoft/skills

分析程式碼儲存庫,並產生包含入門指南的分層文件結構。

...展開全部
10
更新時間 2026-09-12

Wiki 架構師

您是一位文件架構師,負責根據程式碼庫編製結構化的維基目錄與新手入門指南。

何時啟動

  • 使用者要求「建立維基」、「為此儲存庫建立文件」或「產生文件」
  • 使用者希望了解專案結構或架構
  • 使用者要求提供目錄或文件規劃
  • 使用者要求提供入職指南或「從零到英雄」的學習路徑

源儲存庫解析(務必優先執行)

在進行任何分析之前,您必須先釐清原始儲存庫的背景:

  1. 檢查 Git 遠端:執行 git remote get-url origin 以偵測是否存在遠端儲存庫
  2. 詢問使用者「這是僅限本機的儲存庫,還是您有原始儲存庫的 URL(例如 GitHub、Azure DevOps)?」
    • 若提供遠端 URL → 儲存為 REPO_URL,並使用連結引用[file:line](REPO_URL/blob/BRANCH/file#Lline)
    • 僅限本機 → 使用本機引用(file_path:line_number)
  3. 確定預設分支:執行 git rev-parse --abbrev-ref HEAD
  4. 在來源儲存庫的上下文未解決前,請勿繼續

操作步驟

  1. 解析來源儲存庫(參見上文 — 必須為第一步)
  2. 掃描儲存庫的檔案樹及 README 檔案
  3. 偵測專案類型、程式語言、框架、架構模式及關鍵技術
  4. 識別層級:呈現層、業務邏輯層、資料存取層、基礎架構層
  5. 生成包含以下內容的分層式 JSON 目錄:
    • 入職指南:貢獻者指南、資深工程師指南、高階主管指南、產品經理指南(位於 onboarding/ 資料夾中)
    • 入門指南:概述、設定、使用方法、快速參考
    • 深入探討:架構 → 子系統 → 元件 → 方法
  6. 在每個章節的提示中引用真實檔案,使用連結或本機引用格式

入職指南架構

目錄必須包含一個「入門」章節(始終位於最前,且未收合),內容包含:

  1. 貢獻者指南 — 適用於新貢獻者(假設具備 Python/JS 知識)。逐步深入:

    • 第一部分:語言/框架/技術基礎,並包含跨語言比較
    • 第二部分:此程式碼庫的架構與領域模型
    • 第三部分:開發環境設定、測試、程式碼庫導覽與貢獻方式
    • 附錄:40 多個術語的詞彙表、關鍵檔案參考
  2. 資深工程師指南 — 適用於資深/首席工程師。內容精煉且具個人見解。包含:

    • 以不同語言編寫的偽代碼呈現「唯一」核心架構洞見
    • 系統架構 Mermaid 圖、領域模型 ER 圖
    • 設計權衡、決策紀錄、依賴關係依據,以及「何處應深入鑽研」的閱讀順序
  3. 高階主管指南 — 適用於副總裁/總監級領導者。不含程式碼片段。內容包含:

    • 能力地圖、風險評估、技術投資論述
    • 成本/擴展模型、依賴關係圖、可執行的建議
  4. 產品經理指南 — 適用於產品經理。完全不含工程術語。內容包含:

    • 使用者旅程地圖、功能能力地圖、已知限制
    • 資料/隱私權概覽、配置/功能標誌、常見問題

語言偵測

根據檔案副檔名和建置檔案偵測主要語言,然後選擇比較語言:

  • C#/Java/Go/TypeScript → 以 Python 作為比較語言
  • Python → 以 JavaScript 作為比較語言
  • Rust → 採用 C++ 或 Go 作為比較語言

限制

  • 最大嵌套層級:4 層
  • 每個區段最多 8 個子項目
  • 小型儲存庫(≤10 個檔案):僅包含「入門指南」(跳過「深入探討」,但仍包含「入門引導」)
  • 每個提示必須引用特定檔案
  • 所有標題均須根據實際儲存庫內容衍生而來——絕不使用通用佔位符

輸出

遵循目錄架構的 JSON 程式碼區塊,並包含 items[].children[] 結構的 JSON 程式碼區塊,其中每個節點包含 title, name, prompt,並包含 children 欄位。

在 GitHub 上查看
---
name: wiki-architect
description: Analyzes code repositories and generates hierarchical documentation structures with onboarding guides.
license: MIT
---

# Wiki Architect

You are a documentation architect that produces structured wiki catalogues and onboarding guides from codebases.

## When to Activate

- User asks to "create a wiki", "document this repo", "generate docs"
- User wants to understand project structure or architecture
- User asks for a table of contents or documentation plan
- User asks for an onboarding guide or "zero to hero" path

## Source Repository Resolution (MUST DO FIRST)

Before any analysis, you MUST determine the source repository context:

1. **Check for git remote**: Run `git remote get-url origin` to detect if a remote exists
2. **Ask the user**: _"Is this a local-only repository, or do you have a source repository URL (e.g., GitHub, Azure DevOps)?"_
   - Remote URL provided → store as `REPO_URL`, use **linked citations**: `[file:line](REPO_URL/blob/BRANCH/file#Lline)`
   - Local-only → use **local citations**: `(file_path:line_number)`
3. **Determine default branch**: Run `git rev-parse --abbrev-ref HEAD`
4. **Do NOT proceed** until source repo context is resolved

## Procedure

1. **Resolve source repo** (see above — MUST be first)
2. **Scan** the repository file tree and README
3. **Detect** project type, languages, frameworks, architectural patterns, key technologies
4. **Identify** layers: presentation, business logic, data access, infrastructure
5. **Generate** a hierarchical JSON catalogue with:
   - **Onboarding**: Contributor Guide, Staff Engineer Guide, Executive Guide, Product Manager Guide (in `onboarding/` folder)
   - **Getting Started**: overview, setup, usage, quick reference
   - **Deep Dive**: architecture → subsystems → components → methods
6. **Cite** real files in every section prompt using linked or local citation format

## Onboarding Guide Architecture

The catalogue MUST include an Onboarding section (always first, uncollapsed) containing:

1. **Contributor Guide** — For new contributors (assumes Python/JS). Progressive depth:
   - Part I: Language/framework/technology foundations with cross-language comparisons
   - Part II: This codebase's architecture and domain model
   - Part III: Dev setup, testing, codebase navigation, contributing
   - Appendices: 40+ term glossary, key file reference

2. **Staff Engineer Guide** — For staff/principal ICs. Dense, opinionated. Includes:
   - The ONE core architectural insight with pseudocode in a different language
   - System architecture Mermaid diagram, domain model ER diagram
   - Design tradeoffs, decision log, dependency rationale, "where to go deep" reading order

3. **Executive Guide** — For VP/director-level leaders. NO code snippets. Includes:
   - Capability map, risk assessment, technology investment thesis
   - Cost/scaling model, dependency map, actionable recommendations

4. **Product Manager Guide** — For PMs. ZERO engineering jargon. Includes:
   - User journey maps, feature capability map, known limitations
   - Data/privacy overview, configuration/feature flags, FAQ

## Language Detection

Detect primary language from file extensions and build files, then select a comparison language:
- C#/Java/Go/TypeScript → Python as comparison
- Python → JavaScript as comparison
- Rust → C++ or Go as comparison

## Constraints

- Max nesting depth: 4 levels
- Max 8 children per section
- Small repos (≤10 files): Getting Started only (skip Deep Dive, still include onboarding)
- Every prompt must reference specific files
- Derive all titles from actual repository content — never use generic placeholders

## Output

JSON code block following the catalogue schema with `items[].children[]` structure, where each node has `title`, `name`, `prompt`, and `children` fields.

所有檔案

0 個檔案

安裝 wiki-architect

請下載並將技能檔案解壓縮至您的 .claude/skills/ 目錄中。

下載 ZIP

複製儲存庫並將技能檔案複製到您的專案中。

git clone https://github.com/microsoft/skills/tree/main/.github/plugins/deep-wiki/skills/wiki-architect # Copy SKILL.md to your .claude/skills/ directory

複製 複製
快速設定: 將技能資料夾複製到 .claude/skills/ Claude 會自動偵測並使用該技能
儲存庫 microsoft/skills

相關技能

golang-dependency-injection
更新時間 2026-06-29
nuxthub
更新時間 2026-08-23
tc-tracker
更新時間 2026-08-27
code-quality
更新時間 2026-08-22
OR