codebase-cartographer
Skill0 starsChanged 46 days agoMITView on GitHub
扫描仓库文件与静态 import 依赖,生成交互式代码地图。用于仓库结构和模块依赖可视化;不提供运行时调用链。
2 other projects use a version of this.
Adopted by
Most recently taken up by
- baov/proof-over-vibestheir own version, first seen Oct 15, 2026
- future-mine/claude-skilltheir own version, first seen Oct 8, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- baov/proof-over-vibes★ 3same name
- future-mine/claude-skill★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository9 other files it gives its agents.
- api-mockerSkill
- commit-poetSkill
- data-detectiveSkill
- doc-archaeologistSkill
- env-guardianSkill
- git-storytellerSkill
- regex-wizardSkill
- svg-icon-forgeSkill
- terminal-dashboardSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 17
Run the scan script to collect file metadata, detect the project type, and gather statistics.
- Distinctive: line 35
Run the dependency analyzer on the scan output to build a dependency graph.
- Distinctive: line 62
Search and filter controls
- Distinctive: line 68
After generating the map, explain the architecture to the user:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Codebase Cartographer
Resolve <skill_dir> to the directory containing this SKILL.md. Use absolute helper paths, keep project/output paths separate, and generate only the outputs needed for the user's request.
Generate an interactive architecture map for any code repository.
Workflow
Step 1: Scan the Repository
Run the scan script to collect file metadata, detect the project type, and gather statistics.
python3 "<skill_dir>/scripts/scan.py" <target_directory> [--output <scan_output.json>] [--exclude dir1,dir2]<target_directory>: The root of the repository to scan.--output: Path for the scan result JSON (default:carto_scan.jsonin the current directory).--exclude: Comma-separated list of additional directories to exclude (node_modules, .git, pycache, .venv, dist, build are always excluded).
The scan produces a JSON file containing:
- Full file list with sizes, languages, and line counts
- Project type detection (frontend / backend / fullstack / library)
- Framework and package manager detection
- Aggregate statistics (file counts per language, total lines, etc.)
Step 2: Analyze Dependencies
Run the dependency analyzer on the scan output to build a dependency graph.
python3 "<skill_dir>/scripts/analyze_deps.py" [--scan <scan_output.json>] [--output <deps_output.json>]--scan: Path to the scan JSON from Step 1 (default:carto_scan.json).--output: Path for the dependency graph JSON (default:carto_deps.json).
The analyzer:
- Parses imports for Python, JavaScript/TypeScript, Go, and Java
- Builds an adjacency-list dependency graph
- Detects circular dependencies using Tarjan's SCC algorithm
- Calculates in-degree and out-degree for each module
- Identifies hub modules (high in-degree), orchestrators (high out-degree), and island modules (zero connections)
Step 3: Generate the Interactive Map
The dependency analysis script automatically generates an HTML architecture map using the D3.js template.
The generated HTML file (carto_map.html by default) can be opened in any browser and provides:
- Force-directed graph visualization
- Node size proportional to importance (degree centrality)
- Color-coded nodes by directory / file type
- Zoom, pan, and drag interactions
- Hover tooltips with file details
- Click-to-select with info sidebar
- Search and filter controls
- Circular dependencies highlighted in red
- Dark theme
Interpreting the Map
After generating the map, explain the architecture to the user:
- Entry Points: Files with high out-degree and low in-degree are likely entry points or orchestrators. Start here to understand the application flow.
- Hub Modules: Files with high in-degree are heavily depended upon -- these are the core utilities, models, or shared libraries. Changes here have wide impact.
- Islands: Files with zero connections may be dead code, standalone scripts, or configuration files.
- Circular Dependencies: Highlighted in red -- these indicate tight coupling that may warrant refactoring.
- Clusters: Groups of tightly connected nodes often correspond to features or subsystems.
Quick One-Liner
To run the full pipeline:
python3 "<skill_dir>/scripts/scan.py" <target_dir> && python3 "<skill_dir>/scripts/analyze_deps.py"Then open carto_map.html in a browser or provide the path to the user.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

