/install openclaw-comfyui
ComfyUI-OpenClaw Skill 🎨✨
A professional, token-saving agent skill for connecting and controlling ComfyUI via API. Designed for high efficiency, automatic asset handling, and seamless integration with OpenClaw.
🏗️ Skill Structure
- Host Address:
192.168.1.38:8190(Configured inTOOLS.md) - Workflow Directory:
skills/comfyui/workflows/(Self-contained within the skill folder) - Output Directory:
outputs/comfy/(Relative to workspace root) - Core Script:
skills/comfyui/comfy_client.py(Handles prompt injection, image uploads, and result polling)
🛠️ Tools (CLI)
Invoke via the exec command:
python3 skills/comfyui/comfy_client.py \x3Ctemplate_id> "\x3Cprompt>" [input_image_path/orientation] [orientation]
Parameters:
- template_id:
gen_z: Text-to-Image (usesimage_z_image_turbo.json)qwen_edit: Image-to-Image / Editing (usesqwen_image_edit_2511.json) - Supports automatic image upload.
- prompt: The description of the image to generate or edits to perform.
- input_image_path: (Optional) Local path for image-to-image tasks.
- orientation: (Optional) Set to
portrait(720x1280) orlandscape(1280x720). Defaults toportrait.
💡 How to Add New Workflows
You can expand this skill easily:
- Place your new API-formatted JSON workflow in
skills/comfyui/workflows/. - Update the
WORKFLOW_MAPdictionary inskills/comfyui/comfy_client.pywith a new ID and the file path. - (Optional) If the workflow uses unique node types, adjust the injection logic in the script's
main()function.
🚀 Token-Saving Strategy
- Template Mapping: Never send full workflow JSONs in the chat. Refer to them by
template_id. - Vision-Saving Strategy: To minimize token usage, the agent should prioritize using the file path from metadata instead of analyzing image content via vision capabilities unless explicitly asked to describe or analyze the image.
- Direct Delivery: Deliver images directly to users via messaging plugins (e.g., Telegram) or local file openers (
open) to avoid bloating the LLM's context window with base64 data.
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install openclaw-comfyui - After installation, invoke the skill by name or use
/openclaw-comfyui - Provide required inputs per the skill's parameter spec and get structured output
What is OpenClaw ComfyUI?
Connect and control ComfyUI API efficiently using template mapping and auto-asset management for image generation and editing tasks. It is an AI Agent Skill for Claude Code / OpenClaw, with 2452 downloads so far.
How do I install OpenClaw ComfyUI?
Run "/install openclaw-comfyui" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is OpenClaw ComfyUI free?
Yes, OpenClaw ComfyUI is completely free (open-source). You can download, install and use it at no cost.
Which platforms does OpenClaw ComfyUI support?
OpenClaw ComfyUI is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created OpenClaw ComfyUI?
It is built and maintained by SalmonRK (@salmonrk); the current version is v1.0.4.