anastasiyaw-repo-map
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "anastasiyaw-repo-map" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-85db75cf224093088326917a86d0e061b4e7deafd4b848f9544d75662ce852ba. Verify the upstream source and version against https://github.com/AnastasiyaW/codex-claude-code-config before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
github.com
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Extract and rank symbols within token budget to produce a concise "what matters in this repo" map. Zero dependencies (standard library only), uses Aider-inspired regex extraction and PageRank ranking rather than tree-sitter parsing; intended to quickly locate important symbols, functions, and structure in unfamiliar or large codebases, not for security audits or code-quality evaluation.
Introduction source: third_party · AnastasiyaW · 0.0.1 Reference
SkillPi interpretation
- Tasks
- 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).
- Audience
- **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.
- Testing
- Not tested
Browse files
Frontmatter
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-orchestrationfan-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
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— emitpath:line: nameinstead 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
# 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
- 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).
- Build a directed graph: edge
F → Dwhen fileFreferences an identifier defined in fileD. Rare identifiers (defined in few files) weigh more. - Run PageRank over the file graph → structurally-central files float up (shared utilities, core models, base classes).
- 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()withtree-sitter-language-packtags — 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--topto 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
| Symptom | Cause | Fix |
|---|---|---|
0 files scanned |
ROOT has no recognized source extensions, or all gitignored | Check git ls-files; point ROOT at the source subdir |
| A key function is missing | Regex didn't match its signature style | Lower --budget-tokens pressure (raise budget) or accept the limitation; verify by grep |
--top 12 appears to find only 12 definitions |
Post-cap count confused with extraction | Inspect symbols_extracted_total; remove caps before investigating actual extraction misses |
| Map dominated by one vendored file | A vendor//generated tree got scanned (non-git mode) |
Run inside the git repo, or point ROOT at hand-written source |
| Wrong/old map | File moved; map is a point-in-time snapshot | Re-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.
Version history
-
v2026.10.24
GitHub ↗
Original release notes
Three ideas from this month's agent-harness news, adopted as checks rather than prompts. ## New - **Output legibility** — [`docs/output-legibility.md`](https://github.com/AnastasiyaW/codex-claude-code-config/blob/main/docs/output-legibility.md). Karpathy's readability ladder (STE-style text, diagram, HTML, video), plus the two ASD-STE100 rules that need no licensed dictionary: one concept keeps one term, and sentences stay short. - **`scripts/term_drift_check.py`** — checks agent output against a project glossary. It flags synonyms of your terms (`stem*` covers inflection, so it works in Russian too) and overlong sentences, and skips code, URLs and HTML comments. Exit `0` clean, `1` findings, `2` not checked. It ships with a self-test whose must-fail controls catch six deliberate breaks of the logic. - **Bounded harness-improvement pilot** — [`docs/harness-improvement-pilot.md`](https://github.com/AnastasiyaW/codex-claude-code-config/blob/main/docs/harness-improvement-pilot.md). The method behind Google Research's Harness², without the auto-patcher: a frozen suite with a held-out case, one change per candidate, strict improvement and no safety regression. - **Dead-code sweep** — a new reference in the `refactoring-safely` skill, after OpenAI's GPT-6 maintenance guide. It covers a read-only audit with production evidence and one small draft PR per removal, and keeps killswitches and safeguards out of scope. ## Changed - `rules/quality-code.md`: when you change code, update or delete the comment next to it in the same commit. Research suggests a wrong or stale comment misleads a model more than a missing one. - `CLAUDE.md`: new Harness² and Output Legibility sections. Full changelog: [`UPDATES.md`](https://github.com/AnastasiyaW/codex-claude-code-config/blob/main/UPDATES.md) · PRs #18, #19
Current listing version
0.0.1
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 解决开发者在新代码库中快速获取上下文的核心痛点
- 适用于 onboarding、重构前准备、JIT 上下文加载等多个高频场景
Highlights
- 触发场景描述清晰完整,覆盖多种典型使用变体
- 边界明确,不易与其他 Skill 混淆
Areas to improve
-
文档过长 Reported severity: Minor
SKILL.md 内容超过 500 行,影响可读性
Recommendation: 考虑将部分详细说明(如 Troubleshooting 表格)移至独立文档或通过链接引用
Highlights
- 结构完整,包含使用场景、用法、原理、注意事项等必要章节
- 提供典型用法示例,便于用户快速上手
Highlights
- 零依赖设计,仅使用标准库,确保环境兼容性
- 提供详细的 troubleshooting 指南,覆盖常见异常场景
- 参数说明完整,输出格式明确(支持 JSON)
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Domains or addresses referenced in the document
These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.
- aider.chat
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.