Ranked symbol map of a codebase within a token budget — a compact "what matters in this repo" before reading files.

MITAuto-check passedDevelopment

Install Repo Map

skills CLI
$ npx skills add AnastasiyaW/codex-claude-code-config --skill repo-map -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install AnastasiyaW/codex-claude-code-config repo-map --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/AnastasiyaW/codex-claude-code-config.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/development/repo-map .claude/skills/repo-map && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
repo-map
GitHub stars
154
Token cost
~1.5k tokens
SKILL.md length
645 words
Files
2 (incl. scripts)
Skills in repo
50
Repo updated
First seen
Licence
MIT

At a glance

Ranked symbol map of a codebase within a token budget — a compact "what matters in this repo" before reading files.

  • Works in 4 steps: Extract definitions… → Build a directed graph: edge F → D when… → Run PageRank over the file graph →… → …
  • Starting work in an unfamiliar/large codebase
  • SKILL.md covers When to use, Usage, How ranking works and Gotchas, plus 2 more sections
  • Runs Python scripts from its folder; calls python and git

What it does

Repo Map is an agent skill from AnastasiyaW/codex-claude-code-config. 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…

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including scripts (for example `scripts/repo_map.py`).

It sits in Development, covering Codebase onboarding, LLM cost and token optimization and Code quality. The repository describes itself as: Claude Code, Codex, and multi-agent configuration system: principles, hooks, skills, and workflow patterns for AI-assisted development. The licence is MIT.

When your agent uses it

  • Starting work in an unfamiliar/large codebase
  • Before a refactor
  • Deep-review fan-out
  • You need JIT context instead of dumping whole files

Example prompts

  • “what matters in this repo”
  • “give me a map of this repo / where are the important functions / what”
  • “/repo-map”

Requirements

  • Python 3

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Extract definitions (functions/classes/types) and identifier references per file
  2. Build a directed graph: edge F → D when file F references an identifier
  3. Run PageRank over the file graph → structurally-central files float up
  4. Symbol score = pagerank(def_file) × (1 + total_refs) × rarity. Emit highest

What it can do on your machine

Read from SKILL.md and the folder at commit 67709af. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python
    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • aider.chat

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Repo Map loads about 1.5k tokens when it runs. Until then it costs about 167 tokens; SKILL.md has 645 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~167
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from AnastasiyaW/codex-claude-code-config at commit 67709af, republished under its MIT licence (© AnastasiyaW). 645 words, ~1,482 tokens.

Download SKILL.mdSave it as .claude/skills/repo-map/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
repo-map
description
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).

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.

Show full SKILL.md (305 more words)Show less

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.

© AnastasiyaW, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (scripts) in skills/development/repo-map of AnastasiyaW/codex-claude-code-config.

  • SKILL.md
  • scripts/repo_map.py

Open the folder on GitHubat commit 67709af

Compare with similar skills

Repo Map next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Repo Map compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Repo Map this skillAnastasiyaW/codex-claude-code-config154—~1.5kAutomated safety check: PassMIT
Ponytail Lazy Developer ModeDietrichGebert/ponytail160k1 repos~873Automated safety check: PassMIT
Systematic Code Refactoringluongnv89/claude-howto42k—~3kAutomated safety check: PassMIT
Dignified Python Standardsdocling-project/docling69k—~1.5kAutomated safety check: PassApache-2.0
Clean Code GuardamElnagdy/guard-skills1.3k2 repos~4.3kAutomated safety check: PassMIT
Code Refactoring Workflowluongnv89/claude-howto42k—~3.1kAutomated safety check: PassMIT

Similar skills

  • Ponytail Lazy Developer Mode

    DietrichGebert/ponytail

    Makes the agent pick the laziest solution that works: skip unneeded work, reuse what exists, prefer the standard library and platform features, and keep diffs small.

    160k GitHub starsUsed in 1 repo~873 tokens
    DevelopmentAuto-check passed
  • Systematic Code Refactoring

    luongnv89/claude-howto

    Guides refactoring in phases based on Martin Fowler's method: research, test coverage check, planning and small tested steps, with your approval at each phase.

    42k GitHub stars~3k tokensUpdated today
    DevelopmentAuto-check passed
  • Dignified Python Standards

    docling-project/docling

    Applies opinionated production Python conventions chosen by the project's Python version: modern type syntax, pathlib, explicit checks and interface guidance.

    69k GitHub stars~1.5k tokensUpdated today
    DevelopmentAuto-check passed
  • Clean Code Guard

    amElnagdy/guard-skills

    Reviews generated or changed production code against Clean Code, SOLID, DRY, KISS, YAGNI and LLM-specific failure modes before it ships, in any language.

    1.3k GitHub starsUsed in 2 repos~4.3k tokens
    DevelopmentAuto-check passed
  • Code Refactoring Workflow

    luongnv89/claude-howto

    Guides systematic, test-backed refactoring in the style of Martin Fowler, moving through research, planning and small incremental changes with your approval at each phase.

    42k GitHub stars~3.1k tokensUpdated today
    DevelopmentAuto-check passed
  • A code-change gate for the iPolloWork repository: search and reuse first, keep one source of truth, justify every new file or dependency, and audit the change.

    6.8k GitHub stars~2.7k tokensUpdated yesterday
    DevelopmentAuto-check passed

More from AnastasiyaW/codex-claude-code-config

All 50 skills in this repo
  • Bug Reproducer

    AnastasiyaW/codex-claude-code-config

    Find likely software bugs in a codebase, rank concrete bug candidates, and prove or reject them with focused regression tests before proposing a fix.

    154 GitHub stars~4.1k tokensUpdated today
    Auto-check passed
  • Motion Framer

    AnastasiyaW/codex-claude-code-config

    A skill your agent uses when implementing Motion or Framer Motion in React/JavaScript: interactive UI components, micro-interactions, gestures, layout or page transitions, and scroll-based animation.

    154 GitHub starsUsed in 1 repo~5.2k tokens
    Auto-check passed
  • Proof Verify

    AnastasiyaW/codex-claude-code-config

    Plan-based verification - freeze acceptance criteria before building, then verify after with an independent fresh-context agent (the builder must not verify their own work).

    154 GitHub stars~2.6k tokensUpdated today
    Auto-check passed
  • Workflow Orchestration

    AnastasiyaW/codex-claude-code-config

    Написание и запуск Claude Code dynamic workflows (JS-оркестратор субагентов).

    154 GitHub stars~3.8k tokensUpdated today
    Auto-check passed
  • Notebooklm Grounded Research

    AnastasiyaW/codex-claude-code-config

    A skill your agent uses when: NotebookLM, notebooklm MCP, large documentation sets, courses, books, papers, or citation-backed research are mentioned.

    154 GitHub stars~2.4k tokensUpdated today
    Auto-check: warnings
  • Deepseek Provider Contract

    AnastasiyaW/codex-claude-code-config

    Validate a proposed DeepSeek API integration before any key or project context is sent: check thinking-mode tool-call history, strict-schema assumptions, bounded output, and provider data boundaries.

    154 GitHub stars~1.2k tokensUpdated today
    Auto-check passed

Categories

Questions about Repo Map

What does Repo Map do?

Ranked symbol map of a codebase within a token budget — a compact "what matters in this repo" before reading files. Repo Map is an agent skill from AnastasiyaW/codex-claude-code-config. Ranked symbol map of a codebase within a token budget — a compact "what matters in this repo" before reading files.

When should I use Repo Map?

Repo Map fits situations like: starting work in an unfamiliar/large codebase; before a refactor; deep-review fan-out; you need JIT context instead of dumping whole files.

How do I install Repo Map in Claude Code?

Run `npx skills add AnastasiyaW/codex-claude-code-config --skill repo-map -a claude-code`. Or copy the skill folder (skills/development/repo-map in AnastasiyaW/codex-claude-code-config) into .claude/skills/repo-map in your project. Claude Code loads it when a task matches its description.

How do I install Repo Map in Codex?

Run `npx skills add AnastasiyaW/codex-claude-code-config --skill repo-map -a codex`. Or copy the skill folder (skills/development/repo-map in AnastasiyaW/codex-claude-code-config) into .agents/skills/repo-map in your project. Codex loads it when a task matches its description.

Can I use Repo Map in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add AnastasiyaW/codex-claude-code-config --skill repo-map -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/repo-map, .gemini/skills/repo-map, .github/skills/repo-map and .opencode/skills/repo-map in your project.

What does Repo Map need to run?

Going by SKILL.md and its folder, Repo Map needs Python for the scripts in its folder and the command-line tools its instructions call (python and git). Our summary lists: Python 3.

Does Repo Map access the network?

SKILL.md names 1 domain. As links in the text: aider.chat. This is read from the text; nothing was executed.

Is Repo Map safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Repo Map use?

Repo Map is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Repo Map use?

About 1.5k tokens (SKILL.md is roughly 5.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Repo Map?

Skills that share tags, products or a category with Repo Map: Ponytail Lazy Developer Mode (DietrichGebert/ponytail, 160k stars), Systematic Code Refactoring (luongnv89/claude-howto, 42k stars), Dignified Python Standards (docling-project/docling, 69k stars) and Clean Code Guard (amElnagdy/guard-skills, 1.3k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Repo Map?

AnastasiyaW (a GitHub user) maintains it in AnastasiyaW/codex-claude-code-config, which has 154 GitHub stars. The repository holds 50 skills in this directory. The repository was last updated on October 9, 2026.

Source: AnastasiyaW/codex-claude-code-config on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.