From code-intelligence
Generates navigable _MAP.md files showing exports, imports, function signatures, and class methods via AST parsing. Use when exploring unfamiliar repositories or understanding project structure.
How this skill is triggered — by the user, by Claude, or both
Slash command
/code-intelligence:mapping-codebasesThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Generate `_MAP.md` files providing hierarchical code structure views. Maps show function signatures, class methods, imports, and line numbers—enabling API understanding without reading full source files.
Generate _MAP.md files providing hierarchical code structure views. Maps show function signatures, class methods, imports, and line numbers—enabling API understanding without reading full source files.
uv venv /home/claude/.venv
uv pip install tree-sitter-language-pack --python /home/claude/.venv/bin/python
Bundled parsers: The skill includes pre-built parsers for all 11 supported languages (Python, JavaScript, TypeScript, TSX, Go, Rust, Ruby, Java, C, HTML, Markdown) in parsers/. These are used automatically when the tree-sitter-language-pack runtime download fails (e.g., in proxied environments). No network access needed for supported languages.
/home/claude/.venv/bin/python /mnt/skills/user/mapping-codebases/scripts/codemap.py /path/to/repo --skip tests,.github,locale
Common skip patterns: tests,.github,.husky,locale,migrations,__snapshots__,coverage,target,docs
After generating maps, use them for navigation—read _MAP.md files, not source files directly.
Workflow:
_MAP.md for high-level structureMaps reveal without reading source:
def record_attempt(subtask_id, session, success, approach, error=None) :200RecoveryManager → classify_failure(), is_circular_fix(), rollback_to_commit()Anti-pattern: Reading files directory-by-directory. Use maps to find what you need, then read only the specific file/lines required.
Each _MAP.md includes:
:42-85 format) showing symbol start and end lines///, # commentspub const, #define, export const, Go const)Example:
# services/
*Files: 4 | Subdirectories: 0*
## Files
### recovery.py
> Imports: `json, subprocess, dataclasses, datetime, enum`...
- **FailureType** (C) :24-38
- **RecoveryManager** (C) :43-510 — Manages error recovery strategies.
- **__init__** (m) `(self, spec_dir: Path, project_dir: Path)` :55-72
- **classify_failure** (m) `(self, error: str, subtask_id: str)` :137-198 — Classify an error into a FailureType.
- **record_attempt** (m) `(subtask_id, session, success, approach, error=None)` :200-240
- **is_circular_fix** (m) `(self, subtask_id: str, current_approach: str)` :242-280
- **get_recovery_hints** (m) `(self, subtask_id: str)` :495-510
# Generate maps
/home/claude/.venv/bin/python /mnt/skills/user/mapping-codebases/scripts/codemap.py /path/to/repo
# Skip directories
/home/claude/.venv/bin/python /mnt/skills/user/mapping-codebases/scripts/codemap.py /path/to/repo --skip tests,.github
# Clean maps
/home/claude/.venv/bin/python /mnt/skills/user/mapping-codebases/scripts/codemap.py /path/to/repo --clean
# Dry run
/home/claude/.venv/bin/python /mnt/skills/user/mapping-codebases/scripts/codemap.py /path/to/repo -n
# Verbose (debug output)
/home/claude/.venv/bin/python /mnt/skills/user/mapping-codebases/scripts/codemap.py /path/to/repo -v
Default skips: .git, node_modules, __pycache__, .venv, venv, dist, build, .next
Python, JavaScript, TypeScript, TSX, Go, Rust, Ruby, Java, C, HTML, Markdown.
_prefix) excluded from top-level exportsnpx claudepluginhub oaustegard/claude-skills --plugin code-intelligenceOrchestrates parallel subagents to map any codebase, creating docs/CODEBASE_MAP.md with architecture, file roles, dependencies, and navigation. Updates incrementally via git or scans.
AST-powered code navigation via tree-sitter. Auto-scans codebases for progressive-disclosure tree views with symbol search, source retrieval, and reference finding. Use when exploring unfamiliar repos.
Maps codebase structure, patterns, symbols, and dependencies using ast-grep and bash scripts. Outputs factual maps with paths/line numbers to .artifacts/research/.