skills/map-codebase/SKILL.md
Deep architecture report that fans out parallel inspections across different aspects of the codebase (structure, tech stack, APIs, patterns, data flow, dependencies, testing) and synthesizes findings into a comprehensive document at .turbo/codebase-map.md and .turbo/codebase-map.html. Use when the user asks to "map the codebase", "map codebase", "architecture report", "codebase overview", "architecture overview", "what am I looking at", or "explain this codebase".
npx skillsauth add tobihagemann/turbo map-codebaseInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Deep architecture report. Fans out parallel inspections across different aspects of the codebase, synthesizes their findings, and writes .turbo/codebase-map.md and .turbo/codebase-map.html. Analysis-only.
At the start, use TaskCreate to create a task for each phase:
If $ARGUMENTS specifies paths, use those directly (skip the question).
Otherwise, use AskUserQuestion to confirm scope:
Once scope is determined, glob for source files in the selected scope. Exclude generated and vendored directories (node_modules/, dist/, build/, vendor/, __pycache__/, .build/, DerivedData/, target/, .tox/, and others appropriate to the project).
Build a file manifest grouped by top-level source directory. This manifest is shared with all agents as a starting point. Agents may explore beyond it based on what they discover.
Use the Agent tool to launch all 7 agents below in a single assistant message so they run concurrently. Each Agent call uses model: "opus" and does not set run_in_background. Each agent receives the scoped file manifest and its exploration brief.
Launch one agent per dimension. Each agent's prompt provides the file manifest and the exploration brief below. Agents explore adaptively: go deeper where complexity warrants it, stay high-level where things are straightforward. Findings should be concrete (reference specific files and directories) rather than generic.
| # | Dimension | Exploration Brief | |---|---|---| | 1 | Project Structure | Map directory layout, module organization, naming conventions, and file roles. Identify the organizing principle (feature-based, layer-based, hybrid). Note generated or build output directories. | | 2 | Tech Stack and Build System | Identify languages, frameworks, package managers, build tools, and runtime requirements. Note version constraints and compatibility targets. | | 3 | Entry Points and Public API | Find how the system is invoked: CLI commands, HTTP endpoints, event handlers, exported modules, main functions. Map the public surface area. | | 4 | Core Abstractions and Patterns | Identify key types, classes, interfaces, and design patterns. Note architectural patterns (MVC, plugin system, pipeline, etc.) and how they shape the code. | | 5 | Data Flow and State | Trace how data enters, transforms, persists, and exits the system. Identify state management approaches, storage layers, and data boundaries. | | 6 | External Dependencies and Integrations | Map third-party services, APIs, databases, and system boundaries. Note how external dependencies are abstracted or coupled. | | 7 | Testing and Quality Infrastructure | Describe the test strategy: frameworks, coverage approach, test organization, CI/CD pipeline. Note gaps or unusual patterns. |
Each agent writes its findings as structured markdown with sections and subsections.
After all agents complete:
.turbo/codebase-map.md using the report template. Output the executive summary as text before writing the file.# Codebase Map
**Date:** <date>
**Scope:** <what was inspected>
## Executive Summary
<3-5 sentences: what the system is, how it's organized, what architectural choices define it>
## Project Structure
<from dimension 1>
## Tech Stack
<from dimension 2>
## Entry Points and API
<from dimension 3>
## Core Abstractions
<from dimension 4>
## Data Flow
<from dimension 5>
## External Dependencies
<from dimension 6>
## Testing and Quality
<from dimension 7>
## Cross-Cutting Observations
<themes, trade-offs, and connections identified during synthesis>
Convert the markdown report into a styled, interactive HTML page.
/frontend-design skill to load design principles..turbo/codebase-map.md for the full report content..turbo/codebase-map.html (single file, no external dependencies beyond Google Fonts) that presents the architecture report with:
@media printtools
Teach the user to deeply understand a change through interactive tutoring: restating understanding, drilling into why/what/how, and quizzing until mastery. The active counterpart to a one-shot explanation. Use when the user asks to "understand this change", "teach me this change", "help me understand what changed", "walk me through this change", "make sure I understand this", "quiz me on this", or "teach me what we did".
tools
Teach the user to deeply understand a change through interactive tutoring: restating understanding, drilling into why/what/how, and quizzing until mastery. The active counterpart to a one-shot explanation. Use when the user asks to "understand this change", "teach me this change", "help me understand what changed", "walk me through this change", "make sure I understand this", "quiz me on this", or "teach me what we did".
tools
Update an existing GitHub pull request's title and description to reflect the current state of the branch. Use when the user asks to "update the PR", "update PR description", "update PR title", "refresh PR description", or "sync PR with changes".
tools
Execute an approved split plan by creating separate branches, commits, and PRs for each change group. Use when the user asks to "split and ship", "ship the split plan", "create separate PRs", or "split changes into branches".