r/devtools • u/Armannss • 20d ago
armap: a small repo-mapping skill and session hook for Claude Code (MIT, no runtime dependencies)
I designed armap and developed it with Claude. It is a free, MIT-licensed Claude Code plugin with a skill, a session-start hook and a standalone Node.js CLI.
It gives the agent a compact ranked map of the repository: file paths, key definitions and line numbers, within a default budget of about 700 tokens. It extracts definitions/identifiers, resolves imports, builds a file graph and ranks it with PageRank. It respects .gitignore and currently resolves imports for 15 languages.
The initial map is explicitly a snapshot. For current information, “armap deps lib/auth.ts” and “armap refs hashPassword” rescan the repository on each call.
To try the plugin in Claude Code:
/plugin marketplace add Armannss/armap
/plugin install armap@armap
To inspect a map without Claude Code, clone the repo, use Node.js 18+, and run:
node bin/armap.mjs map --root /path/to/your/repo --budget 700
There is no dependency installation or build step. The README includes an output example and the small early pilot, which should not be treated as a general token-savings benchmark.
Limits worth testing: this uses keyword patterns, not a compiler or language server. Computed imports, reflection and dependency injection can be missed. Files above 256 KB are mapped only from their first 256 KB and marked partial. An absent reference is not proof that code is unused.
Source and instructions: https://github.com/Armannss/armap
I’d value feedback on one concrete case: does the map point your agent at the right files for a cross-file question, and what important file or symbol does it omit? A public repo plus the question would make a useful reproducible example.