Research codebase comprehensively using parallel sub-agents
Ships in product-shaping. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You are tasked with conducting comprehensive research across the codebase to answer user questions by spawning parallel sub-agents and synthesizing their findings.
When this command is invoked, respond with:
I'm ready to research the codebase. Please provide your research question or area of interest, and I'll analyze it thoroughly by exploring relevant components and connections.
Then wait for the user's research query.
Read any directly mentioned files first:
context/foundation/lessons.md if present and treat its entries as known-pattern priors when shaping the research areas — recurring rules already accepted by the team narrow what's worth re-investigating.Analyze and decompose the research question:
Clarify research scope using AskUserQuestion:
After decomposing the research question, use AskUserQuestion to align on scope and focus before spawning sub-agents.
Rules for structuring questions:
description to each option explaining what it means for the researchheader short (max 12 chars): "Scope", "Depth", "Focus"What to ask about (pick 1-3 based on the query):
Example — for an ambiguous query like "how does authentication work": AskUserQuestion with questions:
context/changes/**/ and context/archive/**/."
multiSelect: trueFor a clear, scoped query like "find all files using the TaskCreate tool":
Spawn parallel sub-agent tasks for comprehensive research:
Use the Task tool with parallel sub-agents:
subagent_type: "Explore") — fast file/pattern search, code structure analysis. Use for finding files, tracing code paths, searching for patterns.subagent_type: "general-purpose") — deep analysis requiring reading many files and multi-step reasoning. Use for understanding complex systems.Spawn 2-4 agents in parallel in a single message for concurrent execution:
context/changes/**/ and context/archive/**/", a general-purpose for "analyze how Z system works"Wait for all sub-agents to complete and synthesize findings:
context/changes/**/ and context/archive/**/ as supplementary historical contextResolve change folder and gather metadata for the research document:
/shape-research <change-id> and context/changes/<change-id>/ exists, use it.change.md (mirroring /shape-new semantics) before writing.context/archive/ — print: "This change is archived. Open a new change with /shape-new instead." and STOP.change.md: set updated: <today> and, only if current status is new, advance to status: preparing.context/changes/<change-id>/research.md (single artifact per change).Generate research document:
Use the metadata gathered in step 5
Structure the document with YAML frontmatter followed by content:
---
date: [Current date and time with timezone in ISO format]
researcher: [Researcher name]
git_commit: [Current commit hash]
branch: [Current branch name]
repository: [Repository name]
topic: "[User's Question/Topic]"
tags: [research, codebase, relevant-component-names]
status: complete
last_updated: [Current date in YYYY-MM-DD format]
last_updated_by: [Researcher name]
---
# Research: [User's Question/Topic]
**Date**: [Current date and time with timezone from step 5]
**Researcher**: [Researcher name]
**Git Commit**: [Current commit hash from step 5]
**Branch**: [Current branch name from step 5]
**Repository**: [Repository name]
## Research Question
[Original user query]
## Summary
[High-level findings answering the user's question]
## Detailed Findings
### [Component/Area 1]
- Finding with reference ([file.ext:line](link))
- Connection to other components
- Implementation details
### [Component/Area 2]
...
## Code References
- `path/to/file.py:123` - Description of what's there
- `another/file.ts:45-67` - Description of the code block
## Architecture Insights
[Patterns, conventions, and design decisions discovered]
## Historical Context (from prior changes)
[Relevant insights from `context/changes/**/` and `context/archive/**/` with references]
- `context/changes/<other-change>/plan.md` - Historical decision about X
- `context/archive/YYYY-MM-DD-<other-change>/research.md` - Past exploration of Y
## Related Research
[Links to other research artifacts under `context/changes/**/research.md` or `context/archive/**/research.md`]
## Open Questions
[Any areas that need further investigation]
Add GitHub permalinks (if applicable):
git branch --show-current and git statusgh repo view --json owner,namehttps://github.com/{owner}/{repo}/blob/{commit}/{file}#L{line}Sync and present findings:
Handle follow-up questions:
last_updated and last_updated_by to reflect the updatelast_updated_note: "Added follow-up research for [brief description]" to frontmatter## Follow-up Research [timestamp]context/changes/**/ and context/archive/**/ as supplementary historical contextWhat SKILL.md sets; muted values are Claude Code's defaults
/product-shaping:shape-researchfrom product-shaping
npx claudepluginhub patrykkopycinski/patryks-treadmill-claude-plugins --plugin product-shaping30 skills in this plugin
/shape-agents-mdGenerate an AGENTS.md onboarding document for AI coding agents working in this repository. Inspects the repo (package manifest, README, scripts, lint/test config, layout, commit history) and writes a concise contributor guide titled "Repository Guidelines". Use when the user invokes /shape-agents-md, asks to "create AGENTS.md", "write an agent onboarding doc", "generate contributor guide for agents", or similar. The output is optimized to be small, precise, reference-heavy, and ordered with critical rules at the top — so a future agent reads it once and stays unblocked.
/shape-archiveArchive a completed change by moving its folder into context/archive/ and stamping change.md with archived status/shape-Other plugins' skills for the same job