← Back to Skills Marketplace
y93442100-beep

openclaw-comfyui-imagegenerate

by yun-openclaw · GitHub ↗ · v1.0.0
cross-platform ✓ Security Clean
1581
Downloads
1
Stars
9
Active Installs
1
Versions
Install in OpenClaw
/install openclaw-comfyui-imagegenerate
Description
通过本地 ComfyUI 生成图片并发送到指定飞书会话,成功发送后无回复文字,保持界面简洁。
README (SKILL.md)

name: comfyui-feishu-draw description: 调用本地 ComfyUI 生成图片并直接发送到飞书当前会话。任务完成后直接结束,严禁返回任何总结或确认文字。 核心任务:生成图片并发送飞书 🚀 技能实现 Python

import subprocess import os from openclaw.tools import message

def on_call_skill(prompt, context): """ 核心逻辑:生成图片 -> 获取路径 -> 发送飞书 -> 静默退出 """ # 1. 运行本地绘制脚本获取图片路径 skill_dir = "/home/coder/.openclaw/workspace/skills/comfyui-img-gen"

try:
    # 运行 draw.py,stdout 仅返回生成的绝对路径
    result = subprocess.run(
        ["python3", "draw.py", prompt],
        cwd=skill_dir,
        capture_output=True,
        text=True,
        timeout=60
    )
    
    image_path = result.stdout.strip()
    
    if result.returncode != 0 or not os.path.exists(image_path):
        return f"❌ 图片生成失败: {result.stderr}"

    # 2. 识别飞书发送目标(群聊或私聊)
    target = None
    if context.get('feishu_chat_id'):
        target = f"chat:{context['feishu_chat_id']}"
    elif context.get('feishu_user_id'):
        target = f"user:{context['feishu_user_id']}"
    
    if not target:
        return "❌ 未检测到有效的飞书会话上下文"

    # 3. 调用 OpenClaw 内置工具发送消息
    message.send(
        channel="feishu",
        target=target,
        message=f"🎨 已为您生成图片:{prompt}",
        path=image_path
    )
    
    # 4. 关键:成功发送后返回 NO_REPLY 避免额外文字
    # OpenClaw 会将 NO_REPLY 视为静默指令,不发送任何回复
    return "NO_REPLY"

except Exception as e:
    return f"❌ 任务执行异常: {str(e)}"

⚙️ 核心依赖 本地服务: ComfyUI (127.0.0.1:8188) 处于启动状态。

本地文件: draw.py 和 zimage-api.json 需在 skill_dir 指定目录中。

飞书权限: 机器人需具备 im:message:send_as_bot 权限。

📝 静默返回说明 当技能成功发送图片到飞书后,返回 "NO_REPLY" 字符串。 OpenClaw 会将其识别为静默指令,不会在聊天界面显示任何回复文字。 这样用户只会在飞书中收到图片,而不会在技能调用界面看到额外的成功提示。

Usage Guidance
This skill appears coherent for its purpose, but consider these operational points before installing: (1) It expects a local ComfyUI service at 127.0.0.1:8188 and the websocket client library to be present; if those are not available the skill will fail. (2) Generated images are written to the skill directory (output_images) — ensure you are comfortable with local storage of generated content. (3) The prompt text is sent to Feishu along with the image; avoid sending sensitive prompts you don't want delivered to that chat. (4) The skill hardcodes a working directory in the example SKILL.md — verify the actual runtime path used by your OpenClaw deployment so draw.py and zimage-api.json are reachable. If you need more assurance, request the developer to include an explicit install spec (or dependency list) and to remove or parameterize the hardcoded path.
Capability Analysis
Type: OpenClaw Skill Name: openclaw-comfyui-imagegenerate Version: 1.0.0 The skill bundle is designed to generate images using a local ComfyUI instance and send them to a Feishu (Lark) chat. The core logic in `skill.md` and `draw.py` uses standard Python libraries (subprocess, urllib, websocket) to interact with the local API and the OpenClaw message tool. While the instructions in `skill.md` explicitly direct the AI agent to remain silent ('NO_REPLY') after execution to avoid redundant UI notifications, this behavior is documented and aligns with the stated UX purpose rather than indicating stealthy or malicious intent.
Capability Assessment
Purpose & Capability
Name/description claim: generate via local ComfyUI and send to Feishu silently. The runtime code (on_call_skill + draw.py) only invokes a local draw.py, interacts with ComfyUI on 127.0.0.1:8188, and uses OpenClaw's message.send to deliver the image to Feishu — these match the declared purpose. No unrelated credentials or remote services are requested.
Instruction Scope
SKILL.md instructs running draw.py, capturing a single stdout path, and sending that file to the Feishu target from context. draw.py only reads zimage-api.json, talks to localhost ComfyUI HTTP/WebSocket endpoints, saves an image under its output_images folder, and prints the image path — all within the scope of image generation and delivery. Note: success is intentionally silent (returns "NO_REPLY"); error paths return human-readable errors.
Install Mechanism
No install spec (instruction-only) and no external download steps. draw.py relies on standard urllib and a websocket client library; the absence of an install step means those dependencies must already exist in the environment, but there is no high-risk installer or remote code download.
Credentials
Skill declares no required env vars or credentials. It expects platform-provided Feishu context (feishu_chat_id / feishu_user_id) and that the OpenClaw environment has the Feishu bot permissions to send messages. The only network access is to localhost (ComfyUI). There are no unrelated secrets requested.
Persistence & Privilege
always:false (no forced persistence). The skill writes generated images to its own output_images directory (local, expected). It does not modify other skills or global agent configuration.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install openclaw-comfyui-imagegenerate
  3. After installation, invoke the skill by name or use /openclaw-comfyui-imagegenerate
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
openclaw-comfyui-imagegenerate 1.0.0 - 初始版本发布:支持通过 ComfyUI 本地服务生成图片,并自动发送到指定飞书会话。 - 流程:图片生成→ 飞书发送→ 成功静默,无任何文本反馈。 - 自动识别飞书聊天或用户目标,发送图片及原始提示词说明。 - 错误及异常情况有明确的中文反馈。 - 依赖本地 ComfyUI 服务和 draw.py 实现图片生成,要求机器人具备消息发送权限。
Metadata
Slug openclaw-comfyui-imagegenerate
Version 1.0.0
License
All-time Installs 11
Active Installs 9
Total Versions 1
Frequently Asked Questions

What is openclaw-comfyui-imagegenerate?

通过本地 ComfyUI 生成图片并发送到指定飞书会话,成功发送后无回复文字,保持界面简洁。 It is an AI Agent Skill for Claude Code / OpenClaw, with 1581 downloads so far.

How do I install openclaw-comfyui-imagegenerate?

Run "/install openclaw-comfyui-imagegenerate" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is openclaw-comfyui-imagegenerate free?

Yes, openclaw-comfyui-imagegenerate is completely free (open-source). You can download, install and use it at no cost.

Which platforms does openclaw-comfyui-imagegenerate support?

openclaw-comfyui-imagegenerate is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created openclaw-comfyui-imagegenerate?

It is built and maintained by yun-openclaw (@y93442100-beep); the current version is v1.0.0.

💬 Comments