Codemap Usage Examples
End-to-end scenarios showing how codemap-dev commands and skills work together.
Scenario 1: Onboarding to a Flask Project
A junior developer joins a team with an existing Flask + SQLAlchemy application.
Step 1: Full onboarding
/codemap-dev:onboard
What happens:
- Scans the project — finds Flask app factory, blueprints, SQLAlchemy models
- Generates
docs/codemap/ONBOARDING.md with stack summary, directory roles, how to run locally
- Generates
docs/codemap/ARCHITECTURE.md with layer descriptions
- Creates 3 diagrams:
docs/codemap/diagrams/architecture.drawio — C4 container diagram (Flask app, PostgreSQL, external APIs)
docs/codemap/diagrams/main-flow.drawio — primary user flow as a flowchart
docs/codemap/diagrams/erd.drawio — all database tables with relationships
Step 2: Understand a specific module
/codemap-dev:explain routes/deals.py
What happens:
- Applies 4-layer model: Context (what the file does) → Data Flow (request lifecycle) → Details (each route handler) → Pitfalls (common mistakes)
- If 3+ components interact, auto-generates a mini-diagram
Step 3: Review your first PR
/codemap-dev:review #15
What happens:
- Fetches PR diff via
gh pr diff 15
- Reviews across 5 dimensions: Security, Correctness, Readability, Patterns, Beginner Pitfalls
- Each finding explains why it matters, not just what to fix
Scenario 2: Understanding a Database Schema
A developer needs to understand the data model before making changes.
Step 1: Generate ERD and documentation
/codemap-dev:db
What happens:
- Auto-detects ORM (SQLAlchemy, Prisma, TypeORM, Django, raw SQL migrations)
- Parses all model definitions — tables, columns, types, foreign keys, relationships
- Reviews schema quality (missing indexes, naming inconsistencies, missing constraints)
- Generates
docs/codemap/diagrams/erd.drawio with color-coded tables
- Generates
docs/codemap/DB.md with table details and relationship descriptions
Step 2: Explore a specific relationship
/codemap-dev:explain models/deal.py
What happens:
- Explains the Deal model — what it represents, its columns, relationships to other models
- Shows data flow: how deals are created, updated, queried
- Notes pitfalls: cascade deletes, missing constraints, N+1 query risks
Scenario 3: Visualizing Architecture for a Team Presentation
A developer needs to create architecture diagrams for a team knowledge-sharing session.
Step 1: System overview
/codemap-dev:diagram architecture
What happens:
- Scans root configs, entry points, all top-level directories
- Generates C4 container diagram showing all services, databases, external APIs
- Saves to
docs/codemap/diagrams/architecture.drawio and, if the client supports MCP Apps, shows an inline preview
Step 2: Specific feature flow
/codemap-dev:diagram sequence POST /api/deals
What happens:
- Traces the request from route handler through service layer to database
- Generates sequence diagram with lifelines for each component
- Labels arrows with data being passed at each step
Step 3: Discover all user flows
/codemap-dev:flows
What happens:
- Finds all route definitions and groups them into logical flows
- Generates a flowchart for each major flow (auth, CRUD, key features)
- Writes
docs/codemap/FLOWS.md with descriptions and diagram links
1---2name: codemap-examples-23description: >4 This skill should be used when the user asks for "codemap examples", "how to use codemap",5 "show me what codemap can do", "codemap walkthrough", or wants to see end-to-end usage6 scenarios for the codemap plugin.7disable-model-invocation: true8metadata:9 source: https://skillmd.com/skills/agents-store/codemap-examples-210---1112# Codemap Usage Examples1314End-to-end scenarios showing how codemap-dev commands and skills work together.1516## Scenario 1: Onboarding to a Flask Project1718A junior developer joins a team with an existing Flask + SQLAlchemy application.1920### Step 1: Full onboarding2122```23/codemap-dev:onboard24```2526**What happens:**271. Scans the project — finds Flask app factory, blueprints, SQLAlchemy models282. Generates `docs/codemap/ONBOARDING.md` with stack summary, directory roles, how to run locally293. Generates `docs/codemap/ARCHITECTURE.md` with layer descriptions304. Creates 3 diagrams:31 - `docs/codemap/diagrams/architecture.drawio` — C4 container diagram (Flask app, PostgreSQL, external APIs)32 - `docs/codemap/diagrams/main-flow.drawio` — primary user flow as a flowchart33 - `docs/codemap/diagrams/erd.drawio` — all database tables with relationships3435### Step 2: Understand a specific module3637```38/codemap-dev:explain routes/deals.py39```4041**What happens:**421. Applies 4-layer model: Context (what the file does) → Data Flow (request lifecycle) → Details (each route handler) → Pitfalls (common mistakes)432. If 3+ components interact, auto-generates a mini-diagram4445### Step 3: Review your first PR4647```48/codemap-dev:review #1549```5051**What happens:**521. Fetches PR diff via `gh pr diff 15`532. Reviews across 5 dimensions: Security, Correctness, Readability, Patterns, Beginner Pitfalls543. Each finding explains **why** it matters, not just what to fix5556## Scenario 2: Understanding a Database Schema5758A developer needs to understand the data model before making changes.5960### Step 1: Generate ERD and documentation6162```63/codemap-dev:db64```6566**What happens:**671. Auto-detects ORM (SQLAlchemy, Prisma, TypeORM, Django, raw SQL migrations)682. Parses all model definitions — tables, columns, types, foreign keys, relationships693. Reviews schema quality (missing indexes, naming inconsistencies, missing constraints)704. Generates `docs/codemap/diagrams/erd.drawio` with color-coded tables715. Generates `docs/codemap/DB.md` with table details and relationship descriptions7273### Step 2: Explore a specific relationship7475```76/codemap-dev:explain models/deal.py77```7879**What happens:**801. Explains the Deal model — what it represents, its columns, relationships to other models812. Shows data flow: how deals are created, updated, queried823. Notes pitfalls: cascade deletes, missing constraints, N+1 query risks8384## Scenario 3: Visualizing Architecture for a Team Presentation8586A developer needs to create architecture diagrams for a team knowledge-sharing session.8788### Step 1: System overview8990```91/codemap-dev:diagram architecture92```9394**What happens:**951. Scans root configs, entry points, all top-level directories962. Generates C4 container diagram showing all services, databases, external APIs973. Saves to `docs/codemap/diagrams/architecture.drawio` and, if the client supports MCP Apps, shows an inline preview9899### Step 2: Specific feature flow100101```102/codemap-dev:diagram sequence POST /api/deals103```104105**What happens:**1061. Traces the request from route handler through service layer to database1072. Generates sequence diagram with lifelines for each component1083. Labels arrows with data being passed at each step109110### Step 3: Discover all user flows111112```113/codemap-dev:flows114```115116**What happens:**1171. Finds all route definitions and groups them into logical flows1182. Generates a flowchart for each major flow (auth, CRUD, key features)1193. Writes `docs/codemap/FLOWS.md` with descriptions and diagram links