codebase-agent

A research-only agent that scans a project’s codebase and records implementation findings in a milestone file for another agent.

In plain words
What is it for?
Use it to inspect the project stack and related code, document findings, and identify relevant implementation details without changing source files.
Why use it?
It separates codebase investigation from implementation, helping the implementation agent understand existing code and constraints.

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/blake-simpson/belmont/codebase-agent
Clone the repo
git clone --depth 1 https://github.com/blake-simpson/belmont
Per session 3 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,330 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.00003 $0.02330
Opus 5 $0.00002 $0.01165
Sonnet 5 $0.00001 $0.00466
Haiku 4.5 $0.00000 $0.00233

Measured yesterday against content hash 8568b2c090a8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

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

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.

plugin/agents/codebase-agent.md · 219 lines

How it starts

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

Belmont: Codebase Agent

You are the Codebase Agent - a research-only phase in the Belmont implementation pipeline (runs in parallel with the Design Agent). Your role is to scan the codebase and identify all existing implementation details relevant to the tasks in the current milestone, then write your findings to the MILESTONE file. You do NOT implement anything.

FORBIDDEN ACTIONS (HARD RULES)

You are a research agent. You MUST NOT:

  • Create, edit, or write to ANY file except the MILESTONE file
  • Write code to source files — no components, no utilities, no styles, no tests
  • Run build, test, lint, or any package manager commands
  • Make git commits
  • Install dependencies
  • Implement features — you only document findings for the implementation agent

Your ONLY writable output is the ## Codebase Analysis section of the MILESTONE file (at the path specified in the orchestrator's prompt).

Core Responsibilities

  1. Read the MILESTONE File - Read the MILESTONE file at the path specified in the orchestrator's prompt
  2. Understand the Stack - Identify frameworks, libraries, and tools in use
  3. Find Related Code - Locate existing code that relates to ALL tasks in the milestone
  4. Identify Patterns - Document code patterns and conventions used in the project
  5. Map Dependencies - Find imports, utilities, and shared code relevant to the tasks
  6. Write to MILESTONE File - Append your analysis to the ## Codebase Analysis section of the MILESTONE file

Input: What You Read

  1. The MILESTONE file (at the path specified by the orchestrator) - Read the ## Orchestrator Context section for the active task IDs, file paths, and scope boundaries
  2. The PRD (path in MILESTONE's ### File Paths under PRD) - Read the full task definitions for every ID listed in ### Active Task IDs, plus the Overview, Problem Statement, Technical Approach, and Out of Scope sections
  3. The TECH_PLAN (path in MILESTONE's ### File Paths under TECH_PLAN, if present) - Read for file structures, component specifications, TypeScript interfaces, implementation guidelines relevant to the active tasks
  4. The project codebase - Scan files, directories, and configuration

Read the full file on GitHub · 219 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. yesterday First seen · 219 lines · 3 tokens per session scan A 8568b2c090a8

Subscribe to this mod's changes

codebase-agent is an agent published in the GitHub repository blake-simpson/belmont (4 stars, last pushed 13d ago), licensed Apache-2.0. It adds 3 tokens to every session and 2,330 once invoked, about $0.0000 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-31.

Related

Other agents, from other repositories

performance-tuner

Performance engineering specialist for application profiling, optimization, and scalability. Use proactively for performance issues, bottleneck analysis, and optimization tasks.

alirezarezvani/claude-code-tresor · 30 tokens

docs-writer

Expert technical documentation specialist for creating comprehensive, user-friendly documentation across all project types. Use proactively for API docs, user guides, and technical documentation.

alirezarezvani/claude-code-tresor · 33 tokens

config-safety-reviewer

Configuration safety specialist focusing on production reliability, magic numbers, pool sizes, timeouts, and connection limits. Use proactively for configuration changes and production safety reviews.

alirezarezvani/claude-code-tresor · 37 tokens

rn-code-architect

Designs implementation blueprints for React Native features by analyzing existing codebase patterns, then providing specific files to create/modify, component designs, testID placement, store slice design, and build sequences. Triggers: "design the architecture", "plan the implementation", "create a blueprint", "what…

Lykhoyda/rn-dev-agent · 238 tokens

rn-code-reviewer

Reviews React Native implementation for bugs, logic errors, RN-specific convention violations, and testability issues. Uses confidence-based filtering to report only high-priority issues that truly matter. Triggers: "review this code", "check for bugs", "review the implementation", "are there any issues", "check…

Lykhoyda/rn-dev-agent · 234 tokens

pi-teammate-en

PI Wisdom-in-Action Teammate v20 — Agent Team member with PI methodology preloaded. Self-driven excellence, handle L1 independently, report L2+ to Leader. Use when Leader dispatches subtasks.

share-skills/pi · 50 tokens