π¦ ClawHub
OpenClaw ComfyUI
by @salmonrk
Connect and control ComfyUI API efficiently using template mapping and auto-asset management for image generation and editing tasks.
TERMINAL
clawhub install openclaw-comfyuiπ About This Skill
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
192.168.1.38:8190 (Configured in TOOLS.md)skills/comfyui/workflows/ (Self-contained within the skill folder)outputs/comfy/ (Relative to workspace root)skills/comfyui/comfy_client.py (Handles prompt injection, image uploads, and result polling)π οΈ Tools (CLI)
Invoke via theexec command:
python3 skills/comfyui/comfy_client.py "" [input_image_path/orientation] [orientation] Parameters:
gen_z: Text-to-Image (uses image_z_image_turbo.json)
2. qwen_edit: Image-to-Image / Editing (uses qwen_image_edit_2511.json) - *Supports automatic image upload.*
portrait (720x1280) or landscape (1280x720). Defaults to portrait.π‘ How to Add New Workflows
You can expand this skill easily: 1. Place your new API-formatted JSON workflow inskills/comfyui/workflows/.
2. Update the WORKFLOW_MAP dictionary in skills/comfyui/comfy_client.py with a new ID and the file path.
3. (Optional) If the workflow uses unique node types, adjust the injection logic in the script's main() function.π Token-Saving Strategy
template_id.open) to avoid bloating the LLM's context window with base64 data.