Skip to content

yutianxiao6/comfyui-mcp / skills/comfyui-workflow

comfyui-workflow

Verified

Build, 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

  1. Determine whether the user wants inspection, graph construction, graph editing, canvas display, execution, or troubleshooting.
  2. Call comfyui_health before work that depends on a live ComfyUI instance.
  3. Inspect managed workflows with comfyui_list_workflows and comfyui_get_workflow before assuming a workflow is absent or current.
  4. 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.

  1. Search with comfyui_list_node_types using a functional term such as checkpoint, sampler, controlnet, or save image.
  2. Call comfyui_get_node_type for every class whose inputs or outputs affect the graph.
  3. Call comfyui_list_models before choosing checkpoints, VAEs, LoRAs, ControlNets, upscale models, or other installed assets.
  4. Use comfyui_list_templates when an installed node pack may already provide a suitable workflow.

Read graph-contract.md before creating or modifying a graph.

Build or edit incrementally

  1. Create an empty graph with comfyui_create_workflow, or import an API-format graph with comfyui_import_workflow.
  2. Add one node at a time with comfyui_add_node. Keep verify_node_type=true unless the user is deliberately preparing a graph for a node that is not installed locally.
  3. Set literals with comfyui_set_input and links with comfyui_connect_nodes.
  4. 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.
  5. Use comfyui_disconnect_input before replacing a connection when that makes the intent clearer. Use comfyui_remove_node with force=true only when dangling connections should also be removed.
  6. Keep stable node IDs and useful _meta.title values 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

  1. Call comfyui_validate_workflow with live=true after graph construction and after material edits.
  2. Resolve all structural errors, missing required inputs, unknown nodes, and incompatible links. Do not disable validation merely to get a prompt into the queue.
  3. If the user wants the graph visible in ComfyUI, call comfyui_sync_canvas after validation. Explain that this requires the optional canvas bridge when it is unavailable.
  4. Call comfyui_run_workflow only 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.
  5. Prefer non-persistent overrides for one-off seed, prompt, batch, or dimension changes. Persist changes only when the workflow itself should change.
  6. Track the returned prompt_id with comfyui_get_run until the requested result or an actionable failure is available. Do not poll aggressively.
  7. 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_interrupt and comfyui_clear_queue as 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.
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: 471kUpdated Claude CodeCodexVerifiedInstall
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: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
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 availableStars: 322kUpdated Claude CodeCodexVerifiedInstall