← 返回 Skills 市场
salmonrk

OpenClaw ComfyUI

作者 SalmonRK · GitHub ↗ · v1.0.4
cross-platform ✓ 安全检测通过
2452
总下载
11
收藏
17
当前安装
3
版本数
在 OpenClaw 中安装
/install openclaw-comfyui
功能描述
Connect and control ComfyUI API efficiently using template mapping and auto-asset management for image generation and editing tasks.
使用说明 (SKILL.md)

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 in TOOLS.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:
    1. 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.
  • 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) 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 in skills/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 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.
安全使用建议
This skill appears to do what it claims, but check these before installing: 1) Verify the TOOLS.md host/port entry points to a trusted ComfyUI server (the script will upload local files to that host — if TOOLS.md points to an untrusted remote, sensitive files could be transmitted). 2) Only pass input files you intend to upload; the script will POST them to the configured host. 3) Inspect workflows/ for any embedded prompts (the included JSONs contain explicit sexual content and may violate usage policies). 4) Run the skill in a constrained environment (local or isolated VM/container) if you are unsure about the target ComfyUI host. 5) Ensure Python dependencies (requests) are installed from trusted sources. If you want additional assurance, review or run the Python script locally with a deliberately misconfigured or local-only TOOLS.md to observe behavior before enabling agent-autonomous calls.
功能分析
Package: comfyui-skill (xpi) Version: 1.0.4 Description: Professional ComfyUI control skill for OpenClaw with token-saving architecture, auto-asset management (Image/Video/Audio), and dynamic security validation. The `comfyui-skill` package provides a Python client (`comfy_client.py`) to interact with a ComfyUI instance via its API. It supports dynamic workflow execution, including text-to-image and image-to-image tasks, with features like automatic asset upload and result downloading. The script reads ComfyUI host and port from `TOOLS.md`, ensuring user-controlled configuration. It implements a whitelist for file extensions (`.jpg`, `.png`, `.mp4`, etc.) during uploads, preventing arbitrary file execution or sensitive data exfiltration through the ComfyUI server. Generated output files are saved to a dedicated `outputs/comfy/` directory within the workspace. The script dynamically modifies ComfyUI workflow JSONs (located in `workflows/`) to inject prompts, input image filenames, and desired resolutions, which is standard behavior for ComfyUI automation. All network communication is directed solely to the user-configured ComfyUI endpoint. There is no evidence of arbitrary code execution, unauthorized network activity, or malicious file system manipulation. The package adheres to expected functionality for an agent skill interacting with a local or user-specified ComfyUI instance.
能力评估
Purpose & Capability
Name/description claim: connect to and control ComfyUI for image generation/editing. The repository contains workflow JSONs and a Python client that reads a ComfyUI host from workspace TOOLS.md and performs uploads, prompts, polling, and downloads — exactly what is needed to implement the described capability.
Instruction Scope
SKILL.md instructs the agent to run the bundled comfy_client.py with a template_id and prompt. The script reads workspace TOOLS.md for Host/Port, substitutes prompts into local workflow JSONs, uploads any provided local input files to the configured ComfyUI host, polls for results, and downloads generated files to outputs/comfy/. These actions are within scope for controlling a ComfyUI instance, but be aware the script will upload any input file you pass (allowed extensions include images, video, audio). Also the included workflow JSONs embed explicit/sexual prompt text — review content policy implications before use.
Install Mechanism
Instruction-only skill with a visible Python script. No install spec or remote download/exec behavior is present. The only runtime dependency is the requests Python package (mentioned in README), which is reasonable for the task.
Credentials
The skill requests no environment variables or credentials. It reads a local TOOLS.md file to get the ComfyUI host/port; this is reasonable for a tool intended to contact a ComfyUI server. There are no unrelated credentials or config paths requested.
Persistence & Privilege
always:false and user-invocable:true. The skill does not alter other skills or system-wide configs. It runs only when invoked and only touches its own workflows and outputs directory.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install openclaw-comfyui
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /openclaw-comfyui 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.4
openclaw-comfyui 1.0.4 - manifest.json updated for new release version. - Minor internal updates in comfy_client.py; documentation, structure, and references kept consistent. - No changes to workflows or CLI usage.
v1.0.3
openclaw-comfyui 1.0.3 Changelog - Rewrote SKILL.md in English for wider accessibility and professional clarity. - Added detailed explanations for parameters, workflows, and CLI usage. - Clarified procedures for adding new workflows. - Explained token-saving and efficiency strategies, emphasizing template mapping and direct file handling. - Updated terminology for better alignment with OpenClaw ecosystem.
v1.0.2
- เพิ่ม SKILL.md พร้อมวิธีใช้งานและโครงสร้าง Skill สำหรับเชื่อมต่อ ComfyUI API - รองรับระบบ Template Mapping และ Auto-Asset Management เพื่อประหยัด Token - อธิบายการใช้งาน CLI และ parameter orientation (portrait/landscape) - เพิ่มคำแนะนำในการเพิ่ม Workflow ใหม่และวิธีอัปเดต WORKFLOW_MAP - เน้นกลยุทธ์ลดการใช้ Token โดยไม่แปะ JSON ใน prompt และใช้ path-based messaging
元数据
Slug openclaw-comfyui
版本 1.0.4
许可证
累计安装 19
当前安装数 17
历史版本数 3
常见问题

OpenClaw ComfyUI 是什么?

Connect and control ComfyUI API efficiently using template mapping and auto-asset management for image generation and editing tasks. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 2452 次。

如何安装 OpenClaw ComfyUI?

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

OpenClaw ComfyUI 是免费的吗?

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

OpenClaw ComfyUI 支持哪些平台?

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

谁开发了 OpenClaw ComfyUI?

由 SalmonRK(@salmonrk)开发并维护,当前版本 v1.0.4。

💬 留言讨论