選項

透過分析原始碼檔案,針對程式碼儲存庫相關的問題提供解答,並附上內嵌引用以提供有根據的解釋。

...展開全部
19
更新時間 2026-09-11

維基問答

回答完全基於原始碼證據的儲存庫問題。

何時啟用

  • 使用者針對程式碼庫提出問題
  • 使用者希望了解特定的檔案、函式或元件
  • 使用者詢問「X 是如何運作的」或「Y 是定義在哪裡」

原始碼儲存庫的解析(必須優先執行)

在回答任何問題之前,您必須先確定原始儲存庫的背景:

  1. 檢查 git remote:執行 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. 偵測問題的語言;以相同語言回應
  3. 在程式碼庫中搜尋相關檔案
  4. 讀取這些檔案以蒐集證據
  5. 綜合生成答案,並在文中加入引用連結

回應格式

  • 使用 ## 標題、帶有語言標籤的程式碼區塊、表格、項目符號清單
  • 使用已解析格式在文中引用來源:
    • 遠端[src/path/file.ts:42](REPO_URL/blob/BRANCH/src/path/file.ts#L42)
    • 本地(src/path/file.ts:42)
  • 包含一個「關鍵檔案」表格,將檔案與其角色對應起來(並在「檔案」欄位中加入連結至引用來源的連結)
  • 若答案涉及架構、資料流或關聯性,請至少包含 1 張 Mermaid 圖表——圖表能使答案的實用性提升 10 倍
  • 若答案中包含任何結構化資料(元件清單、API 端點、設定選項、比較資料等),請使用表格呈現
  • 若資訊不足,請明確說明並建議查閱相關檔案

規則

  • 僅使用來自實際原始檔案的資訊
  • 絕不可杜撰、猜測或使用外部知識
  • 回答前請逐一思考各步驟
在 GitHub 上查看
---
name: wiki-qa
description: Answers questions about a code repository by analyzing source files, providing evidence-based explanations with inline citations.
license: MIT
---

# Wiki Q&A

Answer repository questions grounded entirely in source code evidence.

## When to Activate

- User asks a question about the codebase
- User wants to understand a specific file, function, or component
- User asks "how does X work" or "where is Y defined"

## Source Repository Resolution (MUST DO FIRST)

Before answering any question, 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 context (see above)
2. Detect the language of the question; respond in the same language
3. Search the codebase for relevant files
4. Read those files to gather evidence
5. Synthesize an answer with inline linked citations

## Response Format

- Use `##` headings, code blocks with language tags, tables, bullet lists
- Cite sources inline using resolved format:
  - **Remote**: `[src/path/file.ts:42](REPO_URL/blob/BRANCH/src/path/file.ts#L42)`
  - **Local**: `(src/path/file.ts:42)`
- Include a "Key Files" table mapping files to their roles (with linked citations in the "File" column)
- **Include at least 1 Mermaid diagram** when the answer involves architecture, data flow, or relationships — a diagram makes the answer 10x more useful
- **Use tables** for any structured data in the answer (component lists, API endpoints, config options, comparisons)
- If information is insufficient, say so and suggest files to examine

## Rules

- ONLY use information from actual source files
- NEVER invent, guess, or use external knowledge
- Think step by step before answering

所有檔案

0 個檔案

安裝 wiki-qa

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

下載 ZIP

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

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

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

相關技能

notion-automation
更新時間 2026-06-29
airtable-automation
更新時間 2026-06-29
seo-programmatic
更新時間 2026-06-29
fairdb-backup-manager
更新時間 2026-06-29
OR