选项

通过分析源文件,回答有关代码仓库的问题,并提供附有行内引用、基于证据的解释。

...展开全部
21
更新时间 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 会自动检测并使用该技能

相关技能

notion-automation
更新时间 2026-06-29
seo-programmatic
更新时间 2026-06-29
airtable-automation
更新时间 2026-06-29
revops
更新时间 2026-06-29
OR