mapping-codebases
Generate navigable code maps for unfamiliar codebases. Use when exploring a new codebase, needing to understand project structure, or before diving into code modifications. Extracts exports/imports via AST (tree-sitter) to create _MAP.md files per directory. Triggers on "map this codebase", "understand this project structure", "generate code map", or when starting work on an unfamiliar repository.
npx skills add majiayu000/claude-skill-registry --skill mapping-codebases-oaustegard-claude-skills-0a4fd9b3 --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Mapping Codebases Generate `_MAP.md` files that provide a hierarchical view of code structure without reading every file. ## Installation **CRITICAL - Use uv for dependency installation in Claude Code:** ```bash # In Claude Code environments, ALWAYS use uv with --system flag: uv pip install --system tree-sitter-language-pack # Only fall back to pip if uv is not available ``` **Why uv?** Claude Code environments have uv pre-installed for efficient package management. Using uv is faster and preferred. ## Quick Start ```bash # Generate maps for a codebase python scripts/codemap.py /path/to/repo ``` ## What It Produces Per-directory `_MAP.md` files listing: - Directory statistics (file count, subdirectory count) - Subdirectories (with links to their maps) - **Symbol hierarchy** with kind markers: (C) class, (m) method, (f) function - **Function signatures** extracted from AST (Python, partial TypeScript) - **Line number references** (`:42` format) for direct navigation - Import previews - **Markdown ToC** for `.md` files (h1/h2 headings only for brevity) - **Other Files** section listing non-code files (JSON, YAML, shell scripts, etc.) Example output: ```markdown # auth/ *Files: 5 |
- Installation
- Quick Start
- What It Produces
- Supported Languages
- Commands
- Skip Patterns
- Workflow Integration
- Post-Generation: Making Maps Persistent
- In Claude Code Environments (Persistent Repos)
- In Claude.ai Chat Environments (Ephemeral)
- Environment Detection
- Features
- Git Hook (Optional)
- Limitations
In Claude Code environments, ALWAYS use uv with --system flag: uv pip install --system tree-sitter-language-pack Only fall back to pip if uv is not available Generate maps for a codebase python scripts/codemap.py /path/to/repo python scripts/codemap.py /path/to/repo # Generate maps python scripts/codemap.py /path/to/repo --skip locale,tests # Skip specific directories python scripts/codemap.py /path/to/repo --clean # Remove all _MAP.md python scripts/codemap.py /path/to/repo -n # Dry run (preview) Common patterns
What does the mapping-codebases skill do?
Generate navigable code maps for unfamiliar codebases. Use when exploring a new codebase, needing to understand project structure, or before diving into code modifications. Extracts exports/imports via AST (tree-sitter) to create _MAP.md files per directory. Triggers on "map this codebase", "understand this project structure", "generate code map", or when starting work on an unfamiliar repository.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill mapping-codebases-oaustegard-claude-skills-0a4fd9b3 --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
