Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Lay out and organize a ComfyUI workflow cleanly on the live panel canvas — dependency-layered node placement with no overlaps, subgraphs, colored group boxes, and subgraph rail alignment. Use when asked to tidy / clean up / organize / arrange a workflow, add groups or subgraphs, fix overlapping nodes, or build a workflow that should look good from the start.
.claude/skills/artokun-workflow-layout/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-19 | ✗→✓ | ▲ Improved | 63% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 137% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 6% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 174% | 0% |
| case-13 | ✗→✓ | ▲ Improved | 49% | 0% |
Turn a tangled graph into a clean left-to-right dataflow a human reads at a glance, using the panel_* canvas tools. The golden rule: never lay out blind — read the real node sizes and rail positions first, then compute positions from them.
panel_query_graph {fields:'detail', limit:200, max_chars:60000} — READ FIRST, every time. Returns, for the graph you're viewing:pos x,y], size w,h] (body only), and full_height (theTRUE rendered footprint = title bar + body; use this for vertical stacking),
groups (id, title, color, bounding [x,y,w,h]),rails: the input / output boundarynode positions. Everything below is computed from these numbers.
panel_edit_node({node_id, pos?, size?, title?, collapsed?, preset?|color?|bgcolor?})atomically moves, resizes, retitles, collapses, or color-codes a node. Widget values remain on their dedicated tool; execution mode is available as mode when needed.
panel_create_group (pass node_ids toauto-wrap, or bounds [x,y,w,h]; color hex), panel_move_group, panel_edit_group, panel_remove_group.
panel_create_subgraph(node_ids),panel_enter_subgraph / panel_exit_subgraph, panel_get_subgraph, panel_promote_widget, panel_move_rail(rail, [x,y]) (rail = "input"|"output", must be inside the subgraph), panel_expose_subgraph_output(from_node_id, from_output) / panel_expose_subgraph_input(to_node_id, to_input) (expose an interior slot on the boundary rail — must be inside the subgraph), and panel_unpack_subgraph(node_id) (expand/dissolve a subgraph back into the parent — the inverse of panel_create_subgraph).
panel_canvas({action:"fit"}) to frame the result; panel_save_workflow to persist.connected_from (ignore unconnectedwidget inputs — only node→node edges matter).
layer(n) = 0 if it has no incoming node edges, else 1 + max(layer(of its sources)). Layers become columns, left → right.
x = X0 + layer * COL_PITCH, where COL_PITCH ≈ widest node.size0] inthat column + ~80.
y[i+1] = y[i] + node[i].full_height + ROW_GAP. Use full_height (from panel_query_graph detail rows), NOT size[1]. size[1] is the BODY only (slots + widgets); the title bar renders ~30px ABOVE pos and is NOT in size[1], so stacking by size[1] overlaps every node by a header (the classic "headers eating the node above" bug). full_height already includes that header (and is just the title height for a collapsed node), so y += full_height + ROW_GAP lands an exact ROW_GAP gap between the previous node's bottom and the next node's title. Never use a fixed row pitch — tall nodes (KSampler, WanVideo Sampler, LoRA-select) are 480–600px and will overlap a 320 pitch. (If full_height is ever absent, fall back to size[1] + ~30 for the header.)
connected nodes (a median/barycenter pass is plenty).
Reads-well constants: COL_PITCH 360–480, ROW_GAP 40. Because full_height already accounts for the title bar, you don't add extra top headroom per node — ROW_GAP is the clean gap you'll actually see.
A subgraph has two boundary rails (input left, output right). They do not follow the inner nodes — move the nodes without moving the rails and you get a huge gap (a very common mistake). For each subgraph: panel_enter_subgraph → lay out the inner nodes (algorithm above) → then pin the rails to the node band:
panel_move_rail("input", [minNodeX - 180, bandTopY])panel_move_rail("output", [maxNodeX + 60, bandTopY])Keep rails at the same Y as the first row. Read current rail positions from panel_query_graph (rails) before deciding. panel_exit_subgraph when done.
Wiring interior nodes to the boundary (don't connect to a guessed rail id). To expose an interior node's output/input on the boundary so the PARENT graph can wire it, do NOT panel_connect to a rail node id you guessed — use panel_expose_subgraph_output(from_node_id, from_output) (interior output → output rail) and panel_expose_subgraph_input(to_node_id, to_input) (interior input → input rail), both while inside the subgraph. panel_query_graph's rails shows which boundary slots already exist and which still need exposing. To expand/ dissolve a subgraph back into the parent (inline its inner nodes + rewire external links, removing the wrapper — the inverse of panel_create_subgraph), use panel_unpack_subgraph(node_id). All undoable with Ctrl+Z.
for this first — to label regions of a flat graph or band stage-columns at the root.
nodes and adds boundary ports. Don't subgraph everything — a 2–3 node stage rarely earns it, and over-subgraphing hurts readability and complicates packaging/handoff.
subgraphs → drop colored group bands around the columns at the root.
Loaders → Inputs → Preprocess (pose/controlnet/conditioning) → Embeds → Sample → Decode/Output — one concern per column/stage, strictly left-to-right.
The nodes a user touches first — the input (Load Image / Load Video) and the output (save / video-combine / preview) — must stay expanded and visible so they can jump straight in: drop in their media, hit run, watch the result. Collapse the internal machinery (loaders, encoders, samplers) into chips to cut noise, but never collapse the inputs or outputs. When they live inside subgraphs, keep those subgraph nodes expanded — and consider panel_promote_widget to surface the one key widget (prompt, seed) onto the subgraph node so it's editable without drilling in.
> Heads-up: input/output preview nodes (LoadImage, VHS_LoadVideo, video-combine) > report their full size[1] but render short until media loads — size their group band > to the .size (so it fits once filled), not to the empty-preview render.
panel_query_graph {fields:'detail', limit:200, max_chars:60000} — capture pos/size/groups (and rails inside each subgraph).panel_edit_node for each node (or bulk only when the same presentation change is intended).panel_move_rail both rails → exit.panel_create_group bands around the root columns (and panel_remove_groupany stranded empty groups left behind by earlier edits).
panel_save_workflow, then panel_canvas({action:"fit"}).browser refresh reloads from the saved workflow (and re-binds nodes after installing packs).
LoadImage, VHS_LoadVideo, preview nodesreturn a tiny size[1] because the image/video preview height isn't in .size. Leave extra vertical room (≈250–300px) below them so the preview doesn't overlap the next node.
blue, sampler green) and collapsed rarely-touchedloaders to cut visual noise — cheap wins once the positions are right.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-06 | pass→pass | 13,854 | 8,912 | -36% | 1 | 1 | 0% | 2,346 | 3,915 | +67% | 0 | 0 | — |
case-19 | fail→pass | 16,596 | 2,319 | -86% | 1 | 1 | 0% | 1,705 | 2,777 | +63% | 0 | 0 | — |
case-01 | fail→fail | 4,383 | 5,725 | +31% | 1 | 1 | 0% | 554 | 2,747 | +396% | 0 | 0 | — |
case-02 | fail→fail | 11,141 | 7,339 | -34% | 1 | 1 | 0% | 1,811 | 2,800 | +55% | 0 | 0 | — |
case-03 | fail→fail | 19,430 | 6,206 | -68% | 1 | 1 | 0% | 4,063 | 2,808 | -31% | 0 | 0 | — |
case-04 | pass→pass | 11,842 | 10,918 | -8% | 1 | 1 | 0% | 2,364 | 4,755 | +101% | 0 | 0 | — |
case-05 | pass→pass | 12,840 | 9,474 | -26% | 1 | 1 | 0% | 2,544 | 4,216 | +66% | 0 | 0 | — |
case-07 | pass→pass | 14,450 | 4,043 | -72% | 1 | 1 | 0% | 2,491 | 3,071 | +23% | 0 | 0 | — |
case-08 | pass→pass | 12,834 | 11,515 | -10% | 1 | 1 | 0% | 2,239 | 3,648 | +63% | 0 | 0 | — |
case-09 | fail→pass | 8,310 | 4,237 | -49% | 1 | 1 | 0% | 1,370 | 3,245 | +137% | 0 | 0 | — |
case-10 | fail→pass | 15,657 | 2,990 | -81% | 1 | 1 | 0% | 2,708 | 2,878 | +6% | 0 | 0 | — |
case-11 | fail→pass | 7,206 | 4,003 | -44% | 1 | 1 | 0% | 1,073 | 2,939 | +174% | 0 | 0 | — |
case-12 | pass→pass | 26,643 | 6,000 | -77% | 1 | 1 | 0% | 2,512 | 3,410 | +36% | 0 | 0 | — |
case-13 | fail→pass | 13,478 | 6,151 | -54% | 1 | 1 | 0% | 2,226 | 3,311 | +49% | 0 | 0 | — |
case-14 | fail→pass | 10,112 | 3,445 | -66% | 1 | 1 | 0% | 1,548 | 3,044 | +97% | 0 | 0 | — |
case-20 | fail→pass | 8,894 | 2,785 | -69% | 1 | 1 | 0% | 1,325 | 2,819 | +113% | 0 | 0 | — |
case-15 | fail→fail | 11,918 | 6,903 | -42% | 1 | 1 | 0% | 1,880 | 3,386 | +80% | 0 | 0 | — |
case-16 | fail→fail | 6,422 | 3,861 | -40% | 1 | 1 | 0% | 934 | 3,058 | +227% | 0 | 0 | — |
case-17 | pass→pass | 9,719 | 6,508 | -33% | 1 | 1 | 0% | 1,437 | 3,430 | +139% | 0 | 0 | — |
case-18 | pass→pass | 10,846 | 5,215 | -52% | 1 | 1 | 0% | 1,594 | 3,354 | +110% | 0 | 0 | — |
case-21 | fail→pass | 10,655 | 3,031 | -72% | 1 | 1 | 0% | 1,621 | 2,778 | +71% | 0 | 0 | — |
case-22 | fail→pass | 29,093 | 6,426 | -78% | 1 | 1 | 0% | 1,470 | 3,588 | +144% | 0 | 0 | — |
case-23 | pass→pass | 10,712 | 2,869 | -73% | 1 | 1 | 0% | 1,534 | 2,827 | +84% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted, and 19 counted toward the lift figure. The other 4 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +39 percentage points is the difference between those two pass rates over the 19 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.