Wiki Qa

作者 microsoft354361d83247MIT收錄於 2026年10月8日更新於 2026年10月8日

Answers questions about a code repository using source file analysis. Use when the user asks a question about how something works, wants to understand a component, or needs help navigating the codebase.

AI 產生的概覽

依據原始碼證據回答程式碼倉庫相關問題,並附上行內引用。

功能
此技能引導代理透過搜尋與閱讀原始碼檔案來回答程式碼庫相關問題,並綜整出有證據支撐的答案。它會先確認倉庫脈絡(git 遠端或僅本機),以決定引用格式,再以提問所用語言作答,使用標題、表格、程式碼區塊,並在涉及架構或資料流時至少包含一個 Mermaid 圖。產出為附檔案與行號行內引用的說明性答案及關鍵檔案表,並在證據不足時明確說明。
適用情境
當使用者詢問倉庫中某處如何運作、想了解某個檔案、函式或元件,或需要協助瀏覽程式碼庫時使用。適合「某功能如何運作」或「某定義在哪裡」這類問題。
執行需求
需要存取目標倉庫的原始碼檔案,並能執行 git 指令,例如 git remote get-url origin 與 git rev-parse --abbrev-ref HEAD。此技能不隨附指令碼,僅為指示。倉庫 URL 為選用,僅本機倉庫可以本機引用方式支援。

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

來源與署名

來源:microsoft/skills位於.github/plugins/deep-wiki/skills/wiki-qa提交354361d

授權條款: MIT

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架