Skill · Published 2026-08-10

repo-map

Download repo-map.zip 99% test coverage Ported from repo_map

A Claude Skill for the first move in an unfamiliar codebase: before reading files one at a time, get the shape of the place for a fraction of the tokens.

What it does

A directory tree, plus each source file’s top-level symbols (fn/struct/class/def/…) across 98 languages — from the obvious ones (Rust, Python, JavaScript/TypeScript, Go, Java) through systems, functional, enterprise, hardware-description, and query languages (including LaTeX’s own sectioning-command titles, brace-depth-tracked so a title with its own nested formatting command is captured whole, not truncated, and Nix’s own top-level let ... in block binding names, since a Nix declaration is assignment-shaped rather than a leading keyword), ten more languages/formats in one batch — Vyper, Move, Cap’n Proto, FlatBuffers, and Nushell keyword extraction; .hcl reusing Terraform’s own extractor; justfile‘s own real recipe names (including its own .justfile dotfile spelling); BibTeX’s own real entry citekeys, the identifier a LaTeX document’s \cite{citekey} actually references; reStructuredText’s own real “setext”-style underlined section titles; and AsciiDoc’s own real ATX-style =-prefixed titles, fence-aware the same way Markdown’s # already is — plus config/data formats with a real structural shape of their own (INI/.editorconfig, dotenv, CSV/TSV headers, XML’s direct-children-of-the-root elements — covering pom.xml/.csproj/ Android manifests — .properties files’ top-level dotted namespaces, since a real Spring Boot application.properties can carry hundreds of keys under a handful of real namespaces, .mk files’ target names, reusing the identical extractor Makefile/makefile/GNUmakefile themselves already had, and Markdown’s own ATX heading text — fence-aware, so a #-prefixed shell comment inside a fenced code example is never read as a heading) — plus, most recently, eight more: CoffeeScript’s class declarations, SCSS/Sass’s shared @mixin/ @function keywords, Vim script’s function!/function forms, Assembly’s global/extern symbol-visibility directives (NASM and GNU as), and Pug’s mixin keyword — see the source repo’s own README.md for the full, current list.

python3 repo_map.py <directory>
python3 repo_map.py <directory> --json

Where this came from

Ported from the exact mechanism (repo_map, behind PinkyAI’s own pinkyai repo-map command) that nudges “map first, then read” inside PinkyAI’s own engine — including, honestly, during the build of this very skill bundle. Re-implemented independently in dependency-free Python with its own full test suite, currently at 99%+ statement coverage across 229 tests.

Honest scope

A per-line regex/keyword heuristic, not a real parser, for any language it covers: it reliably finds top-level, unindented declarations, and nothing nested inside them — a method inside a class or impl block isn’t surfaced separately, the class/impl itself is the unit this map shows. A handful of extension collisions are real and stated, not silently guessed at (.m stays Objective-C, not MATLAB/Octave; .v stays Verilog, not V) — see the source’s own module doc for the full list of what didn’t make the cut and why. XML’s own extractor is the one exception to the “per-line” rule — it scans the whole file as one character stream, so it also correctly handles a minified single-line XML config file where every other extractor here would find nothing. It answers “where should I look next,” not “what does this file do” — follow it with a real read once it points you somewhere specific.

Preview the real source

Read straight out of this skill's own source directory, unedited — the exact bytes that ship inside repo-map.zip, not a rewritten excerpt. Switch tabs to read a file before downloading, or use Copy to paste it somewhere else.

Choose a file to preview

← Back to skills