← 返回 Skills 市场
gushenjie

AIGC Generator

作者 kinggu · GitHub ↗ · v1.1.0 · MIT-0
cross-platform ⚠ suspicious
75
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install aigc-gen
功能描述
AIGC 内容生成助手,支持图片生成(文生图)。当用户想要生成图片、AI 绘画、创作内容时自动触发。支持负面提示词、图片比例、批量生成等参数。
使用说明 (SKILL.md)

AIGC Generator

文生图生成技能。

触发场景

当用户要求生成图片时自动触发,例如:

  • "生成一张图片..."
  • "画一张..."
  • "帮我生成..."
  • "创作图片"
  • "AI 绘画"

响应流程

第一步:立刻回复用户(毫秒级)

收到请求后必须立刻回复,不等图片生成完成。

回复示例(随机选一种):

  • "收到!我来帮你生成【xxx】,稍等片刻,马上就好~ 🎨"
  • "好嘞!开始创作【xxx】,请耐心等待,完成后第一时间发给你 ✨"

第二步:启动独立 session 执行生成

使用 sessions_spawn 启动 isolated session

runtime: "isolated"
sessionTarget: "isolated"
payload.kind: "agentTurn"
message: 请帮我生成图片并发送到飞书...

子 session 执行内容

  1. 构造并运行 generate.py 命令(使用 exec,同步等待,超时 300 秒):

    python3 C:/Users/79112/.openclaw/workspace/skills/aigc-gen/scripts/generate.py "用户原始 prompt" --ratio 比例数字 --batch 数量
    

    如果用户指定了比例(如"帮我生成16:9的图片"),从对话中提取正确的数字:

    • 1=1:1, 2=3:4, 3=4:3, 4=9:16, 5=16:9
  2. 等待命令完成,在输出中查找 __RESULT_JSON__{...}__,解析 JSON 获取 local_paths(本地图片路径列表)。

  3. 发送图片到飞书:对每个本地图片路径,调用 feishu_doc(action=upload_image, file_path=图片路径)

  4. 完成:直接结束子 session 即可(OpenClaw 会自动通知主 session)。

配置说明

获取 API Key

  1. 访问注册页面:
    • 英文版:https://tczlld.com/aistudio/en/
    • 中文版:https://tczlld.com/aistudio/zh/
  2. 注册并登录,在后台创建 API Key(格式:accessKeyId.secret
  3. 配置环境变量 AIGC_API_KEY

环境变量

环境变量 必填 默认值 说明
AIGC_API_KEY API Key(accessKeyId.secret 格式)
AIGC_BASE_URL https://tczlld.com/aistudio/api API 前缀
AIGC_CLIENT_ID openclaw-default 客户端标识
AIGC_PROVIDER 4 Provider ID
AIGC_TIMEOUT 120 任务超时秒数

参数说明

参数 说明
--ratio 宽高比:1=1:1, 2=3:4, 3=4:3, 4=9:16, 5=16:9
--batch 生成数量(1-4)
--negative 负面提示词
--timeout 超时秒数

状态码

status 含义
0 排队中
1 生成中
2 成功
\x3C0 失败
安全使用建议
This skill appears to implement an image-generation workflow, but review these before installing: - Metadata mismatch: The registry summary claims no required environment variables, but SKILL.md and _meta.json require AIGC_API_KEY and related settings. Don't provide secrets until this is clarified. - Unknown provider domain: The default API host is https://tczlld.com/aistudio/api (and SKILL.md points users there to obtain keys). Verify the provider's legitimacy and privacy/security practices before using your API key. - Hard-coded path in instructions: The SKILL.md example runs the script using a Windows absolute path (C:/Users/79112/...). Ask the publisher to supply a portable, relative invocation (e.g., python3 ./scripts/generate.py) — the hard-coded path may fail or expose assumptions about the maintainer's environment. - Dependency handling: The script requires the 'requests' Python package but there is no install step. Ensure the runtime environment has requests installed or provide an approved install step. - Data flow: The script will send your AIGC_API_KEY to the provider and will download result image URLs and then may re-upload images to the provider's /ai/file/upload endpoint. If you have concerns about data retention or exfiltration, test in an isolated environment and review the provider's storage policy. Recommended actions: ask the publisher to (1) fix metadata to accurately list required env vars, (2) remove the absolute path and use a relative script path, (3) document provider identity and data handling, and (4) provide an install step or confirm dependencies. If you must test now, do so in a sandboxed account and avoid using high-privilege API keys.
功能分析
Type: OpenClaw Skill Name: aigc-gen Version: 1.1.0 The skill contains a significant shell injection vulnerability in SKILL.md, where the AI agent is instructed to pass the raw, unsanitized user prompt directly into a shell command to execute scripts/generate.py. While the Python script itself appears to be a legitimate AIGC API client communicating with tczlld.com, the instruction to use 'isolated' sessions with raw user input as command-line arguments allows for arbitrary command execution. No evidence of intentional malice was found, but the architectural flaw is high-risk.
能力标签
requires-sensitive-credentials
能力评估
Purpose & Capability
The code and instructions match the stated purpose (submit image-generation tasks to an AIGC service, download results, and send images to Feishu). However the registry summary at the top says 'Required env vars: none' while SKILL.md and _meta.json require AIGC API credentials and related configuration — this mismatch is unexplained and inconsistent.
Instruction Scope
SKILL.md instructs the agent to spawn an isolated session and execute the bundled Python script, parse its stdout for JSON, and call feishu_doc to upload images. That scope is consistent with the purpose, but the example command uses a hard-coded absolute Windows path (C:/Users/79112/.openclaw/...), which is environment-specific and likely to fail or behave unexpectedly. The instructions also direct sending data (images) to Feishu — expected for a chat integration but users should confirm their agent's feishu_doc behavior and permissions.
Install Mechanism
There is no install spec (instruction-only), which lowers installer risk. The script requires the Python 'requests' module (documented in README/_meta.json) but there is no explicit install step. That is plausible but means the environment must already provide the dependency; missing dependency handling is a practical concern.
Credentials
The skill requires an API key for an external AIGC service (AIGC_API_KEY) and optionally other AIGC_* variables (AIGC_BASE_URL, AIGC_CLIENT_ID, AIGC_PROVIDER, AIGC_TIMEOUT) per _meta.json and SKILL.md. Requesting an API key is proportional to the functionality. However the top-level registry metadata claiming 'none' for required env vars contradicts the embedded metadata and docs — this inconsistency is suspicious. Also the code communicates with an unfamiliar domain (tczlld.com) which users should verify before providing credentials.
Persistence & Privilege
always:false and normal agent invocation; the skill does not request persistent 'always' inclusion or elevated platform privileges. It writes generated images to a workspace path (default under the user's home), which is expected for this use case but worth noting.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install aigc-gen
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /aigc-gen 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.1.0
v1.1.0: 修复状态码判断 bug;移除 subprocess 飞书发送,改为 agent 调用 feishu_doc;支持 isolated session 异步生成;统一 API 前缀路径;补全配置文档
v1.0.0
First release: text-to-image generation with X-API-Key auth, Feishu delivery
元数据
Slug aigc-gen
版本 1.1.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

AIGC Generator 是什么?

AIGC 内容生成助手,支持图片生成(文生图)。当用户想要生成图片、AI 绘画、创作内容时自动触发。支持负面提示词、图片比例、批量生成等参数。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 75 次。

如何安装 AIGC Generator?

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

AIGC Generator 是免费的吗?

是的,AIGC Generator 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

AIGC Generator 支持哪些平台?

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

谁开发了 AIGC Generator?

由 kinggu(@gushenjie)开发并维护,当前版本 v1.1.0。

💬 留言讨论