Produce a one-screen map of an unfamiliar area of the codebase: entry points, modules, data flow, callers. Designed to be read in fifteen seconds. Use when the user says "I do not know this area", "give me the map", "zoom out", "orient me".
git clone https://github.com/rohitg00/pro-workflow.git--- name: module-map description: Produce a one-screen map of an unfamiliar area of the codebase: entry points, modules, data flow, callers. Designed to be read in fifteen seconds. Use when the user says "I do not know this area", "give me the map", "zoom out", "orient me". --- # module-map Orient fast in unfamiliar code. The deliverable is a map, not a tour. ## Deliverable A single response containing, in this order: 1. **One-line summary** of what the area does from a caller's point of view. 2. **Entry points** — every function, route, CLI command, event handler, or cron that starts a call chain in this area. File path + symbol. 3. **Core modules** — the two to five modules that contain the real logic. One line each describing their role. 4. **Data flow** — ASCII arrows showing the dominant path for the most common input. Skip error paths unless they matter architecturally. 5. **External callers** — who outside this area calls in, and through which entry points. 6. **Hidden coupling** — anything that looks independent but is not (shared singletons, global state, implicit ordering, undocumented contracts between files). ## Rules - Fifteen-second read target. If the map exceeds one screen, cut it. - Every claim must be backed by a file path. No remembered or inferred structure without a grep behind it. - Do not list every file. Curate. A good map omits deliberately. - Do not propose changes. Mapping is orientation; refactoring is a different skill. - If the area is too large to map in one screen, segment it and ask the user which segment to expand. Do not silently drop half the code. ## Format ``` AREA: <one-line summary> ENTRY POINTS - <path>:<symbol> — <role> CORE MODULES - <path> — <role> FLOW <entry> -> <module> -> <module> -> <sink> CALLERS - <path> — uses <entry> HIDDEN COUPLING - <description> (<path>) ``` Use the exact headers. Consistency lets the user scan.
[{"step":"Identify the unfamiliar area","action":"Run `find . -type f -name '*[KEYWORD]*'` or ask teammates for the top-level directory (e.g., `src/payments/`).","tip":"Use `ls -la` in the root to spot recently modified files that might be relevant."},{"step":"Generate the map","action":"Paste the prompt template into your AI tool, replacing [AREA_OF_CODEBASE] with the directory/file (e.g., 'src/payments/').","tip":"For large codebases, ask for a 'high-level map' first, then drill down into specific modules."},{"step":"Validate the map","action":"Check the ASCII art against the actual code: 1) Are entry points correct? 2) Do data flows match `grep -r 'import'` results? 3) Are callers accurate?","tip":"Use `git log --oneline -n 10` to see recent changes that might explain new entry points."},{"step":"Refine iteratively","action":"Ask the AI to 'add more detail to [MODULE]' or 'highlight circular dependencies' if the initial map is too broad.","tip":"Use `grep -r 'def ' src/[AREA] | wc -l` to estimate module complexity before refining."},{"step":"Use the map for context","action":"Share the map with teammates to align on terminology (e.g., 'Is `order_service` the right name?') or to plan refactoring (e.g., 'Can we merge `order_processor` into `order_service`?').","tip":"Save the map in your team's `docs/architecture/` folder for future reference."}]
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/rohitg00/pro-workflow/tree/main/skills/module-mapCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Generate a concise one-screen map of the [AREA_OF_CODEBASE] in this project. Include: 1) Entry points (files/functions where users interact with this area), 2) Key modules/files with a one-line description of their role, 3) Data flow arrows between modules showing how data moves, 4) Top-level callers (who invokes this area). Format as ASCII art with clear labels. Focus on readability over completeness. Example: '``` [main.py] → [core/processor.py] → [models/data_loader.py] ↓ [utils/validator.py] → [output/generator.py] ```'
``` ┌───────────────────────────────────────────────────────┐ │ API Gateway Layer │ │ [src/api/handlers/order_handler.py] (REST endpoint) │ │ ↓ (POST /orders) │ │ ┌───────────────────────────────────────────────────┐ │ │ │ Core Business Logic │ │ │ │ [src/core/order_service.py] (Process order) │ │ │ │ ↓ (validates, updates DB) │ │ │ └───────────────────────────────────────────────────┘ │ │ ↓ (emits event) │ │ ┌───────────────────────────────────────────────────┐ │ │ │ Event-Driven Processors │ │ │ │ [src/events/order_processor.py] (Async task) │ │ │ │ [src/events/notification_service.py] (Sends email)│ │ │ └───────────────────────────────────────────────────┘ │ │ ↓ (returns to handler) │ │ [src/api/responses.py] (Formats 201 response) │ └───────────────────────────────────────────────────────┘ Callers: - CLI: [src/cli/order_cli.py] → order_service - Scheduled Job: [src/jobs/order_cleanup.py] → order_service - Tests: [tests/integration/test_order_flow.py] → order_handler ``` Key Observations: 1. The `order_handler` is the single entry point for all external interactions. 2. Data flows linearly from handler → service → event processors → response. 3. The `order_service` is the most critical module (highest coupling). 4. No direct DB access in handlers; all writes go through the service layer. 5. Event processors are decoupled but must handle failures gracefully (add retry logic?).
skills-collection
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan