Install
$ agentstack add skill-albert-lsk-alskai-image2-alskai-image2 ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ● Environment & secrets Used
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
image2 — OpenAI gpt-image-2 图像生成
执行步骤
Step 1: 解析输入
从用户消息中提取 prompt。处理规则:
- 去掉开头的
/image2或image2(case-insensitive) - 从尾部识别并剥离以下 flag(其余部分即为 prompt):
--size— 尺寸,允许值1024x1024/1536x1024/1024x1536--n— 生成张数--quality— 质量档
- 如果用户只输入了
/image2或image2而没有 prompt,不要调用脚本,直接询问"你想生成什么内容的图片?"
Step 2: 调用脚本
使用 Bash 工具执行:
python "${CLAUDE_PROJECT_DIR:-.}/.claude/skills/image2/scripts/generate.py" \
--prompt "" \
[--size ] [--n ] [--quality ]
说明:
- 路径中的
${CLAUDE_PROJECT_DIR:-.}让 skill 在任意工作目录都能找到脚本;如果 Claude Code 没有注入此变量,默认从当前目录查找 - 只传递用户实际指定的 flag,其余让脚本使用默认值
- 不要 把 API key 作为参数传给脚本,脚本自己会从环境或
.env读取
Step 3: 展示结果
脚本成功时会在 stdout 打印每张图片的绝对路径,每行一个。拿到路径后:
- 用 Markdown 图片语法展示给用户: ``
- 在图片下方简短告知保存位置,例如:"已保存到
./image2_outputs/,共 2 张。" - 不要 重复复述用户的 prompt,也不要加多余的说明文字
脚本失败时(非 0 退出码),把 stderr 的错误信息原样转达给用户,并给出具体的排查建议(参见 README 的故障排查章节)。
约束
- 这个 skill 只负责生图,不处理图生图/图像编辑/图像分析。如果用户要求这些,礼貌说明本 skill 不支持,并建议他们直接调用 OpenAI 的
/v1/images/edits端点或使用其他工具。 - 不要在用户没有明确要求时,擅自修改或"优化"用户的 prompt。ALSKai 的原则是让用户控制创作,skill 只做执行。
- 如果用户同时指定了超出支持范围的参数(例如
--size 2048x2048),提示正确的允许值,不要静默回退。
上下文
- 默认输出目录:
./image2_outputs/(相对于 Claude Code 当前工作目录) - API key 来源优先级: 环境变量
OPENAI_API_KEY> skill 目录下的.env文件 - 该 skill 的完整使用文档在
./README.md
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: Albert-Lsk
- Source: Albert-Lsk/alskai-image2
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.