/codebase-mapper:mapfrom codebase-mapper
Creates and maintains a codebase map as native Claude Code rules: an index plus one card per area. Useful for onboarding, documenting, or starting a new project map.
Ships in codebase-mapper. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The map is plain Claude Code rules, so Claude Code loads it for you. Nothing here is injected by a hook.
.claude/rules/codebase-map.md the index, always loaded, 40 lines at most
.claude/rules/map/<area>.md one card per area, loads when a file in the area is first touched
Never edit CLAUDE.md. Never write anything outside .claude/rules/.
A third kind of file exists only when an older map held guidance a person wrote: .claude/rules/guides/<name>.md. See step 1.
Index (codebase-map.md), no frontmatter:
Card (map/<area>.md), about 2 KB at most:
---
paths:
- "src/billing/**"
verified-at: <output of git rev-parse HEAD>
---
# Billing
What it owns, in a sentence.
- Entry points: files an agent starts reading from.
- How it works: the few facts you cannot see from a file name.
- Touches: other areas it calls or is called by.
- Watch out: traps that cost someone time.
Rules for a card: write facts you checked in the code, with file paths. No incident history, no lessons, no guidance a person wrote (step 1 says where those go), no copied code. refresh rewrites a card from the code, so anything else on it is erased the next time. Globs use ** and must match real files. Braces work in paths (src/**/*.{ts,tsx}). Negation does not: the status script cannot read it. A name with no slash (README.md) loads at any depth. Write /README.md for the top folder only. Never start a pattern with ./: the host loads nothing for it. Keep them to the area.
.claude/rules/codebase-map.md exists, stop and offer refresh instead. The same when it is gone and cards exist under .claude/rules/map/: the map lost its index, and refresh writes it again. If .claude/.codebase-info/ exists (an older map), read it as source material and sort its documents before anything else:
.claude/rules/guides/<name>.md, in its own words, changed only where it names the old folder. Give it paths frontmatter for the files it is about, so it loads when those are touched; only a short guide that applies everywhere goes without. No verified-at: nothing checks it and refresh never touches it. A document that mixes both: the description is a lead, the guidance is copied to a guide.[route:explore] so it runs on the cheap tier. Otherwise use plain Explore agents. Each scout returns its area's purpose, entry points, key files, neighbours and traps. Scouts never write.verified-at with the current git rev-parse HEAD. Run node "${CLAUDE_SKILL_DIR}/../../scripts/map-status.mjs" and fix any card whose globs match no file or that is over size.git status and git diff, or the new files). Do not commit. With an older map, list every one of its documents and where it went: a lead for which card, copied to which guide, or left out and why. Nothing disappears without a line. Say that the cards load when a file in their area is touched, and that refresh re-derives the ones that go stale..claude/.codebase-info/ existed, ask whether to remove it now that the map is native. Delete it only on a yes.A repo with a handful of areas needs a handful of cards. If you are past ten, merge areas. If a card cannot fit in 2 KB, the area is too big: split it by what an agent would want to read next.
The index is under 40 lines, every card has paths and verified-at, the status script shows no empty globs, and the person has seen the files.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub eigenwise/eigenwise-toolshed --plugin codebase-mapper2 skills in this plugin
Other plugins' skills for the same job