by HuangYuChuh
Agent-friendly ComfyUI workflow skills for OpenClaw, Hermes Agent, Codex, and Claude Code. Turn any ComfyUI workflow into a callable AI agent skill via CLI.
# Add to your Claude Code skills
git clone https://github.com/HuangYuChuh/ComfyUI_Skills_OpenClawGuides for using ai agents skills like ComfyUI_Skills_OpenClaw.
name: comfyui-skill-openclaw description: | 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.
Prerequisites: Install the CLI:
pip install -U comfyui-skill-cli. All commands must run from this project's root directory (where thisSKILL.mdis located).[!IMPORTANT] Directory Sensitivity: The CLI reads
config.jsonanddata/from the current directory. You MUSTcdinto the project root before running any command. Symptom:listreturns[]orserver statusreports not found → you are in the wrong directory.
comfyui-skill --json workflow import <path>comfyui-skill --json upload <image>, then executecomfyui-skill --json upload <mask> --mask, then executecomfyui-skill --json history list <id>comfyui-skill --json jobs list --status failedcomfyui-skill --json server stats --allcomfyui-skill --json nodes listcomfyui-skill --json run <id> --validatepython3 ./ui/open_ui.py<server_id>/<workflow_id> (e.g., local/txt2img). If server is omitted, the default server is used.schema.json that maps business parameter names (e.g., prompt, seed) to internal ComfyUI node fields. Never expose node IDs to the user.config.json. Check health with server status.| 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 deps check <id> | Check missing dependencies |
| comfyui-skill --json deps install <id> --repos '[...]' | Install missing custom nodes |
| comfyui-skill --json workflow import <path> | Import workflow (auto-detect, warns about deprecated nodes) |
| comfyui-skill --json history list <id> | List execution history for a workflow |
comfyui-skill --json list
Returns a JSON array of all enabled workflows with their parameters.
required: true parameters → ask the user if not provided.required: false parameters → infer from context (e.g., seed = random number), or omit.Assemble parameters into a JSON string. Example:
{"prompt": "A beautiful landscape, high quality, masterpiece", "seed": 40128491}
If critical parameters are missing, ask the user (e.g., "What visual style would you like?").
Always run before first execution of a workflow:
comfyui-skill --json deps check <server_id>/<workflow_id>
is_ready is true → proceed to Step 4.is_ready is false:
comfyui-skill --json deps install <id> --repos '["https://github.com/repo1"]'
Use source_repo URLs from the check report as --repos values.needs_restart is true, inform the user to restart ComfyUI, then re-check.checkpoints).Note: JSON args must be wrapped in single quotes to prevent bash from parsing double quotes.
Choose the execution mode based on your environment:
submit + status (recommended for chat)Step 4a — Submit:
comfyui-skill --json submit <id> --args '{"prompt": "..."}'
Returns: {"status": "submitted", "prompt_id": "..."}. Tell the user generation has started.
Step 4b — Poll:
comfyui-skill --json status <prompt_id>
Status values: queued (with position) → running → success (with outputs) or error.
Polling pattern — critical for real-time feedback:
Each status call must be a separate tool invocation (a separate bash command). Do NOT write a shell loop. The correct pattern is:
status as a standalone bash command.queued or running: send a text message to the user with progress, then run status again.success: proceed to Step 5.error: report the error.comfyui-skill --json run <id> --args '{"prompt": "..."}'
Blocks until finished. Returns the same result format as status with success.
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).
When the user wants to add new workflows (not execute existing ones):
comfyui-skill --json workflow import <json_path>
schema.json with smart parameter extraction.For bulk import from ComfyUI server or local folders, see references/workflow-import.md.
comfyui-skill --json server status. If offline, ask the user to start ComfyUI.comfyui-skill --json list to see available workflows. If missing, the user needs to import it first.--args is valid JSON wrapped in single quotes.ComfyUI Skills for OpenClaw is an agent-friendly bridge that turns ComfyUI workflows into callable skills for AI agents.
Instead of asking an agent to manipulate raw ComfyUI graphs, this project gives each workflow a clean, controlled interface through a CLI and schema-based parameter mapping. It works with OpenClaw, Hermes Agent, Codex, Claude Code, and any agent that can run shell commands. Compatible with the agentskills.io open standard.
Use it when you want to import existing ComfyUI workflows, expose only the parameters that matter, run them from chat or agent tasks, and manage everything through one consistent workflow layer.
| Best for | What you get | |----------|--------------| | OpenClaw, Codex, Claude Code, and Hermes Agent users | A ComfyUI workflow layer that agents can call safely | | Existing ComfyUI workflow owners | A clean way to reuse exported workflows without exposing the full graph | | Multi-machine setups | One namespace for local and remote ComfyUI servers | | Users who want visual setup and testing | An optional Web UI for configuring, previewing, and validating workflows before agents use them |
| Capability | Why it matters | |------------|----------------| | Agent-friendly CLI | Designed for agents, not just humans. It provides a cleaner and more reliable interface than working directly with raw ComfyUI graphs or lower-level ComfyUI interaction patterns. | | Schema-based parameter mapping | Expose only the fields you want the agent to control, with clear aliases, types, and descriptions. | | ComfyUI workflow import | Import workflow JSON files, auto-detect formats, and generate the mapping layer needed for agent use. | | Multi-server routing | Manage local and remote ComfyUI servers under one namespace and route jobs to the right machine. | | Dependency management | Check missing nodes and models before execution and install supported dependencies through the CLI. | | Optional Web UI | A visual layer for configuration and testing. It does not replace the CLI, and agent-facing actions still map to the same CLI workflow. |
Get ComfyUI Skills running in a few minutes.
Before you start, make sure you have:
Choose the directory that matches your agent environment.
cd ~/.openclaw/workspace/skills
git clone https://github.com/HuangYuChuh/ComfyUI_Skills_OpenClaw.git comfyui-skill-openclaw
cd comfyui-skill-openclaw
cd ~/.claude/skills
git clone https://github.com/HuangYuChuh/ComfyUI_Skills_OpenClaw.git comfyui-skill
cd comfyui-skill
cd ~/.codex/skills
git clone https://github.com/HuangYuChuh/ComfyUI_Skills_OpenClaw.git comfyui-skill
cd comfyui-skill
cd ~/.hermes/skills/creative
git clone https://github.com/HuangYuChuh/ComfyUI_Skills_OpenClaw.git comfyui-skill-openclaw
cd comfyui-skill-openclaw
Or install via Hermes CLI (once the PR is merged):
hermes skills install comfyui-skill-openclaw
cp config.example.json config.json
pipx install comfyui-skill-cli
Or:
pip install comfyui-skill-cli
If you already have the CLI installed, upgrade it with:
# If you installed it with pipx
pipx upgrade comfyui-skill-cli
# If you installed it with pip
python3 -m pip install -U comfyui-skill-cli
comfyui-skill server status
comfyui-skill list
comfyui-skill workflow import /absolute/path/to/my-workflow.json
comfyui-skill deps check local/my-workflow
comfyui-skill run local/my-workflow --args '{"prompt": "a white cat"}'
For manual CLI imports, the recommended approach is to pass the workflow JSON as an absolute path. That avoids path ambiguity and keeps the storage model simple.
For example:
comfyui-skill workflow import /Users/yourname/Downloads/my-workflow.json
After import, the CLI stores the normalized workflow and schema under data/<server_id>/<workflow_id>/, for example data/local/my-workflow/workflow.json and data/local/my-workflow/schema.json.
This is also the formal layout used by the Web UI and by Agent/OpenClaw-driven imports:
data/<server_id>/<workflow_id>/
workflow.json
schema.json
history/
At this point, the CLI will read your local config.json, discover available workflows, and execute them through your ComfyUI server.
If you prefer a visual setup and testing flow, see the Web UI section below.
Choose the path that matches how you want to use the project.
Use this path if you want OpenClaw to discover and execute ComfyUI workflows as skills.
~/.openclaw/workspace/skillscomfyui-skill-cliconfig.jsonUse this path if you want coding agents to call ComfyUI workflows through shell commands.
comfyui-skill list--argsUse this path if you want a visual interface for configuration, inspection, and testing. See the Web UI section below for launch instructions and details.
Use this path if you want direct control over config.json, workflow.json, and schema.json.
config.json{
"servers": [
{
"id": "local",
"name": "Local",
"url": "http://127.0.0.1:8188",
"enabled": true,
"output_dir": "./outputs"
}
],
"default_server": "local"
}
data/local/my-workflow/
workflow.json # ComfyUI API-format export
schema.json # Parameter mapping
schema.json{
"description": "My workflow",
"enabled": true,
"parameters": {
"prompt": {
"node_id": 10,
"field": "pro
No comments yet. Be the first to share your thoughts!