Run local ComfyUI workflows via the HTTP API. Use when the user asks to run ComfyUI, execute a workflow by file path/name, or supply raw API-format JSON; supports the default workflow bundled in assets.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install comfyui或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install comfyui⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/comfyui/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: ComfyUI description: Run local ComfyUI workflows via the HTTP API. Use when the user asks to run ComfyUI, execute a workflow by file path/name, or supply raw API-format JSON; supports the default workflow bundled in assets. read_when: - User asks to generate images with ComfyUI - User provides a workflow file or JSON to run - User describes an image to generate (subject, style, scene) - User pastes or sends a list of model weight URLs to download for ComfyUI metadata: {"clawdbot":{"emoji":"🖼️","requires":{"bins":["python3"]}}} ---
Run ComfyUI workflows on the local server (default 127.0.0.1:8188) using API-format JSON and return output images.
The run script only takes --workflow . You must inspect and edit the workflow JSON before running, using your best knowledge of the ComfyUI API format. Do not assume fixed node IDs, class_type names, or _meta.title values — the user may have updated the default workflow or supplied a custom one.
For every run (including the default workflow):
skills/comfyui/assets/default-workflow.json, or the path/file the user gave).PrimitiveStringMultiline, CLIPTextEncode (positive text), or any node with _meta.title or class_type suggesting "Prompt" / "positive" / "text". Update the corresponding input (e.g. inputs.value, or the text input to the encoder) to the image prompt you derived from the user (subject, style, lighting, quality). If the user didn’t ask for a custom image, you can leave the existing prompt or tweak only if needed.StringConcatenate, or a second string input that acts as style. Set them if the user asked for a specific style or to clear a default prefix.KSampler, BasicGuider, or any node with a seed input) and set seed to a new random integer so each run can differ.skills/comfyui/assets/tmp-workflow.json). Use ~/ComfyUI/venv/bin/python for any inline Python; do not use bare python.comfyui_run.py --workflow .If the workflow structure is unclear or you can’t find prompt/sampler nodes, run the file as-is and only change what you can reliably identify. Same approach for arbitrary user-supplied JSON: inspect first, edit at your best knowledge, then run.
~/ComfyUI/venv/bin/python skills/comfyui/scripts/comfyui_run.py \
--workflow <path-to-workflow.json>
The script only queues the workflow and polls until done. It prints JSON with prompt_id and output images. All prompt/style/seed changes are done by you in the JSON beforehand.
If the run script fails with a connection error (e.g. connection refused or timeout to 127.0.0.1:8188), ComfyUI may not be installed or not running.
Check: Does ~/ComfyUI exist and contain main.py?
```bash git clone https://github.com/comfyanonymous/ComfyUI.git ~/ComfyUI cd ~/ComfyUI python3 -m venv venv ~/ComfyUI/venv/bin/pip install -r requirements.txt ``` Then start the server (see below). Tell the user they may need to install model weights into ~/ComfyUI/models/ depending on the workflow.
```bash ~/ComfyUI/venv/bin/python ~/ComfyUI/main.py --listen 127.0.0.1 ``` Run in the background or in a separate terminal so it keeps running. Then retry the workflow run.
Use ~ (or the user’s home) for paths so it works on their machine.
When the user pastes or sends a list of model weight URLs (one per line, or comma-separated), download those files into the ComfyUI installation so the workflow can use them later.
#).~/ComfyUI). The script uses pget for parallel downloads when available; if pget is not in PATH, it installs it to ~/.local/bin automatically (no sudo). If pget cannot be installed (e.g. unsupported OS/arch), it falls back to a built-in download. Use the ComfyUI venv Python so the script runs correctly: ```bash ~/ComfyUI/venv/bin/python skills/comfyui/scripts/download_weights.py --base ~/ComfyUI ``` Pass URLs as arguments, or pipe a file/list on stdin: ```bash echo "https://example.com/model.safetensors" | ~/ComfyUI/venv/bin/python skills/comfyui/scripts/download_weights.py --base ~/ComfyUI ``` Or save the user’s list to a temp file and run: ```bash ~/ComfyUI/venv/bin/python skills/comfyui/scripts/download_weights.py --base ~/ComfyUI < /tmp/weight_urls.txt ``` To force the built-in download (no pget): add --no-pget.
vae, clip, loras, checkpoints, text_encoders, controlnet, upscale_models). The user can optionally specify a subfolder per line as url subfolder (e.g. https://.../model.safetensors vae). You can also pass a default with --subfolder loras so all URLs in that run go to models/loras/.--overwrite to replace.~/ComfyUI/models// . Tell the user where each file was saved and that they can run the workflow once the ComfyUI server is (re)started if needed.Supported subfolders (under ComfyUI/models/): checkpoints, clip, clip_vision, controlnet, diffusion_models, embeddings, loras, text_encoders, unet, vae, vae_approx, upscale_models, and others. Use --subfolder when the auto-inference is wrong.
Outputs are saved under ComfyUI/output/. Use the images list from the script output to locate the files (filename + subfolder).
After a successful ComfyUI run, you must deliver the generated image(s) to the user. Do not reply with only the filename in text or with NO_REPLY.
images (each has filename, subfolder, type).ComfyUI/output/ + subfolder + filename (e.g. ComfyUI/output/z-image_00007_.png).path so the user receives the file). Include a short caption if helpful (e.g. "Here you go." or "Tokyo street scene.").Every successful run must result in the user receiving the image. Never leave them with only a filename or no delivery.
comfyui_run.py: Queue a workflow, poll until completion, print prompt_id and images. No args — you edit the JSON before running.download_weights.py: Download model weight URLs into ~/ComfyUI/models// . Uses pget when available (installs to ~/.local/bin if missing); fallback to built-in download. Input: URLs as args or one per line on stdin. Options: --base, --subfolder, --overwrite, --no-pget. Infers subfolder from URL/filename when not given.default-workflow.json: Default workflow. Copy and edit (prompt, style, seed) then run with the edited path; or run as-is for a generic run.安装 ComfyUI 后,可以对 AI 说这些话来触发它
Help me get started with ComfyUI
Explains what ComfyUI does, walks through the setup, and runs a quick demo based on your current project
Use ComfyUI to run local ComfyUI workflows via the HTTP API
Invokes ComfyUI with the right parameters and returns the result directly in the conversation
What can I do with ComfyUI in my developer & devops workflow?
Lists the top use cases for ComfyUI, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/comfyui/ 目录(个人级,所有项目可用),或 .claude/skills/comfyui/(项目级)。重启 AI 客户端后,用 /comfyui 主动调用,或让 AI 根据上下文自动发现并使用。
ComfyUI 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
ComfyUI 可免费安装使用。请查阅仓库了解许可证信息。
Run local ComfyUI workflows via the HTTP API. Use when the user asks to run ComfyUI, execute a workflow by file path/name, or supply raw API-format JSON; supports the default workflow bundled in assets.
ComfyUI 属于「Developer & DevOps」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my developer & devops tasks using ComfyUI
Identifies repetitive steps in your workflow and sets up ComfyUI to handle them automatically