researching-codebases
Skill49 starsChanged 6 months agoMITView on GitHub
Use when answering complex questions about a codebase that require exploring multiple areas or understanding how components connect - coordinates parallel sub-agents to locate, analyze, and synthesize findings
In this repository26 other files it gives its agents.
- AGENTS.mdAGENTS.md
- coding-standardsSkill
- coolify-composeSkill
- crafting-effective-readmesSkill
- diataxisSkill
- english-pleaseSkill
- feature-planning-artifactsSkill
- frontend-design-principlesSkill
- grug-brained-devSkill
- html-artifactsSkill
- improveSkill
- improving-promptsSkill
- jjSkill
- reducing-entropySkill
- roadmapSkill
- roadmap-to-improve-plansSkill
- rustSkill
- salsaSkill
- skill-authoringSkill
- strategic-roadmapSkill
- svelte5Skill
- sveltekitSkill
- writing-cli-skillsSkill
- writing-error-messagesSkill
- writing-plansSkill
- writingSkill
The file
We split this skill into the rules it gives an agent
12 rules. About 0 are common, 8 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 27
Before decomposing a new research question, consider checking for related past research:
- Very specific: line 29
Run list-research.py script to see recent research docs
- Very specific: line 30
Run search-research.py script with relevant keywords
- Very specific: line 31
If related research exists, run read-research.py script to load it
- Distinctive: line 38
If the user references specific files, read them FULLY before spawning agents.
- Distinctive: line 45
Do I need locations, analysis, or examples?
- Very specific: line 73
Run gather-metadata.py script to get date, repo, branch, commit, cwd.
- Distinctive: line 74
Add query (from user's question) and tags (from content)
- Distinctive: line 76
Create directory if it doesn't exist
- Distinctive: line 85
Spawning agents before reading context: Read any files the user mentions first.
- Distinctive: line 89
Over-documenting simple answers: Not every question needs a saved research doc.
- Distinctive: line 91
Sequential when parallel works: If tasks are independent, spawn them together.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Researching Codebases
Coordinate parallel sub-agents to answer complex codebase questions.
When to Use
- Questions spanning multiple files or components
- "How does X work?" requiring tracing through code
- Finding patterns or examples across the codebase
- Understanding architectural decisions or data flow
When NOT to Use
- Simple "where is X?" - use
code-locatordirectly - Single file questions - just read the file
- External/web research only - use
web-searcherdirectly
Workflow
0. Check past research (optional)
Before decomposing a new research question, consider checking for related past research:
- Run
list-research.pyscript to see recent research docs - Run
search-research.pyscript with relevant keywords - If related research exists, run
read-research.pyscript to load it - Build on previous findings instead of starting fresh
See research-tools.md for script usage.
1. Read mentioned files first
If the user references specific files, read them FULLY before spawning agents. This gives you context for decomposition.
2. Decompose the question
Break the query into parallel research tasks. Consider:
- Which areas of the codebase are relevant?
- Do I need locations, analysis, or examples?
- See
agent-selection.mdfor agent capabilities
3. Spawn parallel agents
Launch multiple agents concurrently for independent tasks. Use the task tool with appropriate subagent_type.
Wait for ALL agents to complete before synthesizing.
4. Synthesize and respond
Combine findings into a coherent answer:
- Direct answer to the question
- Key
file:linereferences - Connections between components
- Open questions if any areas need more investigation
5. Offer to save (optional)
For substantial research, ask:
Want me to save this to a research doc? (project:
.research/or global:~/.research/)
Skip this for quick answers.
When saving:
- Run
gather-metadata.pyscript to get date, repo, branch, commit, cwd. - Add query (from user's question) and tags (from content)
- Format YAML frontmatter per
output-format.md - Create directory if it doesn't exist
- Use filename:
{filename_date}_topic-slug.md
Agent Reference
See agent-selection.md for when to use each agent.
Common Mistakes
Spawning agents before reading context: Read any files the user mentions first.
Not waiting for all agents: Synthesize only after ALL agents complete.
Over-documenting simple answers: Not every question needs a saved research doc.
Sequential when parallel works: If tasks are independent, spawn them together.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

