Agent skill

Codebase Research Questions

by Wirasm in Wirasm/prp

Answers where and how questions about a codebase with parallel research agents and a write-up where every claim cites a file and line, describing only what exists.

MITAuto-check passedDevelopment

Install Codebase Research Questions

skills CLI
$ npx skills add Wirasm/prp --skill prp-codebase-question -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Wirasm/prp prp-codebase-question --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Wirasm/prp.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/prp-codebase-question .claude/skills/prp-codebase-question && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
prp-codebase-question
GitHub stars
2.3k
Token cost
~2.8k tokens
SKILL.md length
788 words
Files
1
Skills in repo
37
Repo updated
First seen
Licence
MIT

At a glance

Answers where and how questions about a codebase with parallel research agents and a write-up where every claim cites a file and line, describing only what exists.

  • Works in 6 steps: PARSE - Understand the Query → DECOMPOSE - Break into Research Areas → EXPLORE - Spawn Parallel Agents → …
  • Asking how a part of an unfamiliar codebase works
  • SKILL.md covers Your Mission, CRITICAL: Documentarian Only, Phase 1: PARSE - Understand… and Phase 2: DECOMPOSE - Break…, plus 7 more sections
  • Calls git and gh; reaches github.com

What it does

The agent plays technical cartographer. It reads any files you mention in full, classifies the question as where, how, what, pattern or external, and splits it into two to five research areas. Parallel agents then investigate: a codebase-explorer to locate code and conventions, a codebase-analyst to trace how things flow, and a web-researcher when outside documentation matters. The findings are merged into a research document.

Its governing rule is to document what is, not what should be. Every claim needs a `file:line` reference, and the agent must not suggest improvements, critique implementations, run root cause analysis unless asked, or recommend refactoring. The `--web` flag adds external research and `--follow-up` appends to an existing research document. The excerpt is cut off before the output format.

When your agent uses it

  • Asking how a part of an unfamiliar codebase works
  • Locating where a feature, route or setting lives
  • Finding the conventions used for something such as error handling
  • Documenting current behavior before planning a change

Example prompts

  • “How does the checkout flow work in this repo? Cite file and line for each step.”
  • “Where do we define the rate limiting rules?”
  • “$prp-codebase-question how are background jobs retried --web”
  • “Explain how the authentication middleware connects to the session store.”

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. PARSE - Understand the Query
  2. DECOMPOSE - Break into Research Areas
  3. EXPLORE - Spawn Parallel Agents
  4. SYNTHESIZE - Merge Findings
  5. DOCUMENT - Generate Research File
  6. OUTPUT - Present to User

What it can do on your machine

Read from SKILL.md and the folder at commit 4352925. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • gh

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Codebase Research Questions loads about 2.8k tokens when it runs. Until then it costs about 56 tokens; SKILL.md has 788 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~56
When it runs · the whole SKILL.md, loaded when a task matches
~2.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Wirasm/prp at commit 4352925, republished under its MIT licence (© Wirasm). 788 words, ~2,793 tokens.

