ComfyUI workflow visual layout, subgraph nesting, proxyWidgets exposure, and group organization policy. Use this skill EVERY TIME you create, edit, or save.
EVERY TIME a ComfyUI workflow JSON is created or modified, run the UI policy pass before save. This is a non-negotiable consistency layer — the workflow's structural visuals must match the project standard regardless of who/what made the change.
Trigger phrases that activate this skill:
"workflow düzenle / edit"
"node ekle / remove"
"rebuild workflow"
"yeni workflow"
"v4 / v5 / new version"
Any JSON write into the verified <COMFYUI_ROOT>/user/default/workflows/ directory
flags.collapsed: true for ALL tech nodes that are not knobs. Show only titlebar. User clicks to expand.
NEVER collapse:
LoadImage (must show image preview)
PrimitiveStringMultiline (text editing)
Power Lora Loader (LoRA list interaction)
PreviewImage, Image Comparer (display)
MarkdownNote (info display)
Bool/Int primitive knobs (single-click toggle)
Adjustable-tech (exception): keep EXPANDED so the control is visible — KSamplerSelect (sampler_name), IdentityFeatureTransferV3 (preset). See validate_ui.py ALLOW_EXPANDED.
5. Naming Convention (TR)
Localized node titles (for example, Modeli Yükle, Referansı Latent'e Çevir)
Group titles numbered + TR (1. Kullanıcı Girdileri)
MarkdownNote titles with emoji prefix (🎛️ KONTROL PANELİ)
LoRA filenames, model filenames, prompt content NEVER translated
6. Position Layout
Standard layout grid (master + extensions):
y\x -2700 -2200 -1750 -1300 -880 -450 -50
-300 KONTROL PANEL (MarkdownNote)
-100 PuLID
loaders
0 PuLID Apply USER MODEL REF COND SAMP OUTPUT
500 chain INPUTS LOADERS PROCESS chain chain chain
1000 Prompts
1280 (knobs row: CFG, Steps, Manual, W, H)
1450 Face crop chain (if multi-ref)
2050 Fast Groups Bypasser
7. File Naming Convention
Protected master: <PROJECT>-MASTER.json or an explicit user-supplied allowlist
Minimal-but-safe gaps. ~16–40px between neighbours (<8 = cramped, >220 inside a group = wasteful).
Node sizing. Min width ~140px, proportionate; collapse tech nodes so footprint ≈ titlebar.
Group bounding wraps members + ~16px side/bottom margin + ~40px top (title band).
Constants (frontend 1.44): node titlebar ≈30, group title band ≈34, collapsed node ≈30.
9. Module Toggles (rgthree bypass / mute) — OFF = zero compute
Fast Groups Muter — group nodes ALWAYS↔NEVER (mute = skipped). Use when output not needed downstream.
Fast Groups Bypasser — BYPASS (input passes through). Use to neutralize an inline MODEL/COND patch (e.g. IFT V3) while keeping the chain connected.
Mute/Bypass Repeater — one node dispatches mode to many → feed a Fast Muter/Bypasser for a single dashboard toggle.
Put toggles in 🎛️ KONTROL PANELİ. TR titles. Bypass safer for inline patches; mute for whole branches.
10. Classic LiteGraph vs Nodes 2.0
Author/ship in classic LiteGraph (stable; all custom nodes work).
Nodes 2.0 = Vue render (BETA, logo menu → "Nodes 2.0"). Can BREAK custom-node mappings (frontend #10988). Experimental preview only — never author assuming 2.0.
Subgraph + parameters-panel widget editing OK in classic on frontend ≥1.24.3 / ≥v0.3.66 (user 1.44.19 → fine).
Workflow Edit Checklist (mandatory)
Run these checks AT THE END of every workflow JSON modification:
Tech nodes have flags.collapsed: true
Knobs (LoadImage, prompts, primitives, Power LoRA) are NOT collapsed
All groups have TR titles + correct color
MarkdownNote control panel exists at top with current version info
No duplicate links (link IDs unique)
No dangling links (all link endpoints exist in nodes)
last_node_id and last_link_id match actual max
Prompt fields NOT translated
LoRA/model filenames NOT translated
BFS Head LoRA: if on: true, MarkdownNote MUST mention head_swap: prompt prefix requirement
PuLID strength: if used, must be 0.85-1.05 (never 1.4 — burns at 4-step distilled)
Backup the workflow file to _archive/ before destructive edits
Validator Script
Use scripts/validate_ui.py to automatically check policy compliance:
See scripts/build_subgraph.py for the helper that converts a flat workflow to the nest pattern. It:
Identifies tech vs knob nodes by type
Generates subgraph UUID
Moves tech nodes into definitions.subgraphs[0].nodes
Creates internal links + IO ports
Generates subgraph instance node with proxyWidgets
Rewires main workflow
References
references/subgraph-pattern.md — Deep dive on the 08 Pixaroma subgraph format
references/identity-mechanisms.md — Face transfer mechanisms (PuLID Klein V2, BFS Head, IFT V3, MultiReferenceLatent)
references/research-2026.md — Late 2025/early 2026 research findings on Klein 9B identity preservation
Hard Rules
NEVER translate prompts, LoRA names, or model filenames.
NEVER modify a verified protected master in place; edit a copy or named version and hash-check the protected source.
ALWAYS backup before destructive edits.
ALWAYS validate after edit (0 missing links, 0 dangling refs).
ALWAYS update MarkdownNote control panel with the new version's behavior.
ALWAYS apply this skill at the END of every workflow change. No exceptions.
1---2name: comfyui-workflow-ui-policy3description: ComfyUI workflow visual layout, subgraph nesting, proxyWidgets exposure, and group organization policy. Use this skill EVERY TIME you create, edit, or save.4---56# ComfyUI Workflow UI Policy78## When to Apply910**EVERY TIME** a ComfyUI workflow JSON is created or modified, run the UI policy pass before save. This is a non-negotiable consistency layer — the workflow's structural visuals must match the project standard regardless of who/what made the change.1112Trigger phrases that activate this skill:13- "workflow düzenle / edit"14- "node ekle / remove"15- "rebuild workflow"16- "yeni workflow"17- "v4 / v5 / new version"18- Any JSON write into the verified `<COMFYUI_ROOT>/user/default/workflows/` directory1920## Core Policy2122### 1. Subgraph Nest Pattern (from 08 - Pixaroma Subgraph Compact)2324**Tech goes inside subgraph. Knobs stay outside.**2526#### Inside subgraph (definition):27- UNETLoader, CLIPLoader, VAELoader28- Power Lora Loader (LoRA chain)29- ApplyPuLIDFlux2 + PuLID loaders (if used)30- IdentityFeatureTransferV3 (if used)31- CLIPTextEncode (pos + neg)32- ImageScaleToTotalPixels (ref scale)33- VAEEncode (ref → latent)34- ReferenceLatent / Flux2KleinMultiReferenceLatent35- GetImageSize, ComfySwitch (manual size logic)36- RandomNoise, KSamplerSelect, Flux2Scheduler, EmptyFlux2LatentImage37- CFGGuider, SamplerCustomAdvanced38- VAEDecode39- StringConcatenate (prompt 1+2 merge)40- PrimitiveStringMultiline guide notes4142#### Outside (main workflow):43- LoadImage (user upload)44- PrimitiveStringMultiline (Prompt 1 — kimlik/fizik)45- PrimitiveStringMultiline (Prompt 2 — sahne)46- PrimitiveStringMultiline (Negatif)47- Power Primitive (CFG) — user knob48- PrimitiveInt (Steps) — user knob49- PrimitiveBoolean (Manuel boyut) — user knob50- PrimitiveInt (Width, Height) — user knobs51- PrimitiveBoolean (PuLID on/off toggle)52- PrimitiveBoolean (BFS toggle)53- Subgraph instance node (for example, "Model Engine")54- PreviewImage, SaveImage, Image Comparer (rgthree)55- MarkdownNote (Kontrol Paneli)56- Fast Groups Bypasser (rgthree) — optional group toggle5758### 2. proxyWidgets (Exposed Controls on Subgraph Node)5960The subgraph instance node should expose these widgets to the outer panel (no need to enter subgraph):6162```json63"proxyWidgets": [64 ["<UNETLoader_id>", "unet_name"],65 ["<UNETLoader_id>", "weight_dtype"],66 ["<CLIPLoader_id>", "clip_name"],67 ["<CLIPLoader_id>", "type"],68 ["<PowerLoRA_id>", "lora_1"], // BFS Head69 ["<PowerLoRA_id>", "lora_2"], // anatomy70 ["<PowerLoRA_id>", "lora_3"], // snofs71 ["<ApplyPuLID_id>", "strength"],72 ["<IdentityFeatureTransferV3_id>", "preset"],73 ["<KSamplerSelect_id>", "sampler_name"]74]75```7677### 3. Group Standards (TR-titled, semantic colors)7879| Group | Title | Color | Contents |80|---|---|---|---|81| 1 | 1. Kullanıcı Girdileri | `#6d5aa3` (purple) | LoadImage, prompts, knobs |82| 2 | 2. Model Yükleme | `#2f6f89` (blue) | (inside subgraph) UNET/CLIP/VAE loaders |83| 3 | 3. Referans İşleme | `#2f6f89` (blue) | (inside subgraph) scale, VAEEncode, GetImageSize |84| 4 | 4. Conditioning | `#4f7a45` (green) | (inside subgraph) CLIPTextEncode, RefLatent, StringConcat |85| 5 | 5. Sampling | `#6a54a3` (dark purple) | (inside subgraph) Noise, Sampler, Scheduler, CFGGuider |86| 6 | 6. Çıktı | `#3d7e86` (cyan) | Preview, Save, Comparer |87| 7 | 7. Yüz Kimliği | `#7a2a6a` (magenta) | PuLID chain or face-related |88| 8 | 🎛️ KONTROL PANELİ | `#2a2a5a` (deep blue) | MarkdownNote + Fast Groups Bypasser |8990### 4. Node Collapse Rules9192`flags.collapsed: true` for ALL tech nodes that are not knobs. Show only titlebar. User clicks to expand.9394NEVER collapse:95- LoadImage (must show image preview)96- PrimitiveStringMultiline (text editing)97- Power Lora Loader (LoRA list interaction)98- PreviewImage, Image Comparer (display)99- MarkdownNote (info display)100- Bool/Int primitive knobs (single-click toggle)101- **Adjustable-tech (exception):** keep EXPANDED so the control is visible — `KSamplerSelect` (sampler_name), `IdentityFeatureTransferV3` (preset). See `validate_ui.py` ALLOW_EXPANDED.102103### 5. Naming Convention (TR)104105- Localized node titles (for example, `Modeli Yükle`, `Referansı Latent'e Çevir`)106- Group titles numbered + TR (`1. Kullanıcı Girdileri`)107- MarkdownNote titles with emoji prefix (`🎛️ KONTROL PANELİ`)108- LoRA filenames, model filenames, prompt content NEVER translated109110### 6. Position Layout111112Standard layout grid (master + extensions):113114```115y\x -2700 -2200 -1750 -1300 -880 -450 -50116-300 KONTROL PANEL (MarkdownNote)117-100 PuLID 118 loaders1190 PuLID Apply USER MODEL REF COND SAMP OUTPUT120500 chain INPUTS LOADERS PROCESS chain chain chain1211000 Prompts 1221280 (knobs row: CFG, Steps, Manual, W, H)1231450 Face crop chain (if multi-ref)1242050 Fast Groups Bypasser125```126127### 7. File Naming Convention128129- Protected master: `<PROJECT>-MASTER.json` or an explicit user-supplied allowlist130- Active workflow: `<PROJECT>-v{N}-{feature}.json`131- Reference workflows: `0{4-9} - {description}.json`132- Archive folder: `_archive/{timestamp}-{purpose}/`133- Analysis folder: `_analysis/{timestamp}-{purpose}.md`134135### 8. Geometry & Spacing (overlap-free, symmetric) — enforced by validate_ui.py136137- **No node-node overlap.** Rendered AABB must not intersect (collapse-aware: collapsed node ≈ 30px tall bar).138- **No group-group overlap** unless one fully contains another (intentional nesting).139- **Single-group membership.** A node's center lies inside exactly one group.140- **Title-band clearance.** A node's top edge ≥ its group's `y + 34`. Never let nodes sit under the group title band (the user's #1 complaint).141- **Column grid + symmetry.** Fixed x-column pitch (~360px), aligned rows. No flat single-row dumps.142- **Minimal-but-safe gaps.** ~16–40px between neighbours (<8 = cramped, >220 inside a group = wasteful).143- **Node sizing.** Min width ~140px, proportionate; collapse tech nodes so footprint ≈ titlebar.144- Group bounding wraps members + ~16px side/bottom margin + ~40px top (title band).145- Constants (frontend 1.44): node titlebar ≈30, group title band ≈34, collapsed node ≈30.146147### 9. Module Toggles (rgthree bypass / mute) — OFF = zero compute148149- **Fast Groups Muter** — group nodes ALWAYS↔NEVER (mute = skipped). Use when output not needed downstream.150- **Fast Groups Bypasser** — BYPASS (input passes through). Use to neutralize an inline MODEL/COND patch (e.g. IFT V3) while keeping the chain connected.151- **Mute/Bypass Repeater** — one node dispatches mode to many → feed a Fast Muter/Bypasser for a single dashboard toggle.152- Put toggles in `🎛️ KONTROL PANELİ`. TR titles. Bypass safer for inline patches; mute for whole branches.153154### 10. Classic LiteGraph vs Nodes 2.0155156- Author/ship in **classic LiteGraph** (stable; all custom nodes work).157- **Nodes 2.0** = Vue render (BETA, logo menu → "Nodes 2.0"). Can BREAK custom-node mappings (frontend #10988). Experimental preview only — never author assuming 2.0.158- Subgraph + parameters-panel widget editing OK in classic on frontend ≥1.24.3 / ≥v0.3.66 (user 1.44.19 → fine).159160## Workflow Edit Checklist (mandatory)161162Run these checks AT THE END of every workflow JSON modification:1631641. [ ] Tech nodes have `flags.collapsed: true`1652. [ ] Knobs (LoadImage, prompts, primitives, Power LoRA) are NOT collapsed1663. [ ] All groups have TR titles + correct color1674. [ ] MarkdownNote control panel exists at top with current version info1685. [ ] No duplicate links (link IDs unique)1696. [ ] No dangling links (all link endpoints exist in nodes)1707. [ ] `last_node_id` and `last_link_id` match actual max1718. [ ] Prompt fields NOT translated1729. [ ] LoRA/model filenames NOT translated17310. [ ] BFS Head LoRA: if `on: true`, MarkdownNote MUST mention `head_swap:` prompt prefix requirement17411. [ ] PuLID strength: if used, must be 0.85-1.05 (never 1.4 — burns at 4-step distilled)17512. [ ] Backup the workflow file to `_archive/` before destructive edits176177## Validator Script178179Use `scripts/validate_ui.py` to automatically check policy compliance:180181```bash182python "<SKILL_ROOT>/scripts/validate_ui.py" \183 "<COMFYUI_ROOT>/user/default/workflows/your-workflow.json"184```185186## Subgraph Programmatic Build Helper187188See `scripts/build_subgraph.py` for the helper that converts a flat workflow to the nest pattern. It:1891. Identifies tech vs knob nodes by type1902. Generates subgraph UUID1913. Moves tech nodes into `definitions.subgraphs[0].nodes`1924. Creates internal links + IO ports1935. Generates subgraph instance node with proxyWidgets1946. Rewires main workflow195196## References197198- `references/subgraph-pattern.md` — Deep dive on the 08 Pixaroma subgraph format199- `references/identity-mechanisms.md` — Face transfer mechanisms (PuLID Klein V2, BFS Head, IFT V3, MultiReferenceLatent)200- `references/research-2026.md` — Late 2025/early 2026 research findings on Klein 9B identity preservation201202## Hard Rules203204- **NEVER** translate prompts, LoRA names, or model filenames.205- **NEVER** modify a verified protected master in place; edit a copy or named version and hash-check the protected source.206- **ALWAYS** backup before destructive edits.207- **ALWAYS** validate after edit (0 missing links, 0 dangling refs).208- **ALWAYS** update MarkdownNote control panel with the new version's behavior.209- **ALWAYS** apply this skill at the END of every workflow change. No exceptions.
Run npx skillmds@latest add yigityildiz0/comfyui-workflow-ui-policy in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
ComfyUI workflow visual layout, subgraph nesting, proxyWidgets exposure, and group organization policy. Use this skill EVERY TIME you create, edit, or save. It is listed under Productivity on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
yigityildiz0 (@yigityildiz0) published this skill. Their other Agent Skills are listed on their SkillMD profile.