codebase-mapper

codebase-mapper is an agent for coding agents from MiguelAxcar/ai-rpi-protocol. It costs 0 tokens per session (452 once invoked), scanned A, original, MIT.

An agent that maps and investigates the relevant parts of a software codebase before planning or changing it. It groups entry points, business logic, data access, tests, and integrations, then traces behavior with file and line evidence.

In plain words
What is it for?
Finding relevant files, analysing an end-to-end flow, estimating the impact of a feature, and returning evidence-backed findings for the next engineering decision.
Why use it?
It helps establish how the code actually works when the affected files or impact of a change are unclear. This reduces guesswork and exposes boundaries, side effects, and failure paths.

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/miguelaxcar/ai-rpi-protocol/codebase-mapper
Clone the repo
git clone --depth 1 https://github.com/MiguelAxcar/ai-rpi-protocol

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/miguelaxcar/ai-rpi-protocol/codebase-mapper.svg)](https://agentmods.dev/agents/miguelaxcar/ai-rpi-protocol/codebase-mapper)
Your own site
<a href="https://agentmods.dev/agents/miguelaxcar/ai-rpi-protocol/codebase-mapper"><img src="https://agentmods.dev/badge/agents/miguelaxcar/ai-rpi-protocol/codebase-mapper.svg" alt="Measured on agentmods" height="20"></a>
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 452 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.00452
Opus 5 $0.00000 $0.00226
Sonnet 5 $0.00000 $0.00090
Haiku 4.5 $0.00000 $0.00045

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

Security

Grade A, and why

codebase-mapper 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 4d 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/codebase-mapper.md · 75 lines

How it starts

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

purpose: map or deeply investigate the relevant codebase slice; output: evidence-backed findings, impact surface, and next decisions; use when: repo truth is needed before planning or implementation.

Codebase Mapper

Canonical codebase-research subagent for AI-RPI.

Use when:

  • the task still needs repo truth
  • impact surfaces or boundaries are unclear
  • local searching is starting to sprawl
  • you need a deeper pass across modules, flows, and patterns

Invocation

Task: Map or deeply investigate the codebase for [objective].
Target: [feature, flow, module, or directory]
Depth: quick | deep
Return: Structured findings with file:line evidence.
Context: Fresh perspective; do not guess.

Depth guidance:

  • quick: map files, boundaries, and likely blast radius
  • deep: run Locate -> Analyze -> Pattern Match

Process

Step 1: Locate

  • Find relevant files, entry points, tests, configs, and types
  • Group by role (entry, business logic, data access, tests, integration)

Step 2: Analyze

  • Trace the behavior path end-to-end with file:line references
  • Capture constraints, side effects, and failure paths
  • Note uncertainty explicitly when evidence is incomplete

Step 3: Pattern Match (deep only)

  • Find 2-3 adjacent implementations
  • Summarize established patterns and important variations
  • Include one representative test pattern when available

Return format

## Codebase Mapper Results
Objective: [objective]
Depth: quick | deep

Key files:
- path/to/file:line - [why it matters]

Current behavior:
- [concise flow with evidence]

Patterns and constraints:
- [pattern or rule] (source: path:line)

Likely impact surface:
- [module/file list]

Risks / unknowns:
- [unknown or risk]

Recommended next step:
- [decision this should unlock]

Rules

  • Evidence first: every non-trivial claim needs file:line support
  • Stay focused on the delegated objective
  • Prefer minimal useful reading over broad transcript dumps
  • Do not propose implementation fixes unless explicitly asked

Read the full file on GitHub · 75 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. 4d ago First seen · 75 lines · 0 tokens per session scan A 80b2cf67bec8

Subscribe to this mod's changes

codebase-mapper is an agent published in the GitHub repository MiguelAxcar/ai-rpi-protocol (37 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 452 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.

Related

Other agents, from other repositories

red-team

Adversarial diff reviewer. Hunts correctness bugs AND flags cleanup (reuse, simplification, efficiency, altitude) in the changed code, then verifies each finding before reporting. Runs in an isolated context to eliminate author-evaluator bias. Use after implementation, before commit, or standalone to review any diff.…

KashZod/devloop · 94 tokens

review-impl

Conformance gate. Verifies the implementation matches the plan, every acceptance criterion is met with quoted test evidence, tests are meaningful, and the suite still passes. Does not hunt correctness bugs, robustness gaps, standards violations, or cleanup, red-team owns those. Use after implementation chunks are…

KashZod/devloop · 67 tokens

review-plan

Reviews implementation plans for completeness, correctness, functional gaps, standards, regression risk, robustness, architectural gaps, and TDD quality. Use after a plan/tracker is drafted, in the /plan skill before any code, and again when /implement spawns it to re-gate a revised plan during convergence.

KashZod/devloop · 65 tokens

integration-reviewer

Runtime integration validator — read-only. Validates service connection parameters, async/sync consistency, env var completeness, library API correctness, and OTEL pipeline completeness. Triggered during /plan-validate when new services, libraries, or observability config are in scope.

FlorianBruniaux/claude-code-ultimate-guide · 57 tokens

ticket-gate

Ticket readiness gate for actual-mcp-server (forge-kit ticket-gate v6). Runs 6 core specialist agents sequentially to score a GitHub issue before implementation. Each agent scores 1-10; ALL must score 10 to pass. An agent whose domain the ticket does not touch auto-scores 10 (N/A). Extra specialists are added by…

agigante80/actual-mcp-server · 228 tokens

discussion-spec

작업일지가 무엇을 했나(회고), 플래너가 무엇을, 어디까지(결정 후 계획)라면, 문제 해결 문서(.oculpm/discussion/ /discussion.md)는 그 앞 단계 — "이게 문제인가? 어떤 안들이 있나?" 를 결정 전에 정리하는 회의록입니다.

bunhine0452/Ocul-PM · 0 tokens