Download SKILL.mdSave it as .claude/skills/prp-codebase-question/SKILL.md (or your agent's skills folder).
name
prp-codebase-question
description
Research codebase questions using parallel agents - documents what exists, not what should change. Use when the user asks how the codebase works, where something lives, or invokes $prp-codebase-question.

Arguments: $ARGUMENTS (and $1, $2, ...) refer to the arguments given when this skill was invoked. Take them from the user's request; if absent, infer them from the conversation.

Codebase Research

Input: $ARGUMENTS


Your Mission

Answer codebase questions thoroughly by spawning parallel specialized agents, synthesizing their findings, and producing a research document.

Core Philosophy: Document what IS, not what SHOULD BE. You are a technical cartographer.

Golden Rule: Every claim must have a file:line reference. No speculation, no suggestions, no critique.


CRITICAL: Documentarian Only

  • DO NOT suggest improvements or changes
  • DO NOT perform root cause analysis unless explicitly asked
  • DO NOT propose future enhancements
  • DO NOT critique implementations or identify problems
  • DO NOT recommend refactoring or optimization
  • ONLY describe what exists, where it exists, how it works, and how components interact

Phase 1: PARSE - Understand the Query

1.1 Read Mentioned Files

If the user mentions specific files, read them FULLY first (no limit/offset) before any decomposition.

1.2 Classify the Query
TypeIndicatorsAgent Focus
Where"where is", "find", "locate"codebase-explorer primary
How"how does", "trace", "flow"codebase-analyst primary
What"what is", "explain", "describe"Both agents in parallel
Pattern"how do we", "convention", "examples"codebase-explorer primary
External"docs", "best practice", "API"Add web-researcher
1.3 Determine Scope
  • Identify specific components, patterns, or concepts to investigate
  • Note any --web flag for external research
  • Note any --follow-up flag for appending to existing research

PHASE_1_CHECKPOINT:

  • Mentioned files read in full
  • Query type classified
  • Research scope identified
  • Flags parsed (--web, --follow-up)

Phase 2: DECOMPOSE - Break into Research Areas

2.1 Create Research Plan

Break the query into 2-5 composable research areas:

RESEARCH QUESTION: {user's question}

AREAS:
1. {Area} → Agent: {which agent}
2. {Area} → Agent: {which agent}
3. {Area} → Agent: {which agent}
2.2 Agent Selection
AgentUse When
codebase-explorerFinding WHERE code lives, locating files, extracting patterns, discovering conventions
codebase-analystUnderstanding HOW code works, tracing data flow, mapping integration points
web-researcherOnly when --web flag is set or user explicitly asks for external docs

Strategy:

  1. Start with codebase-explorer to find what exists
  2. Then use codebase-analyst on the most relevant findings to trace how they work
  3. Run agents in parallel when they're searching for different areas

PHASE_2_CHECKPOINT:

  • Query decomposed into 2-5 research areas
  • Agent assigned to each area
  • Parallel vs sequential execution planned

Phase 3: EXPLORE - Spawn Parallel Agents

3.1 Launch Codebase Agents

Launch agents in parallel by spawning them as subagents in one step.

For each research area, use the appropriate agent:

codebase-explorer:

Find all code relevant to: {research area}

LOCATE:
1. {Specific files/components to find}
2. {Patterns or conventions to extract}
3. {Related test files and configuration}

Categorize findings by purpose. Return ACTUAL code snippets with file:line references.
Remember: Document what exists, no suggestions or improvements.

codebase-analyst:

Analyze the implementation of: {research area}

TRACE:
1. {Data flow to trace}
2. {Integration points to document}
3. {Contracts between components}

Document what exists with precise file:line references. No suggestions.
3.2 Launch Web Research (if --web or explicitly requested)

web-researcher:

Research external documentation for: {topic}

FIND:
1. {Specific documentation needed}
2. {API references or patterns}

Return findings with direct links and citations.
3.3 Wait for All Agents

IMPORTANT: Wait for ALL agents to complete before proceeding.

PHASE_3_CHECKPOINT:

  • All agents launched (parallel where possible)
  • All agents completed
  • Results collected from each agent

Phase 4: SYNTHESIZE - Merge Findings

4.1 Compile Results
  • Prioritize live codebase findings as primary source of truth
  • Connect findings across different components
  • Include specific file:line references throughout
  • Document patterns, connections, and architectural decisions as they exist
Show full SKILL.md (325 more words)Show less
4.2 Answer the Question

Map findings back to the user's original question:

Question AspectFindingEvidence
{aspect 1}{what was found}file.ts:123
{aspect 2}{what was found}file.ts:456
4.3 Identify Gaps

Note any areas that couldn't be fully documented:

  • {Area that needs further investigation}
  • {Question that remains open}

PHASE_4_CHECKPOINT:

  • All agent results synthesized
  • Findings connected across components
  • Original question answered with evidence
  • Gaps identified

Phase 5: DOCUMENT - Generate Research File

5.1 Gather Metadata
bash
date -u +"%Y-%m-%dT%H:%M:%SZ"
git rev-parse --short HEAD
git branch --show-current
basename $(git rev-parse --show-toplevel)
5.2 Create Research Directory
bash
# --- PRP store resolver (canonical; keep byte-identical across skills) ---
# Adopt the store that already records this root; mint a key only when none does.
_gd="$(git rev-parse --path-format=absolute --git-common-dir 2>/dev/null)"
case "$_gd" in */.git) _root="${_gd%/.git}" ;; "") _root="$PWD" ;; *) _root="$_gd" ;; esac
_root="$(cd "$_root" && pwd -P)"
_name="$(basename "$_root" | tr '[:upper:]' '[:lower:]' | tr -cs 'a-z0-9' '-' | sed 's/^-*//;s/-*$//')"
_home="${PRP_HOME:-$HOME/.prp}"
_hit="$(grep -lsF "\"path\": \"$_root\"" "$_home"/*/project.json 2>/dev/null | head -1)"
PRP_DIR="${_hit%/project.json}"
[ -n "$PRP_DIR" ] || PRP_DIR="$_home/${_name:-project}-$(printf %s "$_root" | git hash-object --stdin | cut -c1-8)"
mkdir -p "$PRP_DIR"; [ -f "$PRP_DIR/project.json" ] || printf '{"path": "%s", "name": "%s"}\n' "$_root" "${_name:-project}" > "$PRP_DIR/project.json"
mkdir -p "$PRP_DIR/research"
5.3 Determine Filename

If --follow-up: Append to existing research file instead of creating new one.

If new research:

Path: $PRP_DIR/research/{YYYY-MM-DD}-{kebab-case-topic}.md

Examples:

  • 2025-01-08-authentication-flow.md
  • 2025-01-15-database-migration-patterns.md
5.4 Write Research Document
markdown
---
date: {ISO timestamp with timezone}
git_commit: {short hash}
branch: {branch name}
repository: {repo name}
topic: "{User's Question/Topic}"
tags: [research, codebase, {relevant-component-names}]
status: complete
last_updated: {YYYY-MM-DD}
---

# Research: {User's Question/Topic}

**Date**: {ISO timestamp}
**Git Commit**: {short hash}
**Branch**: {branch name}
**Repository**: {repo name}

## Research Question

{Original user query}

## Summary

{High-level documentation of what was found, answering the question by describing what exists}

## Detailed Findings

### {Component/Area 1}

- Description of what exists (`file.ts:123`)
- How it connects to other components
- Current implementation details

### {Component/Area 2}

...

## Code References

| File | Lines | Description |
|------|-------|-------------|
| `path/to/file.ts` | 123-145 | {What's there} |
| `another/file.ts` | 45-67 | {What's there} |

## Architecture Documentation

{Current patterns, conventions, and design implementations found}

## Open Questions

- {Areas that need further investigation}
bash
# Check if on main or pushed
git branch --show-current
gh repo view --json owner,name -q '"\(.owner.login)/\(.name)"'

If on main/pushed, replace local file references with: https://github.com/{owner}/{repo}/blob/{commit}/{file}#L{line}

5.6 Handle Follow-ups

If --follow-up flag and existing research file:

  1. Read the existing research file
  2. Update frontmatter: last_updated and add last_updated_note
  3. Append new section: ## Follow-up Research {timestamp}
  4. Spawn new agents as needed
  5. Save updated document

PHASE_5_CHECKPOINT:

  • Metadata gathered
  • Research file created (or existing file updated for follow-up)
  • All sections filled with evidence-based content
  • GitHub permalinks added (if applicable)
  • No placeholder values remain

Phase 6: OUTPUT - Present to User

markdown
## Research Complete

**Question**: {original question}
**Document**: `{expanded absolute path to $PRP_DIR/research/{filename}.md}`

### Summary

{2-3 sentence answer to the question}

### Key Findings

- **{Finding 1}**: {brief} (`file.ts:123`)
- **{Finding 2}**: {brief} (`file.ts:456`)
- **{Finding 3}**: {brief} (`file.ts:789`)

### Architecture

{1-2 sentence description of relevant architecture}

### Open Questions

- {Any unanswered aspects}

### Follow-up

To dig deeper: `$prp-codebase-question --follow-up {topic}`
To include external docs: `$prp-codebase-question --web {topic}`

Usage Examples

bash
# Basic codebase question
$prp-codebase-question how does authentication work

# Include external documentation
$prp-codebase-question --web how does the PRP runner execute commands

# Follow up on previous research
$prp-codebase-question --follow-up what error handling patterns exist in the runner

# Locate and document a specific area
$prp-codebase-question where are all the command templates and how are they structured

Critical Reminders

  1. Document, don't evaluate. Describe what IS, never what SHOULD BE.

  2. Evidence required. Every claim needs a file:line reference.

  3. Agents are parallel. Launch multiple agents simultaneously when researching different areas.

  4. Wait for completion. Never synthesize until ALL agents have returned.

  5. Read first. If the user mentions files, read them fully before spawning agents.

  6. No placeholders. Every field in the research document must have real values.

  7. Codebase is truth. Live code always overrides documentation or assumptions.


Success Criteria

  • QUESTION_ANSWERED: User's question addressed with concrete evidence
  • AGENTS_USED: Specialized agents spawned for each research area
  • EVIDENCE_COMPLETE: Every finding has file:line references
  • DOCUMENT_CREATED: Research file saved at {expanded absolute path to $PRP_DIR/research/}
  • NO_OPINIONS: Document describes what exists, not what should change
  • PERMALINKS_ADDED: GitHub links included when possible

© Wirasm, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/prp-codebase-question of Wirasm/prp.

Open the folder on GitHubat commit 4352925

Compare with similar skills

Codebase Research Questions next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Codebase Research Questions compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Codebase Research Questions this skillWirasm/prp2.3k—~2.8kAutomated safety check: PassMIT
How Does This Work Explainercursor/plugins10k6 repos~771Automated safety check: PassNone
Codebase Exploreryologdev/yoyo-evolve1.9k—~2.8kAutomated safety check: PassMIT
Caveman Repository ExplorerJuliusBrussee/caveman110k1 repos~492Automated safety check: PassApache-2.0
Init Deep AGENTS.md Generatorcode-yeongyu/oh-my-openagent70k—~3.5kAutomated safety check: PassCustom licence
Hk Follow Breadcrumbdeepklarity/harness-kit100—~1.4kAutomated safety check: NotesMIT

Similar skills

  • Official

    Answers how-does-this-work and where-should-this-live questions by exploring the codebase with read-only subagents and writing an onboarding-depth explanation.

    10k GitHub starsUsed in 6 repos~771 tokens
    DevelopmentAuto-check passed
  • Codebase Explorer

    yologdev/yoyo-evolve

    Builds a structural map of a large or unfamiliar codebase by dispatching sub-agents to summarize regions, keeping the main context small.

    1.9k GitHub stars~2.8k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Caveman Repository Explorer

    JuliusBrussee/caveman

    A read-only explorer for cold-start orientation or failed searches that replies with nothing but file path and line range citations, keeping its reads out of main context.

    110k GitHub starsUsed in 1 repo~492 tokens
    Agent WorkflowsAuto-check passed
  • Init Deep AGENTS.md Generator

    code-yeongyu/oh-my-openagent

    Generates a tree of AGENTS.md files for a repository, one at the root and more in complex subdirectories, so agents learn its structure and conventions.

    70k GitHub stars~3.5k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Hk Follow Breadcrumb

    deepklarity/harness-kit

    Consults existing breadcrumb analysis docs before exploring the codebase.

    100 GitHub stars~1.4k tokensUpdated 2 mo ago
    DevelopmentAuto-check: notes
  • Codebase Onboarding

    spencerpauly/awesome-cursor-skills

    Launch multiple explore subagents in parallel to investigate architecture, data models, auth, APIs, and deployment.

    841 GitHub stars~653 tokensUpdated 2 mo ago
    DevelopmentAuto-check: notes

More from Wirasm/prp

All 37 skills in this repo
  • PRP Loop

    Wirasm/prp

    Runs the plan, implement and review pipeline detached in fresh headless sessions, looping review and fix until the pull request is clean.

    2.3k GitHub stars~894 tokensUpdated 5 days ago
    Auto-check passed
  • Runs a detached, resumable loop that plans, implements, opens a PR, reviews and fixes a feature across headless CLI sessions until the review is clean.

    2.3k GitHub stars~863 tokensUpdated 5 days ago
    Auto-check passed
  • Coordinates several PRP workstreams in isolated Git worktrees from one session, verifying proof, holding merge gates and sequencing the merges.

    2.3k GitHub stars~3.5k tokensUpdated 5 days ago
    Auto-check passed
  • Turns a PRD, issue or description into an implementation-ready plan grounded in codebase evidence, adding root-cause analysis for bugs and publishing issue plans back to the issue.

    2.3k GitHub stars~4.1k tokensUpdated 5 days ago
    Auto-check passed
  • PRP Plan

    Wirasm/prp

    Writes an implementation-ready plan for a feature, bug fix, refactor or chore from a PRD, issue or description, grounded in codebase evidence, and can post it back to the source issue.

    2.3k GitHub stars~4k tokensUpdated 5 days ago
    Auto-check passed
  • PRP Spike

    Wirasm/prp

    Settles a feasibility question with the smallest throwaway build that could disprove it, in an isolated worktree, ending in a verdict backed by evidence instead of a PR.

    2.3k GitHub stars~3.8k tokensUpdated 5 days ago
    Auto-check passed

Questions about Codebase Research Questions

What does Codebase Research Questions do?

Answers where and how questions about a codebase with parallel research agents and a write-up where every claim cites a file and line, describing only what exists. The agent plays technical cartographer. It reads any files you mention in full, classifies the question as where, how, what, pattern or external, and splits it into two to five research areas.

When should I use Codebase Research Questions?

Codebase Research Questions fits situations like: asking how a part of an unfamiliar codebase works; locating where a feature, route or setting lives; finding the conventions used for something such as error handling; documenting current behavior before planning a change.

How do I install Codebase Research Questions in Claude Code?

Run `npx skills add Wirasm/prp --skill prp-codebase-question -a claude-code`. Or copy the skill folder (.agents/skills/prp-codebase-question in Wirasm/prp) into .claude/skills/prp-codebase-question in your project. Claude Code loads it when a task matches its description.

How do I install Codebase Research Questions in Codex?

Run `npx skills add Wirasm/prp --skill prp-codebase-question -a codex`. Or copy the skill folder (.agents/skills/prp-codebase-question in Wirasm/prp) into .agents/skills/prp-codebase-question in your project. Codex loads it when a task matches its description.

Can I use Codebase Research Questions in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Wirasm/prp --skill prp-codebase-question -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/prp-codebase-question, .gemini/skills/prp-codebase-question, .github/skills/prp-codebase-question and .opencode/skills/prp-codebase-question in your project.

What does Codebase Research Questions need to run?

Going by SKILL.md and its folder, Codebase Research Questions needs the command-line tools its instructions call (git and gh).

Does Codebase Research Questions access the network?

SKILL.md names 1 domain. In commands or code: github.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Codebase Research Questions safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Codebase Research Questions use?

Codebase Research Questions is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Codebase Research Questions use?

About 2.8k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Codebase Research Questions?

Skills that share tags, products or a category with Codebase Research Questions: How Does This Work Explainer (cursor/plugins, 10k stars), Codebase Explorer (yologdev/yoyo-evolve, 1.9k stars), Caveman Repository Explorer (JuliusBrussee/caveman, 110k stars) and Init Deep AGENTS.md Generator (code-yeongyu/oh-my-openagent, 70k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Codebase Research Questions?

Wirasm (a GitHub user) maintains it in Wirasm/prp, which has 2,258 GitHub stars. The repository holds 37 skills in this directory. The repository was last updated on October 2, 2026.

Source: Wirasm/prp on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.