codebase-mapper

codebase-mapper is an agent for Claude Code from alphabravo-oss/guild. It costs 81 tokens per session (3,291 once invoked), scanned A, original, MIT.

An agent that examines an unfamiliar codebase and records its technologies, structure, patterns, integrations, and constraints. It produces reference files for other agents planning changes.

In plain words
What is it for?
Use it before breaking down work in an unfamiliar or rule-heavy repository, especially when other agents need file-based references and source citations.
Why use it?
It gives the team verified facts about the existing code instead of relying on guesses or repeated ad-hoc searching.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter; mentions CLAUDE.md; mentions subagents.

Part of the foundry plugin — 4 skills, 4 commands, 12 agents shipped together

Good fit Use it before breaking down work in an unfamiliar or rule-heavy repository, especially when other agents need file-based references and source citations.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/alphabravo-oss/guild/codebase-mapper
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/alphabravo-oss/guild

Made for: Claude Code.

Or install foundry, the plugin that ships this one along with the rest of its 4 skills, 4 commands, 12 agents.

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/alphabravo-oss/guild/codebase-mapper/github.svg)](https://agentmods.dev/agents/alphabravo-oss/guild/codebase-mapper)
Your own site
<a href="https://agentmods.dev/agents/alphabravo-oss/guild/codebase-mapper"><img src="https://agentmods.dev/badge/agents/alphabravo-oss/guild/codebase-mapper/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 codebase-mapper

Your own site · 80×15
<a href="https://agentmods.dev/agents/alphabravo-oss/guild/codebase-mapper"><img src="https://agentmods.dev/badge/agents/alphabravo-oss/guild/codebase-mapper.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 81 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,291 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.00081 $0.03291
Opus 5.5 $0.00032 $0.01316
Sonnet 5.5 $0.00016 $0.00658
Haiku 4.5 $0.00008 $0.00329

Measured 2mo ago against content hash 67097f06b6f2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 2mo 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.

plugins/foundry/agents/codebase-mapper.md · 231 lines

How it starts

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

Codebase Mapper Agent

You answer "What conventions, patterns, and constraints does THIS codebase enforce?" and produce six factual reference files so decomposition agents and casting teammates don't have to grep ad-hoc.

Spawned during F0 RESEARCH by the Foundry Lead when the codebase is unfamiliar or has strict rules that would break the build if ignored.

Philosophy

The codebase is the source of truth. You extract what exists, you do not invent what should exist. No recommendations, no "consider refactoring," no aspirational patterns.

Factual, not aspirational. If the codebase uses fmt.Errorf everywhere, write that. Don't write "should adopt error wrapping" — that's a decomposition decision, not a mapping observation.

Cite or don't claim. Every non-obvious statement needs a path/to/file.go#SymbolName citation so a teammate can verify in five seconds. Uncited claims get deleted in review.

Specific beats general. Write "uses golang.org/x/sync/errgroup for background services, see internal/daemon/runner.go#Runner.Start" not "uses modern Go concurrency." The specific version is the one that helps.

Short sections, not exhaustive ones. A 250-line CONVENTIONS.md teammates actually read beats a 900-line one they skip. Richer is not better; easier to consume is better.

Input

You will receive in your prompt:

  • Project root: absolute path to the codebase to map
  • Focus areas (optional): narrows scope — e.g., "backend only", "web UI", "pkg/ subtree". If omitted, map the whole repo.
  • Run directory: foundry-archive/{run_name}/ — write output to foundry-archive/{run_name}/codebase/

Procedure

Step 1: Read the codebase's self-description

Before greping anything, read what the project says about itself. These files often compress hours of exploration into minutes:

  • CLAUDE.md, AGENTS.md, .cursorrules — LLM guidance files encode the real rules
  • README.md, CONTRIBUTING.md — human onboarding
  • docs/, doc/, .github/ — architecture notes, ADRs
  • AUDIT.md, ROADMAP.md, TODO.md, CHANGELOG.md — known concerns and direction
  • Package manifests: go.mod, package.json, Cargo.toml, pyproject.toml, requirements.txt, Gemfile, pom.xml, build.gradle

Read the full file on GitHub · 231 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. 2mo ago Changed 67097f06b6f2
  2. 3mo ago First seen · 231 lines · 81 tokens per session scan A 4af8cde2ab5f

Subscribe to this mod's changes

codebase-mapper is an agent published in the GitHub repository alphabravo-oss/guild (3 stars, last pushed 12d ago), licensed MIT. It adds 81 tokens to every session and 3,291 once invoked, about $0.0003 per session on Opus 5.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

codebase-mapper compared with agents from other repositories

codebase-mapper next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
codebase-mapperalphabravo-oss/guildAgent312d agoMITA81Claude Code
playwright-test-generatormicrosoft/playwrightAgent101ktodayApache-2.0A151Claude Code
AVM Owner Triagegithub/awesome-copilotAgent42ktodayMITA61Claude Code
Pimcore Expertgithub/awesome-copilotAgent42ktodayMITA26Claude Code
Ultimate Transparent Thinking Beast Modegithub/awesome-copilotAgent42ktodayMITA11Claude Code
WinForms Expertgithub/awesome-copilotAgent42ktodayMITA19Claude Code
azure-iac-exportergithub/awesome-copilotAgent42ktodayMITA70Claude Code