Skip to main content
AIDiveForge AIDiveForge
🗺️

Codebase Map

Code & Development · by AIDiveForge · Apr 17, 2026 · Advanced · ✓ 1 verified compat

Compress an entire repo into a single LLM-digestible context bundle with an import graph and hot-file list.

🧠 Why it works

LLMs 'understand' code better when the repository's shape is visible, not just the current file. Blindly concatenating files blows past any context window; summarizing without shape loses the import graph that tells you which file matters most. A pre-computed map gives the model the same mental model an experienced dev builds after a week on a repo, in one prompt.

⚙️ How it works

1) Walk the working tree, honoring .gitignore + a skill-level ignore list (node_modules, .venv, build/). 2) For each file, produce a 3-line summary using the local LLM (line count, main exported symbol, first doc-comment). 3) Build an import-graph by tokenizing import / from / require statements; compute PageRank to find hot files. 4) Emit a single codebase-map.md with: directory tree, top-20 hot files verbatim, per-file summaries for the rest. 5) Cap at a configurable context size; drop lowest-rank summaries first if over budget.

Description

Reusable skill modeled on GitIngest / repomix: walks a repo, respects .gitignore, flattens it into a single markdown bundle with a directory tree, per-file summaries, and a cross-reference graph pointing to the most-imported symbols.

Install this skill

A Claude skill is a skill.md file with YAML frontmatter and a markdown body. Drop the file into your tool of choice — or pick a different format if you use Cursor, Windsurf, Copilot, or something else.

Download skill.md
mkdir -p ~/.claude/skills/codebase-map \
  && curl -L https://aidiveforge.com/skill/codebase-map.skill-md \
       -o ~/.claude/skills/codebase-map/skill.md

Save to ~/.claude/skills/codebase-map/skill.md

Recommended Use

Tools and workflow packs this skill pairs well with. Forge picks are auto-generated from category + capability signals; Community picks are added by people who've used the pairing.