← 返回 Skills 市场
113
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install ai-image-cli
功能描述
AI 图像生成工具。支持文生图(text2img)和图生图(img2img)功能,基于 AIGW API。 激活场景:生成图片、画图、制作图像、修改图片、图片编辑、 或提到 "生成图片"、"画一个"、"创建图像"、"修改这张图"、"改成"、"转为图片" 时激活。
使用说明 (SKILL.md)
AI Image — AI 图像生成技能
ai-image-cli 是 AI 图像生成工具,支持文生图和图生图两大核心能力。
| 能力 | 提供商 | 模型 | 说明 |
|---|---|---|---|
| 文生图 | AIGW | doubao-seedream-4-5 | 根据文本描述生成图片 |
| 图生图 | AIGW | doubao-seededit-3-0-i2i | 基于源图片和文本生成新图片 |
命令选择
根据用户意图,直接选择对应子命令:
- 用户想根据描述生成新图片 →
ai-image text2img "\x3C描述>" - 用户提供了图片 URL,想要修改或编辑 →
ai-image img2img "\x3C修改描述>" \x3CURL> - 查看工具能力 →
ai-image capabilities
命令速查
| 命令 | 用途 | 关键选项 |
|---|---|---|
ai-image text2img "\x3C描述>" |
文生图 | -s 尺寸, --seed 种子, -g 引导系数, --watermark |
ai-image img2img "\x3C描述>" \x3CURL> |
图生图 | --seed 种子, -g 引导系数, --watermark |
ai-image capabilities |
查看工具能力(JSON) | 无参数,无需认证 |
所有命令输出 JSON 格式,success 字段标识成功或失败。
Quick Start
直接执行命令即可,无需预检。如果命令不存在或返回错误,再执行环境诊断:
# 诊断环境
bash {baseDir}/scripts/preflight.sh
# 如果 cli_installed: false,执行安装
bash {baseDir}/scripts/install.sh
常用工作流
文生图 (text2img)
# 基本用法
ai-image text2img "一个中国女孩,高清"
# 指定尺寸
ai-image text2img "夕阳下的海滩" --size 1920x1920
# 使用随机种子(可复现)
ai-image text2img "雪山风景" --seed 12345
# 完整参数
ai-image text2img "城市夜景" --size 1920x1920 --seed 999 --guidance-scale 3.0 --watermark
常用参数:
--size, -s: 图片尺寸,如1920x1920(默认:1920x1920,最低尺寸:1920x1920)--seed: 随机种子,用于复现相同结果--guidance-scale, -g: 引导系数,控制生成质量(默认:2.5)--watermark / --no-watermark: 是否添加水印(默认: 不添加)
图生图 (img2img)
注意: 图生图不支持指定尺寸参数,输出图片尺寸由源图片决定。
# 基本用法
ai-image img2img "改成爱心形状的泡泡" https://example.com/image.jpg
# 使用随机种子
ai-image img2img "改变颜色为红色" https://example.com/car.jpg --seed 777
# 调整引导系数
ai-image img2img "转为水彩画风格" https://example.com/pic.png --guidance-scale 6.0
# 完整参数
ai-image img2img "添加蓝天白云" https://example.com/photo.png \
--seed 888 --guidance-scale 6.0 --watermark
常用参数:
--seed: 随机种子,用于复现相同结果--guidance-scale, -g: 引导系数,控制编辑强度(默认:5.5)--watermark / --no-watermark: 是否添加水印(默认: 不添加)
输出格式
成功响应
{
"success": true,
"command": "text2img",
"provider": "ark",
"data": {
"model": "doubao-seedream-4-5",
"created": 1754384045,
"data": [
{
"url": "https://ark-content-generation-v2-cn-beijing.tos-cn-beijing.volces.com/..."
}
],
"usage": {
"generated_images": 1,
"output_tokens": 4096,
"total_tokens": 4096
}
}
}
错误响应
{
"success": false,
"command": "text2img",
"error": "未找到 AIGW API Key",
"hint": "请设置 LANGBASE_TOKEN 或 ARK_API_KEY 环境变量"
}
故障恢复
命令执行失败时,按以下步骤排查:
- 命令不存在 (
command not found): 执行bash {baseDir}/scripts/install.sh - 认证失败 (
AUTH_FAILED或未找到 AIGW API Key): 执行bash {baseDir}/scripts/preflight.sh查看诊断。若auth_configured: false,说明LANGBASE_TOKEN环境变量未注入当前进程,需确认~/.openclaw/user.env中包含LANGBASE_TOKEN。 - 网络/API 错误: 重试一次。若持续失败,执行 preflight 检查连通性。
未全局安装时的备选方式
python3 -m ai_image text2img "查询词"
python3 -m ai_image img2img "修改描述" "https://example.com/image.jpg"
参考文档
- 完整 CLI 参考(参数、返回结构、错误码):读取
references/cli-reference.md - 更多高级示例(批量生成、参数调优):读取
references/examples.md
安全使用建议
This skill looks like a wrapper for a private AIGW-backed image CLI but is inconsistent with its registry metadata. Before installing or running it: (1) don't run the install.sh or preflight.sh blindly — they will source ~/.openclaw/user.env and may install code from a private PyPI (the script even includes baked-in credentials); (2) ask the publisher for a declared list of required env vars and config paths (LANGBASE_TOKEN / ARK_API_KEY and the exact user.env format) and for an explanation of the private PyPI usage; (3) inspect the ai-image-cli package source you would install (or prefer to install from a trusted public repository) and verify the package maintainer; (4) if you must test, run preflight/install in an isolated environment (container or VM) with no sensitive credentials mounted; (5) if any credentials (e.g., avlab:avlab123) in the scripts are real for your environment, consider them compromised and rotate them. If the publisher can provide a manifest that declares the required env vars and justifies the private-index install, the concerns here would be reduced.
功能分析
Type: OpenClaw Skill
Name: ai-image-cli
Version: 1.0.0
The ai-image-cli skill bundle is a legitimate tool designed for AI image generation and editing via internal NetEase AIGW APIs. It includes comprehensive documentation and robust shell scripts (install.sh and preflight.sh) for environment setup and diagnostics. While the installer uses hardcoded credentials and an unencrypted HTTP endpoint for an internal PyPI mirror (music-pypi.hz.netease.com), these appear to be standard internal infrastructure configurations rather than malicious or intentionally exploitable vulnerabilities.
能力评估
Purpose & Capability
The SKILL.md describes an image-generation CLI that requires an AIGW API key (LANGBASE_TOKEN or ARK_API_KEY), and the shipped docs/scripts clearly depend on those tokens — yet the skill registry metadata declares no required environment variables or config paths. That mismatch (claimed no secrets required vs. instructions expecting service tokens and a user.env file) is a substantive incoherence.
Instruction Scope
Runtime instructions and helper scripts instruct the agent to source ~/.openclaw/user.env and /home/appops/.openclaw/user.env to obtain LANGBASE_TOKEN/ARK_API_KEY, run preflight/install scripts, and call the CLI. Those instructions cause the agent to read local config files and environment variables not described in the manifest; they also recommend running pip to install a package from a private index. The SKILL.md explicitly tells the user/agent to load and rely on local user.env files — this expands scope beyond a pure, self-contained instruction-only skill.
Install Mechanism
No install spec was registered, but scripts/install.sh will pip-install the package, defaulting to a private PyPI host (music-pypi.hz.netease.com). The script contains a DEFAULT_PYPI_INDEX value embedding basic-auth credentials (http://avlab:[email protected]/simple). Pulling code from an internal/non-standard index (and with hard-coded credentials) is higher risk and unexpected for a publicly listed skill.
Credentials
The code and documentation require LANGBASE_TOKEN or ARK_API_KEY and instruct sourcing user.env files to obtain them, but the registry declares no required env vars or config paths. The install script also reads and uses PIP_INDEX_URL / PIP_TRUSTED_HOST (and falls back to an index with embedded credentials). Requesting access to local user.env files and expecting service tokens without declaring them is disproportionate and opaque.
Persistence & Privilege
The skill does not request always: true and does not claim elevated platform privileges. However, its install script will persist system/user-level Python packages (pip install --user or global), which alters the environment and leaves installed code on disk. This is not automatically malicious but is a notable persistent effect the user should accept explicitly.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install ai-image-cli - 安装完成后,直接呼叫该 Skill 的名称或使用
/ai-image-cli触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
ai-image-cli 1.0.0 — 首发版本
- 提供基于 AIGW API 的 AI 图像生成工具,支持文生图(text2img)与图生图(img2img)两大核心能力
- 支持主要模型:doubao-seedream-4-5(文生图)、doubao-seededit-3-0-i2i(图生图)
- 多参数控制(如尺寸、随机种子、引导系数、水印)
- 输出标准 JSON 格式,便于程序化集成
- 包含详细使用示例、故障自检及安装指南,支持命令行和 Python 调用
元数据
常见问题
Ai Image Cli 是什么?
AI 图像生成工具。支持文生图(text2img)和图生图(img2img)功能,基于 AIGW API。 激活场景:生成图片、画图、制作图像、修改图片、图片编辑、 或提到 "生成图片"、"画一个"、"创建图像"、"修改这张图"、"改成"、"转为图片" 时激活。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 113 次。
如何安装 Ai Image Cli?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install ai-image-cli」即可一键安装,无需额外配置。
Ai Image Cli 是免费的吗?
是的,Ai Image Cli 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Ai Image Cli 支持哪些平台?
Ai Image Cli 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Ai Image Cli?
由 Xxxxxzh1(@xxxxxzh1)开发并维护,当前版本 v1.0.0。
推荐 Skills