From pm-tokens
Generates a compact repo map (tree + line counts + top-level symbols) and installs a read-the-map-first discipline to cut exploration tokens by ~97%. Use when asked to explore a repo efficiently or stop re-reading the whole codebase.
How this skill is triggered — by the user, by Claude, or both
Slash command
/pm-tokens:repo-mapThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Agents burn their context windows on exploration: reading ten files to find the one, re-reading them next session, paying full price for code that was only ever navigation. The fix is the oldest one in computing — an index. This skill generates a compact, deterministic map (tree + line counts + top-level symbols via regex, no parser dependencies, nothing leaves the machine) and installs the dis...
Agents burn their context windows on exploration: reading ten files to find the one, re-reading them next session, paying full price for code that was only ever navigation. The fix is the oldest one in computing — an index. This skill generates a compact, deterministic map (tree + line counts + top-level symbols via regex, no parser dependencies, nothing leaves the machine) and installs the discipline that makes it pay: read the map first, open only the files whose names and symbols match the task. The script prints its own economics: a typical map costs ~3% of reading everything.
Ask for these if not provided:
src/ beats mapping node_modules' ancestors)--max-files guards the map's own size; a 40,000-file map defeats itself)python3 scripts/repo_map.py .
python3 scripts/repo_map.py src --max-files 400 --max-symbols 8
Deterministic (sorted walk), stdlib-only, local. Skips .git, node_modules, build dirs. Symbols via per-language regex — deliberately humble: top-level names, not a full graph; the point is navigation, not analysis. Header prints files, lines, and the map-vs-everything token comparison.
refund appears in billing/refunds.py → process_refund, RefundPolicy") — the map converts "read around and see" into a shortlist, and the shortlist is the saving.[The script's map output]
Open: [the shortlist, with the matching symbol/name per file] Skip: [the big directories the task doesn't touch] If not found: [the grep to run next, on the shortlist first]
--max-files and subdirectory scoping exist because a bloated map is just a slower file dumpThe codebase-as-index pattern — local knowledge graphs for agent navigation (as in Graphify, which does the full tree-sitter graph version) — distilled here into a zero-dependency, deterministic map with the read-the-map-first discipline.
npx claudepluginhub mohitagw15856/pm-claude-skills --plugin pm-tokensBuild a ranked, token-budgeted map of the codebase — the top files and their key symbols, ranked by how referenced they are — so you navigate to the right 3 files instead of reading 30. Triggers on "map the repo", "where is X", "how is this codebase laid out", "lay of the land", "I'm new to this repo", or at the start of work in a large/unfamiliar project. A zero-dependency repo-map (Glob + Grep + reference counts) that approximates a code graph; complements Sentinel's architectural map and saves tokens.
Orchestrates parallel subagents to map any codebase, creating docs/CODEBASE_MAP.md with architecture, file roles, dependencies, and navigation. Updates incrementally via git or scans.
Generates and incrementally refreshes a per-directory codemap (a codemap.md in each significant folder) so agents get a cheap, always-fresh structure map before exploring. Only regenerates maps for directories that changed since the last run, tracked via .rc/codemap state. Use to build or refresh the repo's codemaps; read the maps first in any exploration-heavy task to cut token cost. Do not use to analyze a specific bug or trace one flow (use rc-analyze).