code-researcher

code-researcher is an agent for Claude Code from pavel-molyanov/molyanov-ai-dev. It costs 37 tokens per session (620 once invoked), scanned A, original, MIT.

An agent that researches a codebase for a planned feature and writes structured findings to a code-research.md file.

In plain words
What is it for?
Use it to map entry points, data models, similar features, integrations, tests, and external-library considerations for a feature.
Why use it?
It shows where a change belongs, which existing patterns may be reused, and what integrations or risks need attention before implementation.

Agent for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: model in frontmatter.

Good fit Use it to map entry points, data models, similar features, integrations, tests, and external-library considerations for a feature.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/pavel-molyanov/molyanov-ai-dev/code-researcher
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.

Clone the repo
git clone --depth 1 https://github.com/pavel-molyanov/molyanov-ai-dev

Made for: Claude Code.

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 code-researcher

README.md
[![agentmods](https://agentmods.dev/badge/agents/pavel-molyanov/molyanov-ai-dev/code-researcher/github.svg)](https://agentmods.dev/agents/pavel-molyanov/molyanov-ai-dev/code-researcher)
Your own site
<a href="https://agentmods.dev/agents/pavel-molyanov/molyanov-ai-dev/code-researcher"><img src="https://agentmods.dev/badge/agents/pavel-molyanov/molyanov-ai-dev/code-researcher/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for code-researcher

Your own site · 80×15
<a href="https://agentmods.dev/agents/pavel-molyanov/molyanov-ai-dev/code-researcher"><img src="https://agentmods.dev/badge/agents/pavel-molyanov/molyanov-ai-dev/code-researcher.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 37 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 620 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.00037 $0.00620
Opus 5 $0.00018 $0.00310
Sonnet 5 $0.00007 $0.00124
Haiku 4.5 $0.00004 $0.00062

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

Security

Grade A, and why

code-researcher 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 10d 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.

agents/code-researcher.md · 52 lines

How it starts

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

Research the codebase for a given feature and produce structured analysis.

Input

From orchestrator prompt:

  • feature_path: path to feature folder (e.g., work/my-feature)
  • research_context: feature description (from interview) or path to user-spec.md

Process

  1. If {feature_path}/code-research.md exists — read it. You are deepening existing research, not starting from scratch.
  2. If user-spec.md path provided — read it for requirements context.
  3. Research the codebase using Glob, Grep, Read.
  4. If external libraries are involved — use Context7 MCP (resolve-library-id → query-docs) for best practices and API patterns.
  5. Write results to {feature_path}/code-research.md.

Sections

Research and document each applicable section:

  1. Entry Points — routes, handlers, controllers, components the feature touches. For each: file path, what it does, key function signatures.
  2. Data Layer — models, schemas, migrations, database queries. Structure, fields, relationships, validation rules.
  3. Similar Features — existing implementations of similar functionality. Patterns they follow, what can be reused.
  4. Integration Points — where the feature connects to existing code: imports, shared state, event systems, external API calls.
  5. Existing Tests — what tests exist in the relevant area. Framework, runner, patterns (fixtures, mocks, factories). What's covered vs not. Show 1-2 representative test signatures.
  6. Shared Utilities — reusable functions, helpers, base classes. What each does, where it lives.
  7. Potential Problems — tech debt, fragile code, missing error handling, race conditions. Security concerns: input sanitization, auth checks, data exposure.
  8. Constraints & Infrastructure — framework limitations, dependency versions, deployment requirements, CI/CD, pre-commit hooks, env variables.
  9. External Libraries — if applicable, use Context7 MCP to research APIs, best practices, configuration. Document key APIs the feature will use.

Read the full file on GitHub · 52 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. 10d ago First seen · 52 lines · 37 tokens per session scan A a2ee6d50e5f3

Subscribe to this mod's changes

code-researcher is an agent published in the GitHub repository pavel-molyanov/molyanov-ai-dev (285 stars, last pushed 17d ago), licensed MIT. It adds 37 tokens to every session and 620 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-08-30.