codebase-viewer

A codebase-mapping skill that explains how a software repository is organised, how its parts depend on one another, and where tests and risky areas are.

In plain words
What is it for?
It helps map directories, find program entry points, trace dependencies, detect circular dependencies, measure test coverage, and flag areas with no tests or other risks.
Why use it?
It replaces broad, time-consuming repository browsing with a focused view of the files and relationships most relevant to a change.

Skill for Claude CodeCodex

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 skills/dojogenesis/mcp/codebase-viewer
Any agent
npx skills add DojoGenesis/mcp --skill codebase-viewer
Clone the repo
git clone --depth 1 https://github.com/DojoGenesis/mcp

Made for: Claude Code, Codex.

Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 720 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.00034 $0.00720
Opus 5 $0.00017 $0.00360
Sonnet 5 $0.00007 $0.00144
Haiku 4.5 $0.00003 $0.00072

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

Security

Grade A, and why

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

internal/skills/bundled/dojo-craft/codebase-viewer/SKILL.md · 90 lines

How it starts

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

Codebase Viewer

Produces a structured codebase map — not a file listing but an annotated architecture view with entry points, dependency flow, test coverage, and danger zones.

Workflow

1. TREE

Generate directory structure (2-3 levels deep) with role annotations:

  • Each directory gets a one-line role description
  • Mark directories as: source, test, config, docs, build, generated, vendored
  • Flag empty directories and their likely purpose
  • Respect .gitignore — skip node_modules, vendor, build outputs

2. ENTRY

Identify entry points — where execution begins:

  • main functions (Go, Rust, Python)
  • CLI command handlers
  • HTTP route registrations
  • Event listeners and subscribers
  • Scheduled task definitions
  • Test suites (as secondary entry points)

3. DEPS

Map the dependency graph:

  • External dependencies from go.mod / package.json / Cargo.toml / requirements.txt
  • Internal package import relationships
  • Circular dependency detection
  • Heavyweight dependencies (large transitive dep trees)

4. TESTS

Scan for test coverage:

  • Which packages/directories have test files
  • Test-to-source ratio per directory
  • Packages with zero tests (flag as risk)
  • Test patterns in use (unit, integration, e2e, benchmark)

5. PATTERNS

Identify architectural patterns:

  • Clean architecture / hexagonal / onion (ports-and-adapters)
  • MVC / MVVM
  • Microservice boundaries
  • Monolith with internal module separation
  • Event-driven / message-passing
  • Repository pattern / service layer

6. DRAGONS

Flag areas of concern — severity-labeled:

  • CRITICAL: Files >1000 lines, circular dependencies, hardcoded secrets
  • WARNING: Files >500 lines, deeply nested code (>4 levels), TODO/FIXME density >5 per file
  • INFO: No tests for package, outdated dependencies, unused imports

7. CONTRACTS

Identify interfaces and API boundaries:

  • Go interfaces and their implementors
  • HTTP API surface (routes, methods, request/response types)
  • gRPC / protobuf definitions
  • Event schemas
  • Configuration contracts (env vars, config files)

Read the full file on GitHub · 90 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 · 90 lines · 34 tokens per session scan A fd252bb1ba6d

Subscribe to this mod's changes

codebase-viewer is a skill published in the GitHub repository DojoGenesis/mcp (0 stars, last pushed 1mo ago), licensed MIT. It adds 34 tokens to every session and 720 once invoked, about $0.0002 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.