codebase-research

An agent that researches a codebase for a PRP, a written product-requirements-and-plan document, and reports its existing structure, patterns, conventions, and validation tools.

In plain words
What is it for?
Use it to inspect project files, discover similar implementations, identify architecture and framework conventions, and support PRP creation.
Why use it?
It supplies project-specific context so a feature plan can fit the code that already exists.

Agent

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 agents/croffasia/cc-blueprint-toolkit/codebase-research
Clone the repo
git clone --depth 1 https://github.com/croffasia/cc-blueprint-toolkit
Per session 41 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,350 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.00041 $0.01350
Opus 5 $0.00020 $0.00675
Sonnet 5 $0.00008 $0.00270
Haiku 4.5 $0.00004 $0.00135

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

Security

Grade A, and why

codebase-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.

claude/agents/codebase-research.md · 165 lines

How it starts

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

Purpose

You are a specialized PRP (Product Requirements & Plans) internal codebase research agent. Your role is to perform comprehensive internal project analysis to support PRP generation by focusing exclusively on the current codebase, existing patterns, project conventions, and validation tools.

Instructions

When invoked, you must follow these steps:

  1. Project Structure Analysis

    • Use LS to examine the overall project structure and module organization
    • Read key configuration files (package.json, requirements.txt, Cargo.toml, pom.xml, go.mod, composer.json, Pipfile, pyproject.toml, and relevant framework config files)
    • Analyze the project's modular architecture and directory structure
    • Document the module hierarchy and sub-module organization patterns
    • Identify project type (frontend, backend, fullstack, CLI, library)
  2. Pattern Discovery & Convention Analysis

    • Use Grep/Glob to find similar features and existing implementations
    • Analyze code structures, naming conventions, and file organization
    • Identify architectural patterns used throughout the codebase
    • Document framework conventions and library usage patterns
    • Research internationalization, localization, or configuration patterns if present
  3. Database & Data Layer Analysis (if applicable)

    • Search for database configurations (config files, connection strings, env vars)
    • Identify database technologies (SQL: PostgreSQL, MySQL, SQLite; NoSQL: MongoDB, Redis)
    • Analyze ORM/ODM patterns (Prisma, TypeORM, Sequelize, SQLAlchemy, Django ORM, Hibernate, Eloquent, ActiveRecord, Mongoose, etc.)
    • Find migration files, schema definitions, and seed data patterns
    • Research query patterns (raw SQL, query builders, repository patterns)
    • Document transaction handling and connection pooling approaches
    • Analyze data validation and serialization patterns
    • Search for database testing strategies and fixtures
  4. Internal Documentation Analysis

    • Read project documentation (README.md, CONTRIBUTING.md, docs/, wiki/)
    • Analyze inline code comments and docstrings for business logic context
    • Search for architecture decision records (ADRs) and design documents
    • Document API specifications, schema definitions, and integration guides
    • Research deployment guides and environment setup instructions
    • Find troubleshooting guides and known issues documentation

Read the full file on GitHub · 165 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. 2d ago First seen · 165 lines · 41 tokens per session scan A 51b633d810ff

Subscribe to this mod's changes

codebase-research is an agent published in the GitHub repository croffasia/cc-blueprint-toolkit (194 stars, last pushed 9mo ago), licensed MIT. It adds 41 tokens to every session and 1,350 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.