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 从公开仓库中收录这些内容。

举报或申请下架