Repo Map logo

Repo Map

Community
AnastasiyaW
repo-map

Ranked symbol map of a codebase within a token budget — a compact "what matters in this repo" before reading files. Use when starting work in an unfamiliar/large codebase, before a refactor or deep-review fan-out, when you need JIT context instead of dumping whole files, or asked "give me a map of this repo / where are the important functions / what's the structure". Zero-dependency (stdlib only); Aider-inspired regex extraction and PageRank ranking, not a tree-sitter parser. Do NOT use to find correctness/security defects in a change or to audit a diff; use deep-review for that (this only ranks and lists symbols, it does not evaluate code quality).

Overview

PublisherAnastasiyaW
Repositorycodex-claude-code-config
Skill namerepo-map
Stars
212
Forks
32
Bundled files
1
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by AnastasiyaW on GitHub. Read the source before you install it.

Installation

Install the Repo Map AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/AnastasiyaW/codex-claude-code-config/tree/main/skills/development/repo-map
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/AnastasiyaW/codex-claude-code-config.git /tmp/codex-claude-code-config
mkdir -p .claude/skills
cp -r /tmp/codex-claude-code-config/skills/development/repo-map .claude/skills/repo-map
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Repo Map in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Repo Map on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Repo Map is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

repo-map

Produces a ranked list of the structurally-important symbol definitions in a codebase, capped to a token budget. The point: instead of dumping whole files (wasteful, blows the context window), get a cheap "skeleton" of the repo — the functions/classes everything else depends on — and read full files only where it matters.

This is our zero-dependency port of Aider's repo-map.

When to use

  • Onboarding to an unfamiliar or large codebase — get the lay of the land first.
  • Before a refactor / deep-review / workflow-orchestration fan-out — feed each subagent the map so it knows the important entry points without re-scanning.
  • JIT context (principle 07 / practice_context_engineering) — load the map, not the files.
  • Anytime the instinct is "let me read 20 files to understand this" → run this first.

Usage

bash
python scripts/repo_map.py [ROOT] [--budget-tokens N] [--top N] [--json] [--no-signature] [--max-files N]
  • ROOT — repo root (default: cwd). If it's a git repo, only tracked files are scanned (honors .gitignore); otherwise a filtered directory walk is used.
  • --budget-tokens (default 1024) — stop emitting once ~this many tokens are used (≈4 chars/token heuristic). Use 256–512 for a quick orientation, 2048+ for depth.
  • --top N — hard cap on symbols before the budget applies.
  • --json — machine-readable output (for piping into a workflow / another agent).
  • --no-signature — emit path:line: name instead of the full signature line.

JSON distinguishes symbols_extracted_total (before --top), symbols_ranked_after_top (after that cap), and symbols_emitted (after the token budget). The legacy symbols_total key retains its post---top meaning for compatibility. None is a semantic coverage guarantee: extraction is regex-based and --max-files can limit input. Never diagnose parser coverage from a capped map.

Typical recipes

bash
# Quick orientation in a new repo
python scripts/repo_map.py . --budget-tokens 512

# Feed a fan-out: JSON map of the most important 40 symbols
python scripts/repo_map.py /path/to/repo --top 40 --json > repo_map.json

# Focus a subdirectory (a single layer/service)
python scripts/repo_map.py /path/to/repo/services/auth --budget-tokens 800

How ranking works

  1. Extract definitions (functions/classes/types) and identifier references per file via per-language regexes (py/js/ts/tsx/go/rust/java/ruby/c/cpp/csharp/php/kotlin/swift).
  2. Build a directed graph: edge F → D when file F references an identifier defined in file D. Rare identifiers (defined in few files) weigh more.
  3. Run PageRank over the file graph → structurally-central files float up (shared utilities, core models, base classes).
  4. Symbol score = pagerank(def_file) × (1 + total_refs) × rarity. Emit highest first until the token budget is hit.

So the map surfaces the code everything else leans on, not just the first files alphabetically.

Gotchas

  • Regex extraction, not tree-sitter. Fidelity is good for ranking but not a parser. Exotic syntax, heavy macros, or unusual formatting can miss/misattribute a def. This is a deliberate trade for zero-install + runs-anywhere. To upgrade fidelity, replace extract() with tree-sitter-language-pack tags — the graph/ PageRank stages stay identical. (Don't install tree-sitter casually: it trips the 7-day supply-chain gate; gate it like any fresh dep.)
  • Token count is a heuristic (chars/4), not a real tokenizer. Treat the budget as approximate; it errs slightly high on code with many short tokens.
  • Same name in many files (e.g. get, handle) ranks each def site separately — expected, since each is a distinct definition. Use --top to trim noise.
  • Non-git dirs fall back to a denylist walk (node_modules, dist, venv, …). If your build output lives somewhere unusual, it may get scanned — point ROOT at the source dir instead.
  • Generated code (protobuf, src/gen/) can dominate ranks because it's referenced everywhere. Point ROOT at hand-written source, or filter after the fact.

Troubleshooting

SymptomCauseFix
0 files scannedROOT has no recognized source extensions, or all gitignoredCheck git ls-files; point ROOT at the source subdir
A key function is missingRegex didn't match its signature styleLower --budget-tokens pressure (raise budget) or accept the limitation; verify by grep
--top 12 appears to find only 12 definitionsPost-cap count confused with extractionInspect symbols_extracted_total; remove caps before investigating actual extraction misses
Map dominated by one vendored fileA vendor//generated tree got scanned (non-git mode)Run inside the git repo, or point ROOT at hand-written source
Wrong/old mapFile moved; map is a point-in-time snapshotRe-run — it's cheap and stateless

Verification

scripts/repo_map.py is stdlib-only and was verified to run on real trees (it correctly ranks shared-utility files to the top via PageRank). Re-run on any repo to confirm; there is no state to corrupt.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Repo Map AI skill do?

Ranked symbol map of a codebase within a token budget — a compact "what matters in this repo" before reading files. Use when starting work in an unfamiliar/large codebase, before a refactor or deep-review fan-out, when you need JIT context instead of dumping whole files, or asked "give me a map of this repo / where are the important functions / what's the structure". Zero-dependency (stdlib only); Aider-inspired regex extraction and PageRank ranking, not a tree-sitter parser. Do NOT use to find correctness/security defects in a change or to audit a diff; use deep-review for that (this only...

Why use Repo Map on TypingMind?

Because you install it once and use it with any model. Repo Map is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Repo Map in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/AnastasiyaW/codex-claude-code-config/tree/main/skills/development/repo-map. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Repo Map?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Repo Map?

As many as you like. As long as a model supports skills, you can use Repo Map with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Repo Map AI skill free?

Yes. It is published on GitHub by AnastasiyaW under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