/viz
Visualize a ComfyUI workflow as a mermaid diagram
$ npx -y skills add artokun/comfyui-mcp --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/viz
Context preview
What this command does when you run it.
Visualize a ComfyUI workflow as a mermaid diagram
Command definition
viz.mddescription: Visualize a ComfyUI workflow as a mermaid diagram
argument-hint: Path to workflow JSON file, or paste JSON inline
/comfy-viz — Visualize a Workflow
The user wants to visualize a ComfyUI workflow as a mermaid flowchart diagram.
Instructions
1. **Get the workflow JSON.** The argument may be: $ARGUMENTS
- A file path to a workflow JSON file — read it with the Read tool
- Inline JSON pasted directly as the argument
- Nothing — ask the user to provide a workflow file path or paste the JSON
2. **Validate the input.** The workflow must be in ComfyUI's API format: an object where keys are node IDs and values have `class_type` and `inputs`. If it looks like the web UI format (has `nodes` and `links` arrays), tell the user it needs to be in API format and suggest they export it via "Save (API Format)" in ComfyUI.
3. **Visualize.** Use the `visualize_workflow` tool with:
- `workflow`: the parsed workflow JSON
- `show_values`: `true` (to include parameter values in node labels)
- `direction`: `"LR"` (left-to-right, easiest to read)
4. **Present the diagram.** Show the mermaid output to the user. The mermaid code block will render as a flowchart showing nodes grouped by category with labeled connections.
Example
User: `/comfy-viz ~/workflows/my-workflow.json`
Steps:
- Read the file at `~/workflows/my-workflow.json`
- Pass contents to `visualize_workflow`
- Display the mermaid diagram
Notes
- If the workflow is very large (50+ nodes), suggest using `direction: "TB"` (top-to-bottom) for better readability
- The diagram groups nodes into subgraphs by category: loading, conditioning, sampling, image, output
- Connection edges are labeled with data types (MODEL, CLIP, CONDITIONING, LATENT, IMAGE, VAE, etc.)
Read more
description: Visualize a ComfyUI workflow as a mermaid diagram argument-hint: Path to workflow JSON file, or paste JSON inline
/comfy-viz — Visualize a Workflow
The user wants to visualize a ComfyUI workflow as a mermaid flowchart diagram.
Instructions
1. **Get the workflow JSON.** The argument may be: $ARGUMENTS
- A file path to a workflow JSON file — read it with the Read tool
- Inline JSON pasted directly as the argument
- Nothing — ask the user to provide a workflow file path or paste the JSON
2. **Validate the input.** The workflow must be in ComfyUI's API format: an object where keys are node IDs and values have `class_type` and `inputs`. If it looks like the web UI format (has `nodes` and `links` arrays), tell the user it needs to be in API format and suggest they export it via "Save (API Format)" in ComfyUI.
3. **Visualize.** Use the `visualize_workflow` tool with:
- `workflow`: the parsed workflow JSON
- `show_values`: `true` (to include parameter values in node labels)
- `direction`: `"LR"` (left-to-right, easiest to read)
4. **Present the diagram.** Show the mermaid output to the user. The mermaid code block will render as a flowchart showing nodes grouped by category with labeled connections.
Example
User: `/comfy-viz ~/workflows/my-workflow.json`
Steps:
- Read the file at `~/workflows/my-workflow.json`
- Pass contents to `visualize_workflow`
- Display the mermaid diagram
Notes
- If the workflow is very large (50+ nodes), suggest using `direction: "TB"` (top-to-bottom) for better readability
- The diagram groups nodes into subgraphs by category: loading, conditioning, sampling, image, output
- Connection edges are labeled with data types (MODEL, CLIP, CONDITIONING, LATENT, IMAGE, VAE, etc.)
The local-first, agent-native control plane for ComfyUI — an MCP server + live sidebar agent that generates images, video and audio, authors and runs workflows, manages models and custom nodes, and edits your live ComfyUI graph in natural language.
Repo: artokun/comfyui-mcp
Other commands on comfyui-mcp.
- /batch
Parameter sweep generation across multiple values
Open command - /compare
Diff two ComfyUI workflows to see what changed
Open command - /convert
Convert between ComfyUI UI format and API format workflows
Open command - /debug
Diagnose why a ComfyUI workflow failed
Open command - /director
Direct a short film from a story — generates scenes, frames, and video clips
Open command - /gallery
Browse and inspect generated ComfyUI outputs
Open command

