home / skills / linehaul-ai / linehaulai-claude-marketplace / wiki-qa

This skill answers codebase questions by analyzing source files and citing exact locations to ground explanations.

npx playbooks add skill linehaul-ai/linehaulai-claude-marketplace --skill wiki-qa

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
2.2 KB
---
name: wiki-qa
description: 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.
---

# 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

Overview

This skill answers questions about a code repository by analyzing source files and returning evidence-backed explanations. Use it to explore how components work, find where symbols are defined, and get precise citations to the code. It focuses on Go projects and related tooling in the Claude Marketplace context.

How this skill works

Before producing any answer, it determines the repository context (remote URL vs local) and the active branch so citations reference the correct source. It searches the codebase for relevant files, extracts exact lines of evidence, and synthesizes concise explanations with inline citations to the source. Responses are grounded only in repository files and will request more files if evidence is missing.

When to use it

  • You ask "how does X work" for a component, function, or package.
  • You need the file and line where a symbol (type, function, constant) is defined.
  • You want a walkthrough of data flow or component interactions in the repo.
  • You need code-backed answers for code review, debugging, or onboarding.
  • You want precise citations (file:line or remote links) to include in documentation or PRs.

Best practices

  • Provide repository context up front: indicate if the repo has a remote URL or is local-only.
  • Point to a specific file, symbol name, or code region when possible to speed retrieval.
  • Allow the skill to run the initial repo-detection steps so citations are accurate.
  • If the answer seems incomplete, grant access to additional files or file paths to inspect.
  • Expect answers strictly tied to repository contents; the skill will not guess beyond available files.

Example use cases

  • "Where is the command dispatcher implemented and how does it register handlers?" — returns exact file and lines with explanation.
  • "How does the plugin hook system pass data between subagents?" — extracts relevant functions and illustrates flow with citations.
  • "Show me where the Claude integration credentials are loaded." — finds config parsing and cites lines.
  • "Explain the build or CI config that affects the Go modules in this repo." — maps files and key lines with recommendations.

FAQ

What if the repository is local and has no remote URL?

I will use local-file citations (file_path:line_number) and ask you to confirm the repo is local-only so linked references remain accurate.

What languages does this skill support?

It detects the language of your question and responds in that language; the primary analysis is optimized for Go code in this repo context.