- name
SKILL.md
Le fichier du skill reste dans le dépôt de l'éditeur.
Collez la commande copiée dans un terminal. Elle installe ce SKILL.md dans cet agent.
npx skills add artokun/comfyui-mcp --skill comfyui-core -a cursor -yCollez la commande copiée dans un terminal. Elle installe ce SKILL.md dans cet agent.
npx skills add artokun/comfyui-mcp --skill comfyui-core -a claude-code -yCollez la commande copiée dans un terminal. Elle installe ce SKILL.md dans cet agent.
npx skills add artokun/comfyui-mcp --skill comfyui-core -a codex -yCollez la commande copiée dans un terminal. Elle installe ce SKILL.md dans cet agent.
npx skills add artokun/comfyui-mcp --skill comfyui-core -a grok -yEnvoyez le message copié dans un chat Grok Bot. Le Bot récupère ce SKILL.md sur GitHub et l'ajoute aux skills que partagent tous vos Bots.
Install this skill: https://github.com/artokun/comfyui-mcp/tree/HEAD/plugin/skills/comfyui-coreDe l'éditeur
ComfyUI workflows are JSON objects mapping string node IDs to node definitions:
{
"1": {
"class_type": "CheckpointLoaderSimple",
"inputs": { "ckpt_name": "sd_xl_base_1.0.safetensors" },
"_meta": { "title": "Load Checkpoint" }
},
"2": {
"class_type": "CLIPTextEncode",
"inputs": { "text": "a cat", "clip": ["1", 1] },
"_meta": { "title": "Positive Prompt" }
}
}
"1", "2", etc.)class_type is the exact Python class name of the nodeinputs contains both widget values (scalars) and connections (arrays)["sourceNodeId", outputIndex], a 2-element array where:
output list (0-based)_meta is optional and used for display titles only"model": ["1", 0] // Connect to node 1's first output (MODEL)
"clip": ["1", 1] // Connect to node 1's second output (CLIP)
"vae": ["1", 2] // Connect to node 1's third output (VAE)
"positive": ["2", 0] // Connect to node 2's first output (CONDITIONING)
"samples": ["5", 0] // Connect to node 5's first output (LATENT)
"images": ["6", 0] // Connect to node 6's first output (IMAGE)
{ "1": { class_type, inputs }, "2": { ... } }. It is compact and used by enqueue_workflow, create_workflow (action:"validate"), create_workflow (action:"modify"), etc.{ "nodes": [...], "links": [...] }. It includes layout positions, sizes, groups, and visual metadata so ComfyUI's canvas can open and edit itsave_workflow auto-converts API-format input to Web UI format with a generated layout. Prefer passing real Web UI format (from get_workflow(action="get", filename=…, format="ui")), since a generated layout loses the original node positions and groupsget_workflow defaults to format="api" for analysis/execution; use format="ui" when loading a workflow to re-save or edit in the canvas_meta.mode: "muted". They are inactive but visible for understanding the workflow_meta.title and Constant key for tracing data flowget_workflow(action="analyze", filename=…) is the first call for understanding any saved workflow. It returns a structured text summary with sections, node IDs, key settings, virtual wires, and connection graph. No raw JSON, just what you need to reason about the workflow. Supports views: summary (default), overview (mermaid), detail (section mermaid), list, flat.get_workflow (action:"list") lists all saved workflows in ComfyUI's user libraryget_workflow(action="get", filename=…) loads raw workflow JSON. Only use it when you need the actual JSON for enqueue_workflow, create_workflow (action:"modify"), or save_workflow. Use action="analyze" instead for understanding. When the JSON is headed back to save_workflow, request format="ui" so the workflow stays editable in the frontend.save_workflow(action="save", filename=…, workflow=…) saves a workflow to the user library. Pass Web UI format ({ nodes, links }) so it keeps its real layout in ComfyUI's canvas. API-format graphs are accepted and auto-converted to Web UI format (with a generated layout) precisely because a raw API-format save is not canvas-editable; the frontend cannot open it. When re-saving an existing workflow, load it with get_workflow(action="get", filename=…, format="ui") and edit that, so positions and groups survive.ComfyUI nodes pass typed data through connections:
CheckpointLoaderSimple → MODEL, CLIP, VAE
├─ CLIP → CLIPTextEncode (positive) → CONDITIONING
├─ CLIP → CLIPTextEncode (negative) → CONDITIONING
│
EmptyLatentImage → LATENT
│
KSampler (model, positive, negative, latent_image) → LATENT
│
VAEDecode (samples, vae) → IMAGE
│
SaveImage (images)
Node IDs typically: 1=Checkpoint, 2=Positive, 3=Negative, 4=EmptyLatent, 5=KSampler, 6=VAEDecode, 7=SaveImage
Same as txt2img but replace EmptyLatentImage with:
LoadImage → IMAGE
VAEEncode (pixels, vae) → LATENT → KSampler.latent_image
Set KSampler.denoise to 0.5 to 0.8 (lower = closer to input image).
LoadImage → IMAGE
UpscaleModelLoader → UPSCALE_MODEL
ImageUpscaleWithModel (upscale_model, image) → IMAGE
SaveImage (images)
LoadImage (image) → IMAGE → VAEEncode → LATENT
LoadImage (mask) → MASK
SetLatentNoiseMask (samples, mask) → LATENT → KSampler.latent_image
create_workflow with template "txt2img" and your paramsenqueue_workflow(action="enqueue") with the returned JSON. It returns prompt_id immediatelyqueue (action:"status") with the prompt_id until done is trueget_image (action:"list_outputs") (limit 1) to find the generated image, then Read to display itcreate_workflow (action:"node_info") queries what nodes are available and their schemascreate_workflow (action:"modify") patches an existing workflow (set_input, add_node, remove_node, connect, insert_between)visualize_workflow shows a workflow as a mermaid diagramvisualize_workflow turns workflow JSON into a mermaid diagramvisualize_workflow (action:"mermaid") turns a mermaid diagram into workflow JSON (uses /object_info for schema resolution)list_local_models shows what's installeddownload_model action:"search" finds models on HuggingFacedownload_model downloads to ComfyUI's models directoryNever ask the user to manually download models. If a required model is missing, search for it and download it yourself:
list_local_models firstdownload_model action:"search" or CivitAI via their REST APIdownload_model to install it directly to the correct subfolderCivitAI API (when the CIVITAI_API_TOKEN env var is available):
GET https://civitai.com/api/v1/models?query={query}&types=Checkpoint&sort=Most+Downloaded&limit=5GET https://civitai.com/api/v1/models/{modelId}GET https://civitai.com/api/download/models/{modelVersionId}?token={token}CivitAI is preferred for fine-tuned models, community-rated checkpoints, and specialized LoRAs. HuggingFace is preferred for official/base models (SDXL, Flux, SD 1.5).
search_custom_nodes searches the ComfyUI Registry (action: "search") or gets one pack's details (action: "details")list_packs (action: "generate_skill") auto-generates a skill file for a node packenqueue_workflow submits to ComfyUI's queue and returns prompt_id + queue position immediately. It does not block.
After enqueuing one or more workflows, use a background Bash task to monitor progress silently:
# Single job
Bash(run_in_background: true):
node "${CLAUDE_PLUGIN_ROOT}/scripts/monitor-progress.mjs" <prompt_id>
# Multiple jobs (batch)
Bash(run_in_background: true):
node "${CLAUDE_PLUGIN_ROOT}/scripts/monitor-progress.mjs" <id1> <id2> <id3>
The script connects to ComfyUI's WebSocket and reports:
KSampler step 12/20 (60%))The standard generation pattern:
create_workflow or build workflow JSON + enqueue_workflow(action="enqueue") (repeat for batch)get_image (action:"list_outputs") or Read to display the generated imagesDo not poll queue (action:"status") in a loop. The background monitor replaces polling entirely.
If the monitor script is unavailable, fall back to queue (action:"status") and poll until done is true.
One tool, queue, driven by its action parameter:
queue (action:"list") shows running/pending job counts and prompt_idsqueue (action:"status") checks if a specific prompt_id is running, pending, or donequeue (action:"cancel") interrupts a running job (pass optional prompt_id to target a specific one)queue (action:"cancel_queued") removes a specific pending job from the queue by prompt_idqueue (action:"clear") removes all pending jobs (does not stop the currently running job)When to use queue tools:
queue (action:"status") for a quick boolean check (prefer the background monitor for ongoing tracking)queue (action:"cancel") stops what's running now and queue (action:"cancel_queued") removes a pending onequeue (action:"clear") then optionally queue (action:"cancel")get_system_stats reports GPU, VRAM, Python version, OS detailsqueue (action:"list") shows running/pending jobs (also listed above under Queue Management)When ComfyUI is unresponsive or crashed:
get_system_stats. If it fails, ComfyUI is downrestart_comfyui with action: "restart" (preserves launch args from a prior action: "stop")restart_comfyui with action: "start" or ask the user to start it manually. On Windows action: "start" never launches ComfyUI (it refuses), so ask the user to start it from the Desktop app or its launcherBefore stopping ComfyUI for maintenance:
restart_comfyui with action: "status" first. It is read-only. Then read stop.recoverable_by_start:
"yes": action: "start" can bring it back"no": after a stop, a person has to start ComfyUI again (stop.manual_recovery_reason says why), so tell the user before you stop"unknown": whether it can be brought back is not established. Resolve that, or tell the user, before a maintenance stop. If target_stable is false, the target changed mid-check, so just call status again"not-applicable": the stop itself is unavailable (stop.allowed is not "yes"), so there is nothing for start to recover. stop.manual_recovery_reason says whyaction: "restart", not stop then start. Restart refuses rather than leaving ComfyUI down when it cannot bring it backaction: "stop" only when ComfyUI should stay downWhen a job appears hung (monitor shows [STALL]):
get_system_stats and look at VRAM usage (OOM causes hangs)queue (action:"cancel") to interrupt the stuck jobrestart_comfyui to force-restartclear_vram after restart to free GPU memory before retryingThe visualize_workflow tool produces mermaid flowcharts with:
loading, conditioning, sampling, image, output-->|MODEL|, -->|CLIP|, -->|LATENT|, etc.LR (left-to-right) by default, TB (top-to-bottom) for large workflowsThe visualize_workflow (action:"mermaid") tool parses mermaid back into workflow JSON, using connection type labels to resolve the correct input/output slots via /object_info schemas.
["1", 0] not [1, 0]; node IDs are strings{ nodes: [], links: [] }; use API formatcreate_workflow (action:"node_info")enqueue_workflow randomizes seeds by default unless disable_random_seed: trueCore ComfyUI knowledge covering workflow format, node types, pipeline patterns, and MCP tool usage
---name: comfyui-coredescription: Core ComfyUI knowledge covering workflow format, node types, pipeline patterns, and MCP tool usage---# plugin/skills/comfyui-core/SKILL.mdFAQ
Téléchargez plugin/skills/comfyui-core/SKILL.md auprès de l'éditeur, ou copiez le chemin et ouvrez le dépôt. PlugMCP répertorie le skill et n'héberge pas le fichier.
L'éditeur le maintient sur https://github.com/artokun/comfyui-mcp.
Claude, Cursor, Codex et Grok Build peuvent lire un SKILL.md que vous ajoutez depuis le dépôt de l'éditeur. Grok Bot l'installe lorsque vous envoyez dans un chat le lien du dossier GitHub du skill.