Skip to main content
AIDiveForge AIDiveForge
🗺️

Codebase Map

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

Map a repository into entry points, dependency boundaries and a focused reading plan.

Get a compact architecture map with file references and unresolved questions.

Free · 2 KB · SKILL.md, instructions and example files. Requires read access to the repository and a file/text search tool.

A worked example

A small example to try before using your own data.

Input

{
  "files": {
    "app.py": "from routes import api",
    "routes.py": "from service import load",
    "service.py": "from storage import read",
    "storage.py": "def read(): ..."
  },
  "task": "Find where persistence behavior belongs"
}

Expected result

Entry: app.py → routes.py → service.py → storage.py. Persistence adapter: storage.read. Read storage.py and its callers in service.py first; inspect tests before changing the adapter.

What to check: Every edge must exist in the supplied imports; do not claim a runtime call graph or identify hot files without evidence.

Limits: Static imports do not prove runtime behavior. Plugins, reflection and generated routes may need runtime inspection.

Worked example included. Model-specific performance and vendor compatibility have not been benchmarked.

Installation options and other formats

Install this skill

An agent skill starts with SKILL.md. The ZIP also includes its examples and any helper scripts. 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
python3 - <<'ADF_SKILL_INSTALL'
import hashlib, io, os, stat, tempfile, urllib.request, zipfile
from pathlib import Path, PurePosixPath
folder = "codebase-map"
root = Path(os.environ.get('ADF_SKILL_ROOT', str(Path.home() / '.claude' / 'skills'))).expanduser()
destination = root / folder
if destination.exists() or destination.is_symlink():
    raise SystemExit('An installation already exists. Back it up and merge the ZIP deliberately.')
root.mkdir(parents=True, exist_ok=True)
request = urllib.request.Request("https://aidiveforge.com/skill/codebase-map.zip", headers={'User-Agent': 'AIDiveForge-Resource-Installer/1.0 (+https://aidiveforge.com/skills/)'})
with urllib.request.urlopen(request, timeout=30) as response:
    data = response.read(8 * 1024 * 1024 + 1)
if len(data) > 8 * 1024 * 1024 or hashlib.sha256(data).hexdigest() != "2ffb09730c10141b30510ee53594859fd9b2ca0e6406fbf43ee6bb9fb20de2a0":
    raise SystemExit('The download did not match this reviewed bundle. No files were installed.')
with zipfile.ZipFile(io.BytesIO(data)) as archive, tempfile.TemporaryDirectory(prefix='.adf-skill-', dir=root) as temporary:
    members = archive.infolist()
    if len(members) > 100 or sum(m.file_size for m in members) > 16 * 1024 * 1024:
        raise SystemExit('Unexpected archive size')
    for member in members:
        name = PurePosixPath(member.filename)
        if name.is_absolute() or '..' in name.parts or not name.parts or name.parts[0] != folder or '\\' in member.filename or stat.S_ISLNK(member.external_attr >> 16):
            raise SystemExit('Unsafe archive entry; nothing was installed')
        target = Path(temporary).joinpath(*name.parts)
        if member.is_dir():
            target.mkdir(parents=True, exist_ok=True)
        else:
            target.parent.mkdir(parents=True, exist_ok=True)
            with target.open('xb') as stream:
                stream.write(archive.read(member))
    staged = Path(temporary) / folder
    if not (staged / 'SKILL.md').is_file() or destination.exists() or destination.is_symlink():
        raise SystemExit('The skill could not be installed without replacing existing data')
    os.rename(staged, destination)
print('Installed the complete skill folder:', destination)
ADF_SKILL_INSTALL

Claude Code: ~/.claude/skills/codebase-map/SKILL.md. Codex: ~/.codex/skills/codebase-map/SKILL.md. Keep the complete ZIP folder when helper scripts are included.

🧠 Why it works

Every edge must exist in the supplied imports; do not claim a runtime call graph or identify hot files without evidence.

⚙️ How it works

  1. Read repository instructions and build manifests, then list source files while excluding dependencies, generated files and secrets.
  1. Locate runtime entry points and trace their immediate imports, routes or command registrations.
  1. Map modules by responsibility and show the direction of dependencies. Mark inferred or dynamic edges.
  1. Choose the shortest reading path for the requested change; include file and symbol references rather than dumping source.
  1. Validate every named file against the working tree and list concrete uncertainties.

Description

Get a compact architecture map with file references and unresolved questions.

Requires read access to the repository and a file/text search tool.

Limits: Static imports do not prove runtime behavior. Plugins, reflection and generated routes may need runtime inspection.

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.