workflow-layout

Organizes ComfyUI workflow graphs into dependency-layered, overlap-free layouts on the live canvas.

715|111|Updated Feb 15, 2026
One-click install
npx skills add https://github.com/artokun/comfyui-mcp --skill workflow-layout
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: workflow-layout
Source: https://github.com/artokun/comfyui-mcp/tree/main/plugin/skills/workflow-layout
Command: npx skills add https://github.com/artokun/comfyui-mcp --skill workflow-layout

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

ComfyUI graphs quickly become tangled and unreadable as nodes pile up, overlap, and cross wires, making workflows hard to understand, edit, and hand off. This Skill turns a messy graph into a clean left-to-right dataflow using the live panel canvas tools.

Core Features & Use Cases

  • Dependency-layered layout: Builds a DAG from node connections, assigns nodes to columns by longest path from sources, and stacks them using true rendered heights so nothing overlaps.
  • Subgraph and group management: Lays out subgraph interiors, re-pins input/output rails, exposes boundary slots, and wraps stages in colored group boxes for visual structure.
  • Use Case: After generating a large Flux or video workflow, ask the agent to tidy the canvas; it reads real node sizes, computes overlap-free positions, color-codes stages, collapses internal machinery, and saves the organized workflow.

Quick Start

Ask the agent to tidy up the current ComfyUI workflow so the nodes are organized into clean columns with no overlaps.

Frequently Asked Questions about workflow-layout

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I clean up a messy ComfyUI workflow automatically?

Use the panel canvas tools to read the graph with panel_query_graph, compute dependency layers from node connections, and reposition each node with panel_edit_node. Nodes are stacked by their full rendered height so nothing overlaps, then the result is saved with panel_save_workflow.

How to fix overlapping nodes in a ComfyUI graph?

Overlaps happen when nodes are stacked using size[1], which excludes the title bar. Stack columns using full_height from panel_query_graph plus a row gap of about 40 pixels, since full_height includes the header and gives an exact visible gap.

What is the difference between groups and subgraphs in ComfyUI?

A group is a colored box that labels a region while nodes stay in place and editable. A subgraph collapses nodes into one node with boundary rails, which suits large graphs but hides nodes, so small two or three node stages should stay flat.

Why do subgraph rails end up far from the inner nodes?

Subgraph input and output rails do not follow inner nodes when they move. After laying out a subgraph interior, re-pin the rails with panel_move_rail so the input rail sits left of the node band and the output rail sits right of it.

Can canvas layout changes break a running ComfyUI render?

Canvas edits never affect an in-flight render, though a ComfyUI restart clears the queue. Node positions, titles, and groups only persist after saving the workflow, so save before relying on the new layout.