yutianxiao6/comfyui-mcp / skills/comfyui-workflow
comfyui-workflow
VerifiedBuild, inspect, modify, validate, run, and troubleshoot ComfyUI workflows through ComfyUI MCP tools. Use for requests involving ComfyUI nodes, models, workflow JSON, graph connections, queue execution, generated outputs, canvas synchronization, LoRA, ControlNet, inpainting, upscaling, image-to-image, video, audio, 3D, or custom nodes.
ComfyUI Workflow
Operate the user's live ComfyUI installation through the comfyui_* MCP tools. Treat the live node schema and model inventory as authoritative; installations differ because custom nodes, models, and ComfyUI versions differ.
Establish the task
- Determine whether the user wants inspection, graph construction, graph editing, canvas display, execution, or troubleshooting.
- Call
comfyui_healthbefore work that depends on a live ComfyUI instance. - Inspect managed workflows with
comfyui_list_workflowsandcomfyui_get_workflowbefore assuming a workflow is absent or current. - Preserve the user's existing workflow unless they explicitly request replacement. Prefer a new managed workflow for experiments.
If the host prefixes MCP names, select tools by their comfyui_* suffix.
Discover before building
Never invent node class names, input names, output indices, enum values, or model filenames.
- Search with
comfyui_list_node_typesusing a functional term such ascheckpoint,sampler,controlnet, orsave image. - Call
comfyui_get_node_typefor every class whose inputs or outputs affect the graph. - Call
comfyui_list_modelsbefore choosing checkpoints, VAEs, LoRAs, ControlNets, upscale models, or other installed assets. - Use
comfyui_list_templateswhen an installed node pack may already provide a suitable workflow.
Read graph-contract.md before creating or modifying a graph.
Build or edit incrementally
- Create an empty graph with
comfyui_create_workflow, or import an API-format graph withcomfyui_import_workflow. - Add one node at a time with
comfyui_add_node. Keepverify_node_type=trueunless the user is deliberately preparing a graph for a node that is not installed locally. - Set literals with
comfyui_set_inputand links withcomfyui_connect_nodes. - After every mutation, carry the returned revision into the next mutation as
expected_revision. If a revision conflict occurs, read the workflow again and reconcile instead of blindly retrying. - Use
comfyui_disconnect_inputbefore replacing a connection when that makes the intent clearer. Usecomfyui_remove_nodewithforce=trueonly when dangling connections should also be removed. - Keep stable node IDs and useful
_meta.titlevalues so later edits and run overrides are unambiguous.
For common graph shapes, read workflow-patterns.md. Adapt every pattern to schemas reported by the live installation.
Validate, then present or run
- Call
comfyui_validate_workflowwithlive=trueafter graph construction and after material edits. - Resolve all structural errors, missing required inputs, unknown nodes, and incompatible links. Do not disable validation merely to get a prompt into the queue.
- If the user wants the graph visible in ComfyUI, call
comfyui_sync_canvasafter validation. Explain that this requires the optional canvas bridge when it is unavailable. - Call
comfyui_run_workflowonly when the user asked to generate, execute, render, queue, or otherwise run the workflow. Execution changes external state and may consume GPU time or paid-node credits. - Prefer non-persistent
overridesfor one-off seed, prompt, batch, or dimension changes. Persist changes only when the workflow itself should change. - Track the returned
prompt_idwithcomfyui_get_rununtil the requested result or an actionable failure is available. Do not poll aggressively. - Summarize the workflow name and revision, validation result, prompt ID, final status, and output file descriptors. Download files only when the user asks for local copies or the next task requires them.
Read execution-and-files.md for queue, upload, download, override, and canvas details.
Handle destructive and costly actions carefully
- Treat
comfyui_interruptandcomfyui_clear_queueas destructive to other active work. Use them only when the user requests them or when they are necessary to complete an explicitly requested recovery, and state the impact. - Do not overwrite workflows or uploaded files unless the user requested replacement and the exact target is known.
- Do not expose secrets, arbitrary local files, or paths outside the server's configured upload roots.
- Do not assume a node is free to use. If a discovered custom node calls a paid or remote service, surface that fact and obtain the authority required by the host before execution.
- Preserve useful failed-run evidence until troubleshooting is complete.
Troubleshoot with evidence
On errors, identify the failing layer: MCP startup, ComfyUI connectivity, node discovery, graph structure, prompt validation, queue execution, output retrieval, or canvas bridge. Read troubleshooting.md, inspect the relevant live schema or run record, and make the smallest corrective edit.
Do not substitute a different node, model, sampler, scheduler, or workflow objective without telling the user. If the requested component is unavailable, list the verified alternatives and explain the tradeoff.
Report completion
Keep the handoff compact and reproducible:
- managed workflow name and current revision;
- nodes or inputs materially changed;
- live validation outcome;
- execution prompt ID and status, if run;
- output locations, if produced or downloaded;
- any dependency the user still needs to install, such as a custom node, model, or canvas bridge.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |