Comprehensive codebase documentation generator following a layered methodology...
Comprehensive skill for scanning codebases and generating layered documentation to help developers get familiar quickly.
This skill implements a 6-phase documentation methodology:
Before writing documentation, thoroughly explore the codebase:
Explore Version Control History
git log --oneline -50 # Recent changes
git log --all --oneline --graph # Visual branch history
git shortlog -sn # Top contributors
Analyze Code Structure
tree -L 3 -I node_modules for structureRead Development Tests
Trace Execution Flows
Generate three documentation layers:
| Layer | Purpose | Audience | Location |
|---|---|---|---|
| High-Level | Architecture, design principles | New devs, stakeholders | docs/architecture/ |
| Walkthrough | Flows, patterns, interactions | Contributing devs | docs/walkthroughs/ |
| Low-Level | Functions, parameters, returns | Active maintainers | Inline + docs/api/ |
Generate using templates in templates/:
When documenting individual functions:
Reference: references/function-documentation.md
Create self-paced onboarding materials:
Generate documentation in this order:
docs/
āāā README.md # Project overview
āāā architecture/
ā āāā overview.md # System architecture
ā āāā components.md # Component descriptions
ā āāā diagrams/ # Architecture diagrams
āāā walkthroughs/
ā āāā entry-points.md # Where code starts
ā āāā data-flow.md # How data moves
ā āāā patterns.md # Recurring patterns
āāā api/
ā āāā endpoints.md # API endpoints
ā āāā functions.md # Key functions
āāā setup/
ā āāā installation.md # Installation guide
ā āāā configuration.md # Configuration options
ā āāā troubleshooting.md # Common issues
āāā onboarding/
āāā quickstart.md # 5-minute start
āāā tutorials/ # Hands-on tutorials
āāā gotchas.md # Edge cases & tips