Codebase Mapping Skill
Purpose
Produce consistent, structured documentation of codebase organization.
When to Use
- Starting work on unfamiliar project
- Onboarding new team members
- Documenting architecture decisions
- Before major refactoring
Output Template
Use the template in templates/structure-report.md
Mapping Process
Step 1: Project Identification
Identify project type from configuration files:
package.json ā Node.js
pyproject.toml / setup.py ā Python
go.mod ā Go
Cargo.toml ā Rust
pom.xml / build.gradle ā Java
Step 2: Structure Analysis
Map directories to their purposes:
src/ or lib/ ā Source code
tests/ or __tests__/ ā Test files
docs/ ā Documentation
scripts/ ā Build/utility scripts
config/ ā Configuration files
Step 3: Dependency Graph
Create simplified dependency visualization:
Entry Point
āāā Core Module A
ā āāā Utility 1
ā āāā Utility 2
āāā Core Module B
ā āāā External Lib
āāā Shared Components
Step 4: Key Files
Identify and document:
- Entry points (main.ts, index.js, app.py)
- Configuration (tsconfig, eslint, etc.)
- Environment handling
- Build configuration
Storage Location
Save output to: docs/research/codebase-map-{date}.md