Get the FREE Ultimate OpenClaw Setup Guide →

wiki-qa

npx machina-cli add skill microsoft/skills/wiki-qa --openclaw
Files (1)
SKILL.md
2.2 KB

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

Source

git clone https://github.com/microsoft/skills/blob/main/.github/plugins/deep-wiki/skills/wiki-qa/SKILL.mdView on GitHub

Overview

Wiki Q&A answers questions about a code repository using source file analysis. It provides clear, evidence-backed explanations of how components work and helps you navigate the codebase by citing exact lines from source files. All responses are grounded strictly in the repository’s code.

How This Skill Works

It first resolves the source repo context (remote vs local), detects the language of the question, then searches and reads relevant files to gather evidence. Finally, it synthesizes an answer with inline citations formatted for either a remote URL or local path, so responses stay strictly within the codebase evidence.

When to Use It

  • User asks a question about the codebase
  • User wants to understand a specific file, function, or component
  • User asks how something works or where a symbol is defined
  • User needs help navigating the codebase or tracing a data/file flow
  • User requires evidence-backed answers using only source files

Quick Start

  1. Step 1: Determine if a remote repository URL exists or if you’re working locally
  2. Step 2: Identify the default branch and gather source files relevant to your question
  3. Step 3: Read the files, synthesize an evidence-backed answer, and include inline citations

Best Practices

  • Always resolve the source repository context (remote vs local) before answering
  • Use linked citations for remote repos and local citations for local-only work
  • Read relevant files and cite precise lines to support every claim
  • If evidence is ambiguous, state the uncertainty and point to candidate files
  • Use Mermaid diagrams for architecture, data flow, or relationships to improve understanding

Example Use Cases

  • Explain how a feature is initialized by tracing the initialization path across modules and citing the exact lines where it happens
  • Locate the implementation of a function and show its call sites with file/line citations
  • Describe the data flow from API surface to persistence with step-by-step references to relevant files
  • Trace a bug from symptom to root cause by linking to the implicated code locations
  • Map the subsystem architecture using a Mermaid diagram with file-level citations

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers