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…
от lxyeternal★ 68 звёзд на GitHub
Установить ComfyUI в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
ComfyUI Runner
Overview
Run ComfyUI workflows on the local server (default 127.0.0.1:8188) using API-format JSON and return output images.
Editing the workflow before running
The run script only takes --workflow <path>. 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):
- Read the workflow JSON (default:
skills/comfyui/assets/default-workflow.json, or the path/file the user gave). - Identify prompt-related nodes by inspecting the graph: look for nodes that hold the main text prompt — e.g.
PrimitiveStringMultiline,CLIPTextEncode(positive text), or any node with_meta.titleorclass_typesuggesting "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. - Optionally identify style/prefix nodes — e.g.
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. - Optionally set a new seed — find sampler-like nodes (e.g.
KSampler,BasicGuider, or any node with aseedinput) and setseedto a new random integer so each run can differ. - Write the modified workflow to a temp file (e.g.
skills/comfyui/assets/tmp-workflow.json). Use~/ComfyUI/venv/bin/pythonfor any inline Python; do not use barepython. - Run:
comfyui_run.py --workflow <path-to-edited-json>.
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.
Run script (single responsibility)
~/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 server isn’t reachable
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?
If not installed: Install ComfyUI (e.g. clone the repo, create a venv, install dependencies, then start the server). Example:
git clone https://github.com/comfyanonymous/ComfyUI.git ~/ComfyUI cd ~/ComfyUI python3 -m venv venv ~/ComfyUI/venv/bin/pip install -r requirements.txtThen start the server (see below). Tell the user they may need to install model weights into
~/ComfyUI/models/depending on the workflow.If installed but not running: Start the ComfyUI server so the API is available on port 8188. Example:
~/ComfyUI/venv/bin/python ~/ComfyUI/main.py --listen 127.0.0.1Run 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.
Model weights from URLs
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.
- Normalize the list — one URL per line; strip empty lines and comments (lines starting with
#). - Run the download script with the ComfyUI base path (default
~/ComfyUI). The script uses pget for parallel downloads when available; ifpgetis not in PATH, it installs it to~/.local/binautomatically (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:
Pass URLs as arguments, or pipe a file/list on stdin:~/ComfyUI/venv/bin/python skills/comfyui/scripts/download_weights.py --base ~/ComfyUI
Or save the user’s list to a temp file and run:echo "https://example.com/model.safetensors" | ~/ComfyUI/venv/bin/python skills/comfyui/scripts/download_weights.py --base ~/ComfyUI
To force the built-in download (no pget): add~/ComfyUI/venv/bin/python skills/comfyui/scripts/download_weights.py --base ~/ComfyUI < /tmp/weight_urls.txt--no-pget. - Subfolder: The script infers the ComfyUI models subfolder from the URL/filename (e.g.
vae,clip,loras,checkpoints,text_encoders,controlnet,upscale_models). The user can optionally specify a subfolder per line as `url sub
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- CONTRIBUTING.md
- README.md
- _meta.json
- assets/default-workflow.json
- assets/tmp-workflow.json
- scripts/comfyui_run.py
- scripts/download_weights.py
FAQ
Что делает скилл 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?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл ComfyUI запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…