skills/codemap/SKILL.md
Generate navigational codebase maps with architecture diagrams. Use when mapping a codebase, creating architecture docs, visualizing project structure, generating infrastructure diagrams, understanding repo layout, or onboarding to a new project.
npx skillsauth add antoniocascais/claude-code-toolkit codemapInstall 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.
Generate CODEMAP.md files that help humans and AI agents navigate codebases.
Count files to determine project size:
**/* excluding vendored pathsnode_modules/, vendor/, __pycache__/, target/, .terraform/, .*Detect project type(s):
Set depth based on file count: | Files | Depth | Output | |-------|-------|--------| | <50 | shallow | Single root CODEMAP.md | | 50-500 | medium | Root + key directories | | >500 | deep | Root + 2 levels, skip vendored |
STOP. Check for existing CODEMAP.md before proceeding.
Before generating, check if CODEMAP.md exists.
If exists: Use AskUserQuestion with options:
If not exists: Proceed to generation.
Do NOT proceed to Phase 3 until resolved.
Generate sections based on what's detected:
Include both sections with clear delineation.
Write CODEMAP.md to project root (and subdirectories if depth warrants).
| Indicator | Stack |
|-----------|-------|
| package.json | Node.js/JavaScript/TypeScript |
| go.mod | Go |
| Cargo.toml | Rust |
| requirements.txt, pyproject.toml, setup.py | Python |
| pom.xml, build.gradle | Java |
| Gemfile | Ruby |
| composer.json | PHP |
| *.csproj, *.sln | .NET |
| Indicator | Tool | Analysis Method |
|-----------|------|-----------------|
| *.tf files | Terraform | Parse resources, modules, use terraform graph if initialized |
| playbook*.yml + roles/ | Ansible | Map playbooks → roles → tasks |
| kind: in YAML, kustomization.yaml | Kubernetes | Parse manifests, map services/deployments |
| Chart.yaml | Helm | Parse templates, values |
| Pulumi.yaml | Pulumi | Treat like application code |
| AWSTemplateFormatVersion | CloudFormation | Parse resources, nested stacks |
| docker-compose.yml | Docker Compose | Map services, networks, volumes |
graph TD
subgraph "API Layer"
A[REST API]
B[GraphQL]
end
subgraph "Business Logic"
C[Services]
D[Domain Models]
end
subgraph "Data Layer"
E[Repositories]
F[Database]
end
A --> C
B --> C
C --> D
C --> E
E --> F
graph LR
subgraph "AWS"
ALB[Load Balancer]
subgraph "ECS Cluster"
SVC1[Service A]
SVC2[Service B]
end
RDS[(PostgreSQL)]
REDIS[(Redis)]
end
ALB --> SVC1
ALB --> SVC2
SVC1 --> RDS
SVC2 --> RDS
SVC1 --> REDIS
graph TD
ROOT[Root Module]
ROOT --> VPC[modules/vpc]
ROOT --> ECS[modules/ecs]
ROOT --> RDS[modules/rds]
ECS --> SG[modules/security-groups]
RDS --> SG
For JS/TS:
ast-grep --pattern 'import $_ from "$SOURCE"' --lang ts
ast-grep --pattern 'require("$SOURCE")' --lang js
For Python:
ast-grep --pattern 'from $MODULE import $_' --lang python
ast-grep --pattern 'import $MODULE' --lang python
For Go:
ast-grep --pattern 'import "$PKG"' --lang go
| File Pattern | Type |
|--------------|------|
| main.go, main.py, main.ts | Application entry |
| index.ts, index.js | Module entry |
| cli.py, cli.ts, cmd/ | CLI entry |
| server.ts, app.py, api/ | Server entry |
| *_test.go, *.test.ts, test_*.py | Test entry |
Extract from *.tf:
resource blocks → managed infrastructuremodule blocks → dependenciesprovider blocks → cloud targetsdata blocks → external referencesIf .terraform/ exists and terraform init has been run, can use:
terraform graph | # convert DOT to mermaid
Note: terraform graph requires initialized state. Skip if .terraform/ missing or init incomplete.
# Codemap
> Auto-generated navigation map. Last updated: {date}
> For design decisions, see ARCHITECTURE.md (if exists)
## Tech Stack
- **Languages**: {detected languages}
- **Frameworks**: {detected frameworks}
- **Infrastructure**: {detected IaC tools}
## Directory Structure
\`\`\`
{annotated tree}
\`\`\`
## Code Architecture
\`\`\`mermaid
{component diagram}
\`\`\`
## Infrastructure Topology
\`\`\`mermaid
{infra diagram}
\`\`\`
## Entry Points
| Entry | Purpose | Command |
|-------|---------|---------|
| {file} | {purpose} | {how to run} |
## Key Files
| File | Purpose |
|------|---------|
| {path} | {description} |
tools
Reviews Claude Code sessions and proposes workflow improvements. Use when: (1) /workflow-review command, (2) "review my workflow", "how can I improve", (3) after long sessions when nudged, (4) start of session with pending review. Analyzes tool usage patterns, CLAUDE.md configuration, and compares against CC best practices. Proposes: CLAUDE.md updates, new skills, underused CC features. Saves session summaries to .claude/workflow-reviews/ for cross-session continuity.
devops
Activates voice conversation mode using Pocket TTS Docker container. Use when user says "voice mode", "let's talk", "talk to me", "speak your responses", or wants Claude to respond with spoken audio. Speaks all responses through TTS and plays via speakers.
testing
Guides strong, effective unit test generation using proven testing techniques. Use when writing unit tests, reviewing test quality, improving existing tests, generating test cases, checking test coverage strength, or when tests exist but may be weak. Triggers on: unit test, test quality, test coverage, write tests, improve tests, review tests, test strength, mutation testing, boundary testing.
development
Creates new Claude Code skills with proper structure and best practices. Use when user wants to create a skill, update an existing skill, add a new command, scaffold a workflow, define skill hooks, or asks "how do I make a skill".