
Description
Submit a ComfyUI workflow JSON to a local 8188 server, monitor the queue, and download generated images. Use this Skill when the user wants to run a saved workflow, check whether ComfyUI is busy, fetch a generated image, list available checkpoints, or automate a reproducible generation pipeline.
SKILL.md
ComfyUI Workflow
Submit workflows, monitor the queue, and retrieve outputs from a local ComfyUI server. This is
the workhorse Skill; comfyui-character builds on top of it for character-consistent generation.
Scope
This Skill covers the transport between an agent and a local ComfyUI server. It does not
edit workflows, train models, or invent prompts — those concerns live in sibling Skills. It
assumes the user already has a workflow JSON they want to run (either a file the user wrote or
one of the bundled workflows/*.json examples).
Two equivalent entry points
You can drive ComfyUI from this Skill in either of two ways. Pick whichever the host environment supports best.
A. Python script (CLI-friendly, no MCP required)
# Health probe
python scripts/submit_workflow.py --probe
# Submit a workflow
python scripts/submit_workflow.py \
--workflow ./workflows/text-to-image.json \
--prompt "a tabby cat sleeping on a windowsill, morning light, photorealistic" \
--output-dir ./out
# Check the queue without submitting
python scripts/submit_workflow.py --queue
# Download a specific image
python scripts/submit_workflow.py --download \
--filename ComfyUI_00001_.png --output-dir ./out
The script lives at skills/comfyui-workflow/scripts/submit_workflow.py (relative to the Plugin
root) and accepts COMFYUI_URL from the environment, falling back to http://127.0.0.1:8188.
Full flag list in references/api-reference.md.
B. stdio MCP server (no Python required)
When the host agent is MCP-aware, the Plugin's server.mjs exposes three tools that mirror the
Python script:
| Tool | Mirrors |
|---|---|
submit_prompt | --workflow invocation |
check_queue | --queue invocation |
get_image | --download invocation |
The MCP server has zero npm dependencies. It is a 200-line stdio JSON-RPC server in plain Node.
See mcp.json for the registration snippet and server.mjs for the source.
Workflow contract
ComfyUI accepts a JSON object whose top-level keys are node IDs and whose values are
{class_type, inputs} records. When the user provides a workflow, do not edit the structure
unless they ask. Two patterns are common:
- A workflow file saved from the ComfyUI web UI: keys are numeric strings,
class_typematches the node name in the editor,inputsreference other nodes by[nodeId, outputIndex]. - An "API format" workflow produced by ComfyUI's "Save (API Format)" menu: same shape, but with
widget values inlined into
inputs.
Both work identically when POSTed to /prompt. The Plugin's workflows/text-to-image.json and
workflows/image-to-image.json are in the API format.
Overriding prompt values at submit time
The bundled Python script understands a tiny templating convention so you do not have to rewrite
the workflow JSON for every run. In a workflow, a CLIPTextEncode node with inputs.text
starting with the literal string __PROMPT__ will have that text replaced with the value of
--prompt on the command line before submission. This is a no-op for nodes that do not opt in.
{
"30": {
"class_type": "CLIPTextEncode",
"inputs": { "text": "__PROMPT__", "clip": ["4", 0] }
}
}
For workflows without that marker, the user must edit the workflow JSON directly.
Step-by-step recipe
- Health probe. Either call
check_queuevia MCP or runsubmit_workflow.py --probe. Stop and report if ComfyUI is unreachable; do not invent a successful run. - Resolve the workflow. If the user named a file, read it. If they named a workflow by description (e.g. "the one with the upscale at the end"), ask for a path or a saved name.
- Apply prompt override if used. If
--promptis provided and the workflow contains__PROMPT__, substitute. Otherwise pass the workflow through unchanged. - Submit. POST to
/promptwith{"prompt": <workflow>}. Captureprompt_id. - Poll. Loop
GET /history/<prompt_id>with a 2-second sleep. Stop on terminal status (success,error, orcancelled). Use a 15-minute cap; long jobs should be split. - Resolve outputs. The
outputsobject lists theSaveImage/VHS_VideoCombinefiles produced. For each, fetchGET /view?filename=...&subfolder=...&type=output. - Report. Tell the user the prompt_id, the time taken, the saved file paths, and any warnings (low VRAM, retries, partial outputs).
Long jobs and VRAM safety
- ComfyUI 22B-class models can hold the GPU for hours. The Plugin does not implement a watchdog;
for jobs longer than 30 minutes, instruct the user to watch
nvidia-smithemselves. - If a poll returns an error status, capture the full
outputsblock and the error message; report both. Do not retry automatically — generation is expensive.
Requirements
- ComfyUI running locally (or reachable at
COMFYUI_URL). - Python 3.10+ if using the script. The MCP server requires Node 18+.
- No additional accounts, paid services, or network destinations.
License
Apache-2.0. See LICENSE.
More skills from the MiniMax-Code-Plugins repository
View all 93 skillsarticle2tasks
convert articles into Dida365 tasks
Aug 18Content CreationMCPTask Managementbinder-agent-eval
evaluate LLM agent decision quality
Aug 27AgentsBenchmarkingEvalsLLMbinder-handoff
export and validate binder task packages
Aug 27AutomationData Engineeringbinder-protocol
compile and validate binder design protocols
Aug 27AutomationYAMLbinder-ranking-audit
audit binder campaign ranking results
Aug 27Data AnalysisQAbinder-replay
replay binder design campaigns
Aug 27AutomationData Analysis
More from MiniMax
View publisherandroid-native-dev
develop Android native applications
skills
Jul 13AccessibilityAndroidKotlinMobile +1buddy-sings
generate singing performances for AI companions
skills
Jul 13AgentsAudioCreativecolor-font-skill
select color palettes and font pairings
skills
Jul 13DesignPresentationsThemesTypographydesign-style-skill
select visual design systems for presentations
skills
Jul 13DesignDesign SystemPowerPointPresentationsflutter-dev
build cross-platform apps with Flutter
skills
Jul 13DartFlutterMobilePerformance +1frontend-dev
build visually striking frontend web pages
skills
Jul 13AnimationCreativeDesignFrontend +1