From visual-project-map
Analyze a project directory to generate an interactive workflow graph, design a workflow from a natural language objective, propose a refactored folder structure toward an objective, or propose new folders from SPEC.md changes. Scans CLAUDE.md files, script dependencies, and folder structure (Input A), generates a complete workflow design from a stated objective (Input B), combines scan + redesign to produce a refactoring plan (Input A + --refactor), or detects unmet SPEC.md requirements and proposes new folders/files (Input A + --plan). Produces a visual-project-map JSON with modules, nodes, edges, and actor annotations.
How this skill is triggered — by the user, by Claude, or both
Slash command
/visual-project-map:visualize-projectThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Generate an interactive DAG from a project's structure and documentation.
CLAUDE.mdSPEC.md_foundations/CLAUDE.md_foundations/SPEC.md_foundations/color-palette.md_foundations/graph-schema.md_foundations/inference-rules.mdexamples/CLAUDE.mdexamples/design-example.mdexamples/refactor-example.mdexamples/scan-example.mdgeneration/CLAUDE.mdgeneration/generation.mdworkflows/CLAUDE.mdworkflows/design.mdworkflows/plan.mdworkflows/refactor.mdworkflows/scan.mdGenerate an interactive DAG from a project's structure and documentation. The output is a JSON file viewable in the visual-project-map viewer.
Parse $ARGUMENTS as follows:
| Argument | Default | Description |
|---|---|---|
| First positional | Project root (cwd) | Directory to analyze (Input A) |
--objective "..." | (none) | Design a workflow from this objective (Input B). Mutually exclusive with directory path. |
--objective-file path | (none) | Read objective from a file (Input B). Mutually exclusive with --objective and directory path. |
--constraints "..." | (none) | Tool/language/format constraints for design mode (e.g., "Python only, PostgreSQL, no cloud") |
--domain hint | (none) | Domain hint for ambiguous objectives (e.g., "econometrics", "ml", "etl") |
--focus path | (none) | Limit scan to a subdirectory (Input A only) |
--depth N | 2 | Module nesting: 1 = flat, 2 = phases + modules |
--title "..." | Auto from directory/objective | Graph title override |
--force | false | Skip incremental mode; regenerate from scratch |
--refactor | false | Combine scan + redesign: scan current structure, redesign toward --objective, output diff. Requires --objective. |
--plan | false | Detect unmet SPEC.md requirements and propose new folders/files to satisfy them. Scans SPEC.md files for unchecked acceptance criteria and maps them to missing directories/scripts. |
--scaffold | false | Create CLAUDE.md + SPEC.md stubs in project directories (design mode only) |
Input A (scan existing project):
/visualize-project — current project/visualize-project /path/to/project — specific project/visualize-project . --focus scripts/ --depth 1 — flat, scripts only/visualize-project . --title "My Pipeline" — custom titleInput B (design from objective):
/visualize-project --objective "Build an ETL pipeline that ingests CSV files, cleans them, and loads into PostgreSQL"/visualize-project --objective "Estimate causal effect of a policy intervention on employment using diff-in-diff"/visualize-project --objective-file docs/project-spec.md --constraints "Python, Stata, no cloud services"/visualize-project --objective "Build a recommendation engine" --domain ml --depth 1Refactor (restructure existing project):
/visualize-project . --refactor --objective "Separate data acquisition from processing"/visualize-project . --refactor --objective "Group by domain, not by file type" --depth 1Plan (propose from SPEC.md changes):
/visualize-project . --plan — detect all unmet SPEC.md requirements/visualize-project . --plan --focus scripts/estimation/ — plan only for one subdirectoryChoose one workflow based on the arguments:
| Condition | Workflow file | Description |
|---|---|---|
--refactor flag | Read workflows/refactor.md | Scan current + redesign toward objective |
--plan flag | Read workflows/plan.md | Detect unmet SPEC.md requirements |
--objective (without --refactor) | Read workflows/design.md | Design workflow from scratch |
| Otherwise (default) | Read workflows/scan.md | Scan existing project structure |
Note: Refactor and Plan modes both start by running the scan workflow internally (their Step 1 says "Run Phase 1 scan"). Read
workflows/scan.mdfirst, then the mode-specific file.
After completing the discovery phase, read generation/generation.md for the
shared graph generation and output pipeline. This covers:
Consult _foundations/ for reference tables:
_foundations/inference-rules.md — lookup tables for confidence, status, roles_foundations/color-palette.md — color assignments_foundations/graph-schema.md — field requirementsFor complete input→output examples, see:
examples/scan-example.md — scan of an existing data pipelineexamples/design-example.md — design of a staggered DiD workflowexamples/refactor-example.md — restructuring a flat scripts directoryFall back to README.md for workflow information. If no README either,
check for Makefile, package.json (scripts section), docker-compose.yml,
or CI config (.github/workflows/). Use directory structure + script
filenames as the primary signal.
Create a single module. Each script or documented step becomes a node.
Use --depth 1 automatically.
Suggest --focus for individual packages. If the user wants the full
view, create one module per package with high-level edges only.
If the objective is too vague to decompose (e.g., "do some data analysis"),
ask the user for clarification: What is the final deliverable? What data
sources? If the user insists, generate a high-level skeleton with 3-4
modules, all at confidence: "low", and note in each module's
checkpointReason what information is needed to refine.
If the objective implies >12 modules (e.g., "build a complete SaaS platform"),
suggest breaking into sub-projects. Alternatively, generate a high-level
--depth 1 overview and suggest the user run separate --objective calls
for each major subsystem.
If --constraints conflicts with the objective (e.g., objective says "use
deep learning" but constraints say "no GPU"), flag the contradiction in the
relevant module's checkpointReason and set confidence: "low". Do not
silently ignore the conflict.
If the current structure already matches the objective (or is already well-organized for the stated goal), tell the user: "The current structure already aligns with this objective. No refactoring needed." Generate the scan graph without plan annotations.
If the refactoring would touch >80% of modules, suggest using --objective
(design mode) instead — at that scale, it's a redesign rather than a refactor.
Warn user: "No SPEC.md files found in the project. The --plan action requires
folders to have SPEC.md files with acceptance criteria. Consider running
--scaffold first to generate SPEC.md stubs, then adding acceptance criteria."
Fall back to a normal scan (describe action).
Report: "All SPEC.md acceptance criteria appear to be satisfied. No new folders or files to propose." Output the current graph without plan annotations.
Skip that folder — all its criteria are met. Only include folders with unchecked
- [ ] items in the plan output.
Only visualize scripts that are:
main.py, cli.py, __main__.py, run.sh)If .graphs/{name}.json exists, use incremental mode instead of
rebuilding from scratch:
Read the existing graph — load .graphs/{name}.json and build a
lookup of all existing module IDs, node IDs, and edge keys
(source->target).
Re-scan the project — run Phase 1 discovery as normal to get a fresh mental model of the project structure.
Diff against existing — for each element in the fresh analysis:
Preserve manual refinements — the following fields are considered user-editable and must NOT be overwritten during incremental updates:
label (if it differs from what the skill would generate
and the underlying source hasn't changed)description fields (on graph, modules, nodes, edges)style.color, style.borderColor overridesinterfaceContract contentinterface contentplan field (belongs to visualize-plan, not this skill)label and details.docsstatus (user may have manually upgraded/downgraded)role (user may have manually overridden)Write with diff — save to .graphs/{name}.json and also save the
previous version to .graphs/{name}.prev.json so the viewer can show
a diff overlay via ?graph=.../{name}.json&compare=.../{name}.prev.json.
Present changes — before writing, show a summary table:
Incremental Update: "Project Title"
Modules: 8 (1 added, 0 removed)
Nodes: 24 → 27 (+3 added, 0 removed)
Edges: 31 → 34 (+3 added, 0 removed)
New nodes:
+ cln_dedupe2 in mod_clean (new script: scripts/clean/dedupe_v2.py)
+ exp_parquet in mod_export (new script: scripts/export/to_parquet.py)
+ exp_validate in mod_export (new step from CLAUDE.md)
Candidates for removal (confirm before deleting):
? exp_csv in mod_export (scripts/export/to_csv.py no longer exists)
Ask the user to confirm additions and removals before writing.
If the user passes --force or explicitly asks to overwrite, skip
incremental mode and regenerate from scratch.
Design → Scan transition: When a user runs /visualize-project . (Input A)
on a project that already has a design-mode graph (identified by
_generationMode: "design" in the existing JSON), incremental mode handles the
transition naturally:
planned
to draft or ai-tested based on scan evidenceplannedconfidence and needsHumanReview fields are preserved (user may have refined)_generationMode updates to "scan" once any module has code_objective field is preserved for referenceGaps between the SPEC's requirements and the skill's generation procedure. Previously these were unimplemented; they are now addressed in the steps listed below.
| Gap | Feature | Resolution |
|---|---|---|
| GAP-1 | Interface port nodes (F66) | Resolved — Step 2.3b generates _isInterfacePort nodes from module.interface |
| GAP-2 | Critical path (F68) | Resolved — Step 2.4c computes criticalPath array |
| GAP-3 | Scan-mode confidence (F67) | Resolved — inference-rules.md § "Scan-Mode Confidence Heuristics" + Step 2.1 scan-mode instructions |
| GAP-4 | Scan-mode _generationMode | Resolved — Step 3.5 now instructs setting "scan" for Input A |
| GAP-5 | node.io and node.docs | Resolved — Step 2.2 now includes generation instructions |
| GAP-6 | Status data collection | Resolved — Step 1.1b collects test files, TODO/FIXME, assertion patterns |
| GAP-7 | Interface completeness | Resolved — Step 2.1 now requires interfaces on all non-terminal modules (infer when evidence is limited) |
npx claudepluginhub georgegui/visual-project-map --plugin visual-project-mapGenerates GitHub-renderable Mermaid flowcharts from PRDs, docs, or codebases with evidence maps tracing nodes to sources. Useful for creating user flow diagrams.
Builds queryable knowledge graphs from code, docs, papers, and images. Run `/graphify` on a folder to extract structure and relationships into an interactive graph.
Renders planned changes as ASCII diagrams with risk heat maps, execution order, dependency graphs, and impact metrics. Supports HTML playground and infographic output. Use when reviewing implementation plans or analyzing change propagation.