← 返回 Skills 市场
yiqiliu2

Comfyui Workflow

作者 Yiqi Liu · GitHub ↗ · v1.1.0
cross-platform ⚠ suspicious
640
总下载
2
收藏
0
当前安装
4
版本数
在 OpenClaw 中安装
/install comfyui-workflow
功能描述
Universal ComfyUI workflow executor with 33+ workflow templates. Self-describing — use --inspect on ANY workflow to discover inputs and outputs automatically...
使用说明 (SKILL.md)

ComfyUI Workflows — Agent Usage Guide

⚠️ READ-ONLY WARNING: The scripts in this skill (comfy_run.py, comfy_api.py) are production-validated and must not be modified. They handle 33+ workflow JSONs with complex LiteGraph→API conversion, subgraph expansion, bypass resolution, and multi-format output downloading. Any modification risks breaking all workflows. Only read and use the scripts — never edit them.


Requirements

Before using this skill, ensure your environment meets these requirements:

Requirement Details
Python 3.10 or higher
pip packages websocket-client, requests
ComfyUI server Must be running before executing workflows
Token Required if ComfyUI has authentication enabled

Install Python dependencies:

pip install websocket-client requests

Configuration Options

Variable Description Default
COMFY_HOST ComfyUI server address 127.0.0.1:8188
COMFY_WORKFLOW_DIRS Additional workflow directories (none)

Credentials

Credential Required Source
ComfyUI Token Only if auth enabled ComfyUI settings page

Personal Configuration Required

Before using this skill, ensure these items are configured for your environment:

Item Description Where to Configure
comfy_host Your ComfyUI server address scripts/config.json or COMFY_HOST env
ComfyUI server Must be running before executing workflows Start manually
Model paths Your local model directories MODELS_INVENTORY.md (for reference)
Token ComfyUI authentication token Get from ComfyUI settings
Workflow files Your own workflow JSON files workflows/ directory (see note below)

Quick Setup

1. Start ComfyUI

Start your ComfyUI server manually before executing any workflows. The skill expects ComfyUI to be running at the configured host.

2. Configure Connection

Create scripts/config.json:

{
  "comfy_host": "127.0.0.1:8188",
  "workflow_dirs": []
}

Or set environment variables:

export COMFY_HOST="127.0.0.1:8188"

3. Install Dependencies

pip install websocket-client requests

4. Add Your Workflows

Place workflow JSON files in workflows/ directory, organized by category:

workflows/
├── Image-Text/
│   ├── workflow1.json
│   └── workflow2.json
├── Image-Edit/
│   └── ...
└── Video/
    └── ...

Shell Variables (use in all commands)

VENV=python3  # or path to your venv
SCRIPT=/path/to/comfyui-workflow-skill/scripts/comfy_run.py

End-to-End Workflow (Steps 0–5)

Step 0 — Ensure ComfyUI Is Running

Start ComfyUI manually. Verify it's accessible at http://127.0.0.1:8188.

Step 1 — List Available Workflows

$VENV $SCRIPT --list

Step 2 — Inspect the Workflow

$VENV $SCRIPT -w "workflow_name" --inspect

Step 3 — Prepare Inputs

--prompt "your prompt"           # Text prompts
--image /path/to/image.jpg       # Image inputs
--audio /path/to/audio.wav       # Audio inputs
--video /path/to/video.mp4       # Video inputs
--width 1024 --height 1024       # Resolution
--steps 50 --cfg 4.0 --seed 42   # Sampler settings
--override '{"node_id": {"key": value}}'  # Advanced overrides

Step 4 — Execute

$VENV $SCRIPT -w "workflow_name" --prompt "..." -o /tmp

Step 5 — Collect Outputs

Outputs are saved to the -o directory with auto-generated prefixes.


CLI Reference

Usage: comfy_run.py [-w WORKFLOW] [options]

Modes:
  --list              List all available workflows
  --inspect           Human-readable input/output inspection
  --inspect-json      Machine-readable JSON inspection
  --dry-run           Print API JSON without executing
  --queue             Submit to queue and return immediately
  --status [IDs...]   Check queue state

Input customization:
  --prompt, -p TEXT        Positive prompt
  --negative, -n TEXT      Negative prompt
  --image, -i PATH [...]   Input image(s)
  --audio, -a PATH [...]   Input audio file(s)
  --video, -v PATH [...]   Input video file(s)

Generation settings:
  --width, -W INT          Output width
  --height, -H INT         Output height
  --steps INT              Sampling steps
  --cfg FLOAT              CFG scale
  --seed INT               Random seed

Advanced:
  --override JSON          Node input overrides
  --config PATH            YAML/JSON config file
  --server HOST:PORT       ComfyUI server
  --output-dir, -o PATH    Output directory
  --output-prefix TEXT     Output filename prefix
  --no-ensure              Skip auto-starting ComfyUI
  --no-validate            Skip input validation

Troubleshooting

Problem Fix
Workflow not found Use --list to see available workflows
NO OUTPUTS generated Run --inspect to check required inputs
Cannot reach ComfyUI Ensure ComfyUI is running at configured host
Image file not found Use absolute paths, verify with ls -la
GPU out of memory Reduce resolution or steps

Knowledge Cache Pattern

MODELS_INVENTORY.md and WORKFLOWS_SUMMARY.md serve as the agent's persistent knowledge base for the user's actual ComfyUI setup. Use them to cache learned information across sessions:

⚠️ DO NOT REFERENCE THE EXAMPLE CONTENT: The default content in these files describes sanitized example workflows that will NOT work. Agents MUST update them with the user's actual data before relying on them. Using outdated example data will cause workflow failures.

Initial Setup (First Time)

When the user first provides their own workflow files:

  1. Clean the example content — Remove the sanitized example entries from both files
  2. Populate with user's data — Run --inspect on each workflow, document findings in WORKFLOWS_SUMMARY.md
  3. Inventory models — Scan user's model directories, update MODELS_INVENTORY.md with their actual models

Ongoing Maintenance

  • After using a new workflow → Add its documentation to WORKFLOWS_SUMMARY.md
  • After downloading models → Update MODELS_INVENTORY.md status
  • When learning model-specific quirks → Document tips/tricks in the relevant section

Session Workflow

1. Read MODELS_INVENTORY.md → know available models
2. Read WORKFLOWS_SUMMARY.md → know workflow capabilities
3. Select appropriate workflow without re-inspecting
4. If new workflow discovered → document it for future sessions

This pattern lets the agent skip repeated discovery and work efficiently with cached knowledge.


Reference Documents

Document Purpose
MODELS_INVENTORY.md Knowledge cache — user's installed models, status, paths
WORKFLOWS_SUMMARY.md Knowledge cache — workflow capabilities, settings, tips
references/prompting-guide.md Prompt anatomy, model-specific strategies
references/maintenance.md Code structure, debugging
references/architecture.md Design principles
安全使用建议
This skill appears to be what it says: a local ComfyUI workflow executor. Before installing or running it: 1) Ensure COMFY_HOST points to a ComfyUI server you control or trust (the skill will connect to whatever host you configure). 2) Only provide a ComfyUI token if the server requires authentication; tokens are scoped to that server — do not reuse unrelated secrets. 3) Inspect the included scripts (scripts/comfy_run.py and scripts/comfy_api.py) yourself — they are present in the bundle and implement the network calls; confirm there are no unexpected external hosts in their code. 4) Use --dry-run or --inspect first (as the README suggests) to preview the API payload before executing. 5) Be aware the skill writes/updates MODELS_INVENTORY.md and WORKFLOWS_SUMMARY.md as a local knowledge cache — if you don't want persistent changes, run in a disposable/sandbox directory or back up those files first. 6) If you want extra caution, run the skill in an isolated environment (container or VM) so GPU/model loading and file writes are contained.
功能分析
Type: OpenClaw Skill Name: comfyui-workflow Version: 1.1.0 The skill is classified as suspicious due to its use of `subprocess.run` to execute shell scripts (`comfy_control.sh`) for managing the ComfyUI server, which includes potentially broad commands like `pkill` and `powershell.exe` for process control and system monitoring. Additionally, the `--override` argument in `comfy_run.py` allows arbitrary JSON input to modify any node's parameters within a ComfyUI workflow, creating a significant vulnerability surface for prompt injection or exploitation of underlying ComfyUI custom node vulnerabilities. While these capabilities are intended for legitimate workflow automation and diagnostics, they represent high-risk behaviors that could be misused.
能力评估
Purpose & Capability
The name/description claim a universal ComfyUI workflow executor; the repo contains a CLI wrapper (comfy_run.py), an API/WebSocket client (comfy_api.py), and many workflow JSONs. Declared requirements (Python 3.10+, websocket-client, requests, a running ComfyUI server, optional token) match the stated purpose and nothing extraneous (no cloud credentials, unrelated binaries, or unusual config paths) is requested.
Instruction Scope
SKILL.md confines runtime activity to converting workflow JSON → ComfyUI API payloads, uploading local input files, monitoring execution over a WebSocket to the COMFY_HOST, and downloading outputs to a local output directory. It instructs agents to update local caches (MODELS_INVENTORY.md, WORKFLOWS_SUMMARY.md) with the user's environment — this is expected for a local executor but is persistent file writing and should be noted. There are no instructions to contact external endpoints beyond the configured ComfyUI host.
Install Mechanism
There is no install spec; this is instruction+script based. Dependencies are standard Python packages (websocket-client, requests) recommended by SKILL.md. No archive downloads or external install URLs are used by the skill files provided.
Credentials
The skill requests no required environment variables or credentials by default. COMFY_HOST and a ComfyUI Token are optional and clearly documented; those are proportionate for connecting to an authenticated ComfyUI server. No unrelated secrets or multiple external-service tokens are asked for.
Persistence & Privilege
always:false (normal). The SKILL.md explicitly encourages updating MODELS_INVENTORY.md and WORKFLOWS_SUMMARY.md as a local knowledge cache — this creates persistent files under the skill directory. That persistence is expected for this use case but users should be aware the agent is instructed to write/update local files.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install comfyui-workflow
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /comfyui-workflow 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.1.0
Version 1.1.0 — Manual ComfyUI Server Management - Removed all ComfyUI server start/stop/ensure scripts; users must now start ComfyUI manually before use. - Updated documentation to eliminate references to `comfy_control.sh` and server management via shell scripts. - Revised setup steps: now clearly instruct users to manually launch and verify the ComfyUI server prior to running workflows. - Simplified configuration section; removed variables and examples related to server process control. - Clarified CLI usage and troubleshooting to reflect the new requirement of a running ComfyUI instance.
v1.0.2
**Version 1.0.2 Changelog** - Added explicit "Requirements" section with supported Python version and required pip packages. - Documented advanced configuration variables (`COMFY_HOST`, `COMFY_START_CMD`, `COMFY_STOP_CMD`, `COMFY_WORKFLOW_DIRS`). - Clarified ComfyUI token usage for authentication-protected servers. - Added "Security Considerations" warning about `eval` use in `comfy_control.sh`, including best practices. - Improved organization and readability of installation and configuration instructions.
v1.0.1
comfyui-workflow 1.0.1 - Documentation update: Clarified and added new generation policies and guidelines in GENERATION_RULES.md. - No functional or code changes to the workflow executor scripts.
v1.0.0
- Initial release of comfyui-workflow. - Universal ComfyUI workflow executor supporting 33+ workflow templates. - Automatic input/output discovery for any workflow using --inspect. - Compatible with local ComfyUI, Windows Portable (via WSL), and remote servers. - Includes agent guide for setup, execution, session caching, and troubleshooting. - Provides persistent knowledge caching via MODELS_INVENTORY.md and WORKFLOWS_SUMMARY.md.
元数据
Slug comfyui-workflow
版本 1.1.0
许可证
累计安装 0
当前安装数 0
历史版本数 4
常见问题

Comfyui Workflow 是什么?

Universal ComfyUI workflow executor with 33+ workflow templates. Self-describing — use --inspect on ANY workflow to discover inputs and outputs automatically... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 640 次。

如何安装 Comfyui Workflow?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install comfyui-workflow」即可一键安装,无需额外配置。

Comfyui Workflow 是免费的吗?

是的,Comfyui Workflow 完全免费(开源免费),可自由下载、安装和使用。

Comfyui Workflow 支持哪些平台?

Comfyui Workflow 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Comfyui Workflow?

由 Yiqi Liu(@yiqiliu2)开发并维护,当前版本 v1.1.0。

💬 留言讨论