Run ComfyUI workflows from any AI agent (Claude Code, OpenClaw, Codex, Hermes) via a single CLI.
Import workflows, manage dependencies, execute across multiple servers, and track history
โ all through shell commands.
**Use this Skill when:**
(1) The user requests to "generate an image", "draw a picture", or "execute a ComfyUI workflow".
(2) The user has specific stylistic, character, or scene requirements for image generation.
(3) The user asks you to import, register, sync, or configure saved ComfyUI workflows for later reuse.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
A direct command skips the review prompt. Inspect the source before running it.
Run ComfyUI workflows from any AI agent (Claude Code, OpenClaw, Codex, Hermes) via a single CLI.
Import workflows, manage dependencies, execute across multiple servers, and track history
โ all through shell commands.
**Use this Skill when:**
(1) The user requests to "generate an image", "draw a picture", or "execute a ComfyUI workflow".
(2) The user has specific stylistic, character, or scene requirements for image generation.
(3) The user asks you to import, register, sync, or configure saved ComfyUI workflows for later reuse.
Prerequisites: Install the CLI: pip install -U comfyui-skill-cli. All commands must run from this project's root directory (where this SKILL.md is located).
[!IMPORTANT]
Directory Sensitivity: The CLI reads config.json and data/ from the current directory.
You MUSTcd into the project root before running any command.
Symptom: list returns [] or server status reports not found โ you are in the wrong directory.
Quick Decision
User says "generate image / draw a picture" โ Execution Flow (Step 1โ4)
User says "img2img / use this image" โ first comfyui-skill --json upload <image>, then execute
User says "inpainting / mask this area" โ comfyui-skill --json upload <mask> --mask, then execute
User says "show previous results" โ comfyui-skill --json history list <id>
User says "what failed / check job status" โ comfyui-skill --json jobs list --status failed
User says "which server has more VRAM" โ comfyui-skill --json server stats --all
User says "what nodes are available" โ comfyui-skill --json nodes list
User says "dry run / test without executing" โ comfyui-skill --json run <id> --validate
User says "open management UI" โ python3 ./ui/open_ui.py
Core Concepts
Skill ID: <server_id>/<workflow_id> (e.g., local/txt2img). If server is omitted, the default server is used.
Schema: Each workflow has a schema.json that maps business parameter names (e.g., prompt, seed) to internal ComfyUI node fields. Never expose node IDs to the user.
Server: One or more ComfyUI instances configured in config.json. Check health with server status.
Command Reference
Command
Purpose
comfyui-skill --json server status
Check if ComfyUI server is online
comfyui-skill --json server stats
Show VRAM, RAM, GPU, versions (--all for multi-server)
comfyui-skill --json list
List all available workflows and parameters
comfyui-skill --json info <id>
Show workflow details and parameter schema
comfyui-skill --json submit <id> --args '{...}'
Submit a workflow (non-blocking)
comfyui-skill --json status <prompt_id>
Check execution status
comfyui-skill --json run <id> --args '{...}'
Execute a workflow (blocking, real-time streaming)
comfyui-skill --json run <id> --validate
Validate workflow without executing
comfyui-skill --json upload <path>
Upload image to ComfyUI (for img2img workflows)
comfyui-skill --json upload <path> --mask
Upload mask image (for inpainting workflows)
comfyui-skill --json nodes list
List all available ComfyUI nodes
comfyui-skill --json jobs list
List server-side job history (--status failed to filter)
comfyui-skill --json run <id> --args '{"prompt": "..."}'
Blocks until finished. Returns the same result format as status with success.
Step 5: Present Results
On success, the result contains an outputs array with file references (filename, subfolder, type).
Use your native capabilities to present the files to the user (e.g., image preview, file path).
Workflow Import
When the user wants to add new workflows (not execute existing ones):
comfyui-skill --json workflow import <json_path>
Supports both API format and editor format (auto-detected, auto-converted).
Automatically generates schema.json with smart parameter extraction.
After import, check dependencies before first execution.
ComfyUI Offline: Run comfyui-skill --json server status. If offline, ask the user to start ComfyUI.
Workflow Not Found: Run comfyui-skill --json list to see available workflows. If missing, the user needs to import it first.
Parameter Format Error: Ensure --args is valid JSON wrapped in single quotes.
Cloud Node Unauthorized: Workflow uses cloud API nodes (Kling, Sora, etc.). Guide user to: (1) Generate an API Key at https://platform.comfy.org, (2) Open Web UI โ Server Settings โ fill in "ComfyUI API Key".