researching-codebases

researching-codebases is a skill for Claude Code, Codex from Kastalien-Research/thoughtbox. It costs 39 tokens per session (630 once invoked), scanned A, original, MIT.

A codebase research workflow for answering questions that span multiple files or components. It coordinates several focused investigations and combines their findings.

In plain words
What is it for?
Use it to investigate how a feature works, find examples across a repository, or analyze relationships between components.
Why use it?
It helps trace how parts of a codebase connect without relying on a quick guess from one file. It is suited to understanding architecture, data flow, and repeated patterns.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents.

Good fit Use it to investigate how a feature works, find examples across a repository, or analyze relationships between components.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kastalien-research/thoughtbox/researching-codebases
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Kastalien-Research/thoughtbox --skill researching-codebases
Clone the repo
git clone --depth 1 https://github.com/Kastalien-Research/thoughtbox

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for researching-codebases

README.md
[![agentmods](https://agentmods.dev/badge/skills/kastalien-research/thoughtbox/researching-codebases.svg)](https://agentmods.dev/skills/kastalien-research/thoughtbox/researching-codebases)
Your own site
<a href="https://agentmods.dev/skills/kastalien-research/thoughtbox/researching-codebases"><img src="https://agentmods.dev/badge/skills/kastalien-research/thoughtbox/researching-codebases.svg" alt="Measured on agentmods" height="20"></a>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 630 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00039 $0.00630
Opus 5 $0.00019 $0.00315
Sonnet 5 $0.00008 $0.00126
Haiku 4.5 $0.00004 $0.00063

Measured 5d ago against content hash cf8ca2b6e039, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

researching-codebases scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

The scan reads SKILL.md. This mod also ships 5 executable files (scripts/gather-metadata.py, scripts/list-research.py, scripts/promote-research.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

apps/web/.roo/skills/researching-codebases/SKILL.md · 92 lines

How it starts

The opening of the file, as written. The whole thing — 92 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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-locator directly
  • Single file questions - just read the file
  • External/web research only - use web-searcher directly

Workflow

0. Check past research (optional)

Before decomposing a new research question, consider checking for related past research:

  1. Run list-research.py script to see recent research docs
  2. Run search-research.py script with relevant keywords
  3. If related research exists, run read-research.py script to load it
  4. 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.md for 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:line references
  • 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:

  1. Run gather-metadata.py script to get date, repo, branch, commit, cwd.
  2. Add query (from user's question) and tags (from content)
  3. Format YAML frontmatter per output-format.md
  4. Create directory if it doesn't exist
  5. Use filename: {filename_date}_topic-slug.md

Read the full file on GitHub · 92 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 92 lines · 39 tokens per session scan A cf8ca2b6e039

Subscribe to this mod's changes

researching-codebases is a skill published in the GitHub repository Kastalien-Research/thoughtbox (64 stars, last pushed 1mo ago), licensed MIT. It adds 39 tokens to every session and 630 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.