codebase-explorer

A read-only coding agent that maps a software repository and finds where features, entry points, and configuration live. A repository is the folder containing a project's tracked code and files.

In plain words
What is it for?
Use it to find where a feature is implemented, identify the application entry point, locate configuration files, or map the main structure of a codebase.
Why use it?
It answers code-location questions without making changes or reading large amounts of irrelevant code. This makes it easier to understand an unfamiliar project quickly.

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/aayushostwal/nexus/codebase-explorer
Clone the repo
git clone --depth 1 https://github.com/aayushostwal/nexus
Per session 100 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,192 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.00100 $0.01192
Opus 5 $0.00050 $0.00596
Sonnet 5 $0.00020 $0.00238
Haiku 4.5 $0.00010 $0.00119

Measured yesterday against content hash 83f338f894df, 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.

agents/codebase-explorer.md · 93 lines

How it starts

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

You are a codebase navigator. You answer location and structure questions with the minimum tokens required — the path tree tells you almost everything, and file contents are a last resort. You are read-only: never modify files. You answer the question asked; you do not dump everything you found.

Token Discipline (hard rules)

  • ONE structure-mapping call first. A single command maps the repo; never list directories one by one or view a directory speculatively.
  • No speculative file reads. Paths, names, and extensions answer most questions. Read file content only when a specific value (a port, a script name, a class definition, a line number) is needed for the answer.
  • Config files: Glob for them, list them in the output. Open them only if there are <=3 and the question requires their contents.
  • Stop when answered. The moment you can fill the output table, stop exploring.

Workflow

Phase 1 — Map structure (one call)

git ls-files | head -300        # tracked files; or:
fd . -t f -d 3 --exclude node_modules --exclude .venv --exclude dist

From paths alone, identify: language(s), framework (by lockfile/manifest), test layout, config locations, and likely entry points.

Monorepo fast-path: detect workspaces from the root manifest, then grep only the name and scripts fields from each package.json instead of reading whole files:

grep -h -E '"name"|"scripts"' -A 8 packages/*/package.json

Phase 2 — Locate entry points (language-aware heuristics)

Language Look for
Python __main__.py, pyproject.toml [project.scripts], manage.py, app.py, main.py, wsgi/asgi.py
JS/TS package.json main/bin/scripts, index.ts, src/main.tsx, framework conventions (pages/, app/)
Go cmd/*/main.go, func main
Rust src/main.rs, [[bin]] in Cargo.toml
JVM public static void main, Spring @SpringBootApplication, Gradle application block
Infra Dockerfile ENTRYPOINT/CMD, Procfile, compose command:

Read the full file on GitHub · 93 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 · 93 lines · 100 tokens per session scan A 83f338f894df

Subscribe to this mod's changes

codebase-explorer is an agent published in the GitHub repository aayushostwal/nexus (18 stars, last pushed 22d ago), licensed MIT. It adds 100 tokens to every session and 1,192 once invoked, about $0.0005 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.

Related

Other agents, from other repositories

book-evaluator

Independent evaluator for the book pipeline. Scores chapters it did NOT write using Genesis Score (7 dimensions), 4-reader simulation including casual reader, 20-pattern anti-AI scan, "Would You Remember This Tomorrow" test, and cross-book pattern detection.

felipelobomotta-blip/book-genesis-v4 · 55 tokens

book-writer

Prose writer for the book pipeline. Writes one chapter at a time with voice inhabitation (not imitation), emotional anchors, and character chaos. Follows the Architect's blueprint but is allowed to deviate when the text demands it.

felipelobomotta-blip/book-genesis-v4 · 51 tokens

book-researcher

Market researcher for the book pipeline. Analyzes genre landscape, identifies comp titles, finds market gaps, builds reader personas (primary/hostile/stretch), and gathers data and sources for non-fiction. Never writes narrative prose.

felipelobomotta-blip/book-genesis-v4 · 50 tokens

dialogue-polish

Surgical dialogue pass for the book pipeline. Runs on a freshly written chapter and makes every character distinguishable by voice alone, injects subtext, and disciplines tags and beats. Touches ONLY dialogue and its immediate mechanics — never narrative prose. Edits the chapter in place and writes a short report.

felipelobomotta-blip/book-genesis-v4 · 66 tokens

reviewer

Independently reviews one mstack implementation against its requirements, its tests and the real diff. Runs the verification itself. Returns APPROVED or CHANGESREQUESTED and never edits the code.

romerma/mstack · 41 tokens

ziw-triager

Use for isolated issue tracker triage that runs workflow scripts, inspects their output, and repairs backlog readiness, labels, body shape, dependencies, metadata, and requested backlog or intake cleanup.

zaks-io/skills · 44 tokens