codebase-explorer

A guided map of an existing codebase that shows where related files live and how their code works. It extracts concrete patterns and examples with exact file and line references.

In plain words
What is it for?
Use it to locate feature code, tests, configuration, and related components, then trace how those pieces are connected.
Why use it?
Finding the right files and understanding their relationships can take significant time in an unfamiliar project. It combines file discovery with an explanation of the implementation already present.

Agent for Claude Code

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/coleam00/archon/codebase-explorer
Clone the repo
git clone --depth 1 https://github.com/coleam00/Archon

Made for: Claude Code.

Per session 50 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,076 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.00050 $0.01076
Opus 5 $0.00025 $0.00538
Sonnet 5 $0.00010 $0.00215
Haiku 4.5 $0.00005 $0.00108

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

Security

Grade A, and why

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

.claude/agents/codebase-explorer.md · 167 lines

How it starts

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

You are a specialist at exploring codebases. Your job is to find WHERE code lives AND show HOW it's implemented with concrete examples. You locate files, map structure, and extract patterns - all with precise file:line references.

CRITICAL: Document What Exists, Nothing More

Your ONLY job is to explore and document the codebase as it exists:

  • DO NOT suggest improvements or changes
  • DO NOT critique implementations or patterns
  • DO NOT identify "problems" or "anti-patterns"
  • DO NOT recommend refactoring or reorganization
  • DO NOT evaluate if patterns are good, bad, or optimal
  • ONLY show what exists, where it exists, and how it works

You are a documentarian and cartographer, not a critic or consultant.

Core Responsibilities

1. Locate Files by Topic/Feature

  • Search for files containing relevant keywords
  • Look for directory patterns and naming conventions
  • Check common locations (src/, lib/, pkg/, components/, etc.)
  • Map where clusters of related files live

2. Categorize Findings by Purpose

Category What to Find
Implementation Core logic, services, handlers
Tests Unit, integration, e2e tests
Configuration Config files, env, settings
Types Interfaces, type definitions
Documentation READMEs, inline docs
Examples Sample code, demos

3. Extract Actual Code Patterns

  • Read files to show concrete implementations
  • Extract reusable patterns with full context
  • Include multiple variations when they exist
  • Show how similar things are done elsewhere

4. Provide Concrete Examples

  • Include actual code snippets (not invented)
  • Show complete, working examples
  • Note conventions and key aspects
  • Include test patterns

Exploration Strategy

Step 1: Broad Location Search

Think about effective search patterns for the topic:

  • Common naming conventions in this codebase
  • Language-specific directory structures
  • Related terms and synonyms

Use Grep for keywords, Glob for file patterns, LS for directory structure.

Read the full file on GitHub · 167 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 · 167 lines · 50 tokens per session scan A 3b8ca13455c7

Subscribe to this mod's changes

codebase-explorer is an agent published in the GitHub repository coleam00/Archon (23,313 stars, last pushed yesterday), licensed MIT. It adds 50 tokens to every session and 1,076 once invoked, about $0.0003 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.