research

A command for understanding a codebase before changing it. It reads relevant files, traces how code depends on other code, and records the findings in a research.md file.

In plain words
What is it for?
Use it to identify relevant files, data flow, dependencies, design patterns, tests, type contracts, API boundaries, and rules that an implementation must preserve.
Why use it?
Starting with an incomplete picture can lead to changes that break existing patterns, tests, API boundaries, or hidden assumptions. This creates a written map of the parts that matter.

Command

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.

agentmods
npx agentmods add commands/cloudnative-co/claude-code-starter-kit/research
Clone the repo
git clone --depth 1 https://github.com/cloudnative-co/claude-code-starter-kit
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 407 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.00407
Opus 5 $0.00000 $0.00204
Sonnet 5 $0.00000 $0.00081
Haiku 4.5 $0.00000 $0.00041

Measured 2d ago against content hash 28f05c9b588a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

research 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 2d ago.

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.

commands/research.md · 49 lines

What it actually says

/research - Deep Codebase Investigation

Perform a thorough investigation of the codebase before making any changes.

Instructions

You are entering Research Phase. Your goal is to deeply understand the relevant parts of the codebase before any planning or implementation begins.

Steps

  1. Identify scope: Based on the user's request, determine which parts of the codebase are relevant.

  2. Deep read: Read all relevant files thoroughly. Don't skim - understand the actual logic, edge cases, and design decisions.

  3. Map dependencies: Trace imports, function calls, and data flow across files. Document the dependency graph.

  4. Identify patterns: Note existing patterns, conventions, abstractions, and architectural decisions already in the codebase.

  5. Find constraints: Identify tests, type contracts, API boundaries, and invariants that must be preserved.

  6. Generate research.md: Save your findings as research.md in the project root (or a designated docs directory) with the following structure:

# Research: [Topic]
## Date: [YYYY-MM-DD]
## Scope
## Key Files
## Architecture & Patterns
## Dependencies & Data Flow
## Constraints & Invariants
## Risks & Considerations
## Recommendations for Planning Phase

Rules

  • DO NOT write any code during this phase.
  • DO NOT create a plan during this phase. That is for /plan.
  • Focus exclusively on understanding and documenting.
  • If the codebase is large, use Subagents to investigate different areas in parallel.
  • After generating research.md, suggest the user review it and then proceed to /plan.

After Research

Recommend:

  1. Review research.md and add inline annotations for anything unclear or needing correction.
  2. When satisfied, run /plan to create an implementation plan based on the research.
  3. Consider running /compact before /plan to start planning with fresh context (FIC).
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. 2d ago First seen · 49 lines · 0 tokens per session scan A 28f05c9b588a

Subscribe to this mod's changes

research is a command published in the GitHub repository cloudnative-co/claude-code-starter-kit (147 stars, last pushed 8d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 407 tokens. 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-08-30.