map-codebase

map-codebase is a skill for Claude Code from duthaho/claudekit. It costs 112 tokens per session (2,166 once invoked), scanned A, original, MIT.

A method for building an evidence-based map of an unfamiliar codebase or subsystem. It records relevant files, line references, how calls move between parts of the code, and unanswered questions.

In plain words
What is it for?
Use it when onboarding, tracing how a feature works, finding callers of a function, planning a refactor, or investigating behavior that crosses multiple system boundaries.
Why use it?
It helps developers understand the scope and possible side effects of a change before editing several modules. Each conclusion is tied to code instead of memory or guesswork.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Part of the claudekit plugin — 15 skills, 8 agents shipped together

Good fit Use it when onboarding, tracing how a feature works, finding callers of a function, planning a refactor, or investigating behavior that crosses multiple system boundaries.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/duthaho/claudekit/map-codebase
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.

Any agent
npx skills add duthaho/claudekit --skill map-codebase
Clone the repo
git clone --depth 1 https://github.com/duthaho/claudekit

Made for: Claude Code.

Or install claudekit, the plugin that ships this one along with the rest of its 15 skills, 8 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 map-codebase

README.md
[![agentmods](https://agentmods.dev/badge/skills/duthaho/claudekit/map-codebase/github.svg)](https://agentmods.dev/skills/duthaho/claudekit/map-codebase)
Your own site
<a href="https://agentmods.dev/skills/duthaho/claudekit/map-codebase"><img src="https://agentmods.dev/badge/skills/duthaho/claudekit/map-codebase/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 map-codebase

Your own site · 80×15
<a href="https://agentmods.dev/skills/duthaho/claudekit/map-codebase"><img src="https://agentmods.dev/badge/skills/duthaho/claudekit/map-codebase.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 112 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,166 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00112 $0.02166
Opus 5.5 $0.00045 $0.00866
Sonnet 5.5 $0.00022 $0.00433
Haiku 4.5 $0.00011 $0.00217

Measured 1mo ago against content hash a8d79a734d8b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

map-codebase 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 1mo 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.

skills/map-codebase/SKILL.md · 155 lines

How it starts

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

Map Codebase

Overview

A methodical exploration workflow that produces an evidence-cited map of a codebase area. Replaces ad-hoc grep with a disciplined four-step pass: scope, list, read, diagram. The output is a short artifact you can attach to a plan or design doc — file paths, line numbers, call directions, and the questions you couldn't answer from reading. The skill's value is enforcing that every claim about the code is backed by a specific file:line citation, not a memory or pattern-match. Senior ICs and tech leads use it to bound the blast radius of a change before they propose it.

When to Use

  • Before writing a plan that touches more than one module
  • When inheriting a codebase area you didn't author
  • When a teammate asks "how does X work" and you don't have a confident answer with citations
  • Before a refactor, to enumerate everything that calls the code you're about to change
  • When debugging crosses a boundary you don't fully understand (auth, ORM, framework internals)

When NOT to Use

  • The change is single-file and you've already read the file
  • You're modifying code you wrote yourself within the last week
  • The "exploration" is really a one-line lookup that Grep answers in 5 seconds

Process

Step 1: Scope

Goal: Pin down what you are mapping and what you explicitly are not.

Inputs: A task, plan, or question that triggered the need to explore.

Actions:

  1. Write one sentence: I am mapping <X> in order to <Y>. X is concrete (a feature, a module, a request path). Y is the decision the map will support.
  2. Write one sentence naming what is out of scope: I am not mapping <Z>. This prevents the exploration from sprawling.
  3. Set a time box. 30 minutes for a single feature, 90 minutes for a subsystem.

Output: A two-sentence scope statement at the top of your scratch artifact.

Step 2: List entry points

Goal: Enumerate every place execution can enter the area being mapped.

Inputs: The scope statement.

Read the full file on GitHub · 155 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. 1mo ago First seen · 155 lines · 112 tokens per session scan A a8d79a734d8b

Subscribe to this mod's changes

map-codebase is a skill published in the GitHub repository duthaho/claudekit (97 stars, last pushed 3mo ago), licensed MIT. It adds 112 tokens to every session and 2,166 once invoked, about $0.0004 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-30.

Related

Other skills, from other repositories

eval-hooks

Audit Claude Code and Codex hooks for validity, safety, and correctness across settings.json, hooks.json, config.toml, plugin, and skill or agent frontmatter hooks. Resolves each command, checks event names, handler types, matchers, exit-code and JSON decision strategy, and timeouts against each host's documented…

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

check-cache-bugs

Audit Claude Code setup for cache bugs (CC#40524): sentinel, --resume/--continue, attribution header + ArkNill B3/B4/B5.

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

sandbox-unblock

Diagnostic protocol to run before reporting a sandbox blocker or asking for a configuration change. Eleven checks that eliminate false positives, then a report template the person holding the settings can act on. On one measured day, six of eight reported blockers turned out to be false, all from the same handful of…

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

monitoring-observability

OpenTelemetry, structured logging, distributed tracing, alerting, and dashboards. Use when instrumenting services, designing logs/traces/metrics, defining SLOs and alerts, or debugging production behavior from telemetry.

travisjneuman/.claude · 48 tokens

investigate

Systematic root-cause debugging: find the cause before writing any fix.

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

qa

Systematic QA testing of a web application: diff-aware, tiered, with fix-and-verify loop.

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