← 返回 Skills 市场
noah-1106

图像生成 / Image Generation

作者 noah · GitHub ↗ · v1.1.4 · MIT-0
cross-platform ⚠ suspicious
379
总下载
0
收藏
7
当前安装
4
版本数
在 OpenClaw 中安装
/install image-gen-coze
功能描述
Image Generation via Coze | 基于 Coze 的图像生成技能 Generate images using Coze workflows. 使用 Seedream 4.5 model. Handles parameter building and result parsing. 负责参数构...
使用说明 (SKILL.md)

Image Gen Coze | 图像生成技能

基于 Coze 工作流的图像生成技能。使用 Seedream 4.5 模型。依赖: coze-workflow 技能(基础层)。

Image generation skill based on Coze workflow. Uses Seedream 4.5 model. Requires: coze-workflow skill (base layer).


依赖关系 / Dependencies

必需 / Required

  • coze-workflow v1.1.1+ - Coze 工作流执行的基础技能 / Base skill for Coze workflow execution

架构 / Architecture

  • coze-workflow(基础层 / base)→ image-gen-coze(业务层 / business layer)

功能特性 / Features

特性 / Feature 说明 / Description
模型 / Model Seedream 4.5
输入 / Input 单一 Prompt / Single prompt
输出 / Output 图片 URL / Image URL
限制 / Limit 30秒/次 / 30 seconds per request

配置 / Configuration

~/.openclaw/skills/image_gen_coze/config.json

{
  "workflow_id": "7613773741864550434"
}

依赖技能配置 / Dependency config:~/.openclaw/skills/coze_workflow/config.json


使用方式 / Usage

输入 / Input

{
  "prompt": "一只可爱的橘猫在窗台上晒太阳,温暖的光线,写实摄影风格 --ar 1:1"
}

完整调用流程 / Full Workflow

#!/bin/bash

# 1. 读取配置 / Read config
WORKFLOW_ID=$(jq -r '.workflow_id' ~/.openclaw/skills/image_gen_coze/config.json)
COZE_CONFIG=~/.openclaw/skills/coze_workflow/config.json
API_KEY=$(jq -r '.api_key' "$COZE_CONFIG")
BASE_URL=$(jq -r '.base_url // "https://api.coze.cn"' "$COZE_CONFIG")

# 2. 构建 prompt / Build prompt
PROMPT="一只可爱的橘猫在窗台上晒太阳,温暖的光线,写实摄影风格 --ar 1:1"

# 3. 调用 coze_workflow 执行 / Execute
result=$(curl -s -X POST "${BASE_URL}/v1/workflow/stream_run" \
  -H "Authorization: Bearer ${API_KEY}" \
  -H "Content-Type: application/json" \
  -d "{
    \"workflow_id\": \"${WORKFLOW_ID}\",
    \"parameters\": {
      \"prompt\": \"${PROMPT}\"
    }
  }" | grep -E "^event: Message$" -A1 | tail -1)

# 4. 解析结果 / Parse result
data=$(echo "$result" | sed 's/^data: //')
content=$(echo "$data" | jq -r '.content')
image_url=$(echo "$content" | jq -r '.output // empty')

# 5. 下载并保存 / Download and save
if [ -n "$image_url" ]; then
  SAVE_DIR="./generated_images"
  mkdir -p "$SAVE_DIR"
  
  TIMESTAMP=$(date +%Y%m%d_%H%M%S)
  PREFIX=$(echo "$PROMPT" | sed 's/[^a-zA-Z0-9\u4e00-\u9fa5]//g' | cut -c1-10)
  FILENAME="${TIMESTAMP}_${PREFIX}.png"
  FILEPATH="${SAVE_DIR}/${FILENAME}"
  
  curl -s -L "$image_url" -o "$FILEPATH"
fi

文件保存约定 / File Save Convention

保存路径 / Save Path

./generated_images/

实际路径示例 / Example paths:

  • Agent A: ~/.openclaw/workspace-agentA/generated_images/
  • Agent B: ~/.openclaw/workspace-agentB/generated_images/

命名规则 / Naming Rule

{时间戳 / Timestamp}_{prompt前缀 / Prefix}.png

示例 / Example:
20260305_233045_一只可爱的橘猫.png
参数 / Parameter 说明 / Description 示例 / Example
TIMESTAMP 生成时间 / Generation time 20260305_233045
PREFIX Prompt 前10字符 / First 10 chars 一只可爱的橘猫

提示词写法 / Prompt Writing

尺寸 / Aspect Ratio

在 prompt 末尾添加 --ar 比例

标签 / Tag 尺寸 / Size
--ar 1:1 1024×1024
--ar 16:9 1024×576
--ar 9:16 576×1024

风格关键词 / Style Keywords

  • 写实摄影风格 - 照片级真实 / Photorealistic
  • 动漫风格 - 日式动漫 / Anime style
  • 3D渲染 - 三维立体 / 3D render
  • 赛博朋克 - 科幻霓虹 / Cyberpunk

速率限制 / Rate Limit

30秒/次 - 建议实现调用间隔检查 / Implement call interval checking.


版本历史 / Changelog

  • v1.1.3: 添加中英文对照 / Add bilingual support
  • v1.1.1: 明确职责,负责参数构建和结果解析 / Clarify responsibilities
  • v1.1.0: Seedream 4.5 模型 / Seedream 4.5 model
  • v1.0.0: 初始版本 / Initial version
安全使用建议
This skill generally does what it claims (call Coze workflows and save generated images), but before installing: 1) Confirm you have and trust the declared dependency 'coze-workflow' (inspect its code/config). 2) Be aware the skill will read ~/.openclaw/skills/coze_workflow/config.json to obtain an API key and base_url — the skill metadata does not list this credential, so ensure the stored key is intended to be used. 3) Verify the Coze API base URL (defaults to https://api.coze.cn) to avoid accidental calls to unexpected endpoints. 4) Note files will be saved under generated_images in the agent workspace; if that is undesirable, prepare a sandbox or cleanup policy. 5) The package metadata includes inconsistent version info and a placeholder workflow_id in config.json — resolve these before use. If you want higher assurance, inspect the coze_workflow skill and its config.json contents or restrict network/access while testing.
功能分析
Type: OpenClaw Skill Name: image-gen-coze Version: 1.1.4 The skill provides a workflow for image generation via the Coze API (api.coze.cn) but contains a vulnerability in its execution logic. The bash script template in SKILL.md constructs a JSON payload for a curl command by directly interpolating the 'prompt' variable without sanitization, which could lead to JSON injection if the agent uses this logic to process untrusted user input. Additionally, the skill requires access to sensitive API keys stored in the configuration of a dependency skill (coze_workflow).
能力评估
Purpose & Capability
The name/description (Coze image generation using Seedream 4.5) matches the instructions which call Coze workflow endpoints. The skill correctly declares a dependency on coze-workflow. Minor inconsistencies: registry metadata lists v1.1.4 while the included _meta.json and SKILL.md show v1.1.3, and config.json contains a placeholder for workflow_id rather than a concrete value.
Instruction Scope
SKILL.md instructs the agent to read ~/.openclaw/skills/image_gen_coze/config.json and ~/.openclaw/skills/coze_workflow/config.json (to extract an API key and base_url), POST to the Coze API, parse streaming events, download image URLs, and save images to a ./generated_images directory. Reading the dependency's config (API key) and writing files to disk are in-scope for an image generation skill, but the skill metadata declared no required config paths or credentials — that's a mismatch and should be explicit. The instructions also perform network calls to the Coze API using the credential found in the dependency config.
Install Mechanism
Instruction-only skill with no install spec and no code files. This is the lowest install risk (nothing is downloaded or executed by an installer).
Credentials
Metadata declares no required environment variables or credentials, but the runtime instructions explicitly read an API key from the coze_workflow config file (~/.openclaw/skills/coze_workflow/config.json). That implicit requirement (access to the dependency's API key) should be declared. The skill will make outbound requests using that key — verify you trust the coze_workflow skill and the key stored there.
Persistence & Privilege
always is false and the skill does not request elevated privileges. It writes generated images to a workspace-local ./generated_images directory (normal for this function) and does not modify other skills or system-wide settings.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install image-gen-coze
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /image-gen-coze 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.1.4
Add bilingual documentation support
v1.1.3
Added dependency documentation | 添加依赖关系说明
v1.1.2
Bilingual description: English + 中文
v1.1.1
基于Coze的图像生成技能,使用Seedream 4.5模型,支持自动下载保存图片
元数据
Slug image-gen-coze
版本 1.1.4
许可证 MIT-0
累计安装 7
当前安装数 7
历史版本数 4
常见问题

图像生成 / Image Generation 是什么?

Image Generation via Coze | 基于 Coze 的图像生成技能 Generate images using Coze workflows. 使用 Seedream 4.5 model. Handles parameter building and result parsing. 负责参数构... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 379 次。

如何安装 图像生成 / Image Generation?

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

图像生成 / Image Generation 是免费的吗?

是的,图像生成 / Image Generation 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

图像生成 / Image Generation 支持哪些平台?

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

谁开发了 图像生成 / Image Generation?

由 noah(@noah-1106)开发并维护,当前版本 v1.1.4。

💬 留言讨论