/map:map [scope] [build|refresh|check|dedupe|research] [apply]from Map
Creates and maintains a git-ignored map/ folder with computed duplicates, image registers, and notes that help agents avoid rebuilding helpers or misreading context. Use for repo mapping, deduplication, and keeping reference images as linked pages.
Ships in Map. 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.
Read when SKILL.md points to them; scripts run unread.
Keep what search cannot answer in a git-ignored map/ folder: computed duplicates, one register of images, the choices search gets wrong, and pages that say when they have gone stale.
[scope] [build|refresh|check|dedupe|research] [apply]
All optional. No map means build; an existing map means refresh. check is read-only. dedupe decides duplicates and edits source only with apply or an equivalent request. research keeps findings as pages: read research.md.
map/
README.md routes by task: "adding UI: reuse.md". Under 80 lines.
reuse.md | Name | Where | Use when |, only where search misleads
dupes.md generated; you fill its Decision column
images.md generated; you fill its Shows column
images/ reference images only
notes/<area>.md reasons, invariants, traps, "changing X means also changing Y"
research/ optional
.ignore globs to leave out, one per line: vendored and generated code
Each page you write below the root opens with a title, an Up: line linking its parent, and a Covers: line naming the code it describes, such as Covers: src/billing/**, lib/tax.ts. Cover only the files a page makes claims about: a page covering all of src/ goes stale on every change and teaches agents to ignore the warning. The root covers nothing. check warns about broad globs and rejects ones that match nothing. Name paths and symbols. Line numbers and copied code rot, so leave them out.
Write a page only for facts a fresh agent would otherwise miss. A small repo may have no notes at all, and directories never get a page each: overviews did not help agents reach the right files, and context raised cost by over 20%.
Product images stay where the build expects them, because nothing that ships can depend on an ignored folder. images.md is the one place that indexes them.
Run python3 <skill>/scripts/map.py <command> inside the repo, with <skill> resolved from this file's folder. These numbers are computed; use them over your own estimates.
| Command | Gives |
|---|---|
init | Creates and ignores map/. Refuses a folder it did not make: stop and ask |
scan | Code by area |
symbols [glob] | Exports ranked by how many files mention them |
dupes --write, images --write | Regenerate a register, keeping its last column |
stamp [pages] | Records a page as true of the code now |
check | Lint and stale pages, naming what changed. Exit 0 means clean |
init, then scan. Create map/.ignore if vendored or generated paths need leaving out.
dupes --write and images --write. Leave Decision blank until a dedupe pass.
Write reuse.md from dupes and symbols, reading the files it names. Add a row only where a searching agent could still go wrong: which of several similar things is canonical, or a helper whose name hides its job. Agents already find most code by searching, so this is a short list, not an index of exports. Drop fan-in hits that are only name matches.
Add notes/ only where reading the code would not reveal the trap.
Fill Shows for images agents will need to pick between, opening each one you describe.
Write the root README, linking every page.
Add this line to AGENTS.md, or CLAUDE.md if that is what exists; create neither:
Project map: map/README.md (git-ignored, may be absent; in a worktree, see the main checkout). Before adding a component, helper, or image, check map/reuse.md and map/images.md.
stamp, then check. Fix everything it reports.
Run check, then read only the pages and files it names. Correct those pages, stamp each one, regenerate the registers, and run check again. Stamping says the page is true now, so stamp only what you re-read.
Run dupes --write. For each undecided row, largest first, read every location and write canonical: <path> (most used, best tested, or best placed) or accepted: <why>. A same-name row can be coincidence. Report the proposed consolidations.
With apply, consolidate one group at a time, update callers, run the project's tests, then dupes --write. Stop at a failure you cannot explain.
Search it by naming the path, rg term map/, because search tools skip ignored folders. From a linked worktree the map is in the main checkout; the script finds it there.
State what was built or refreshed, the largest duplicates, the check result, and any line added to a tracked file. Say plainly what could not be verified.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub blakecyze/skills --plugin map