ai-image-gen

ai-image-gen is a skill for Claude Code, Codex from ZJU-REAL/Easel. It costs 106 tokens per session (1,573 once invoked), scanned A, original, Apache-2.0.

An AI image tool for creating new pictures from text, transforming an existing image, or making image variations. It uses an image-generation service configured with your own API key.

In plain words
What is it for?
Use it for illustrations, marketing images, image variations, and edits based on text prompts or reference images.
Why use it?
It removes the need to manually create every visual or switch between separate image-generation tools.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for openclaw. Also seen: mentions AGENTS.md; built for openclaw.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python skills/shared/scripts/ai_image.py check.

Good fit Use it for illustrations, marketing images, image variations, and edits based on text prompts or reference images.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/ZJU-REAL/Easel
agentmods
npx agentmods add skills/zju-real/easel/ai-image-gen

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ai-image-gen

README.md
[![agentmods](https://agentmods.dev/badge/skills/zju-real/easel/ai-image-gen/github.svg)](https://agentmods.dev/skills/zju-real/easel/ai-image-gen)
Your own site
<a href="https://agentmods.dev/skills/zju-real/easel/ai-image-gen"><img src="https://agentmods.dev/badge/skills/zju-real/easel/ai-image-gen/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ai-image-gen

Your own site · 80×15
<a href="https://agentmods.dev/skills/zju-real/easel/ai-image-gen"><img src="https://agentmods.dev/badge/skills/zju-real/easel/ai-image-gen.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 106 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,573 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Data Exfiltration · line 36
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • medium Data Exfiltration · line 38
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00106 $0.01573
Opus 5 $0.00053 $0.00787
Sonnet 5 $0.00021 $0.00315
Haiku 4.5 $0.00011 $0.00157

Measured 11d ago against content hash 707bdfae68d1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

ai-image-gen scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/openclaw/ai-image-gen/SKILL.md · 104 lines

How it starts

The opening of the file, as written. The whole thing — 104 lines — stays where its author put it; the contents beside it link to each section on GitHub.

ai-image-gen Skill

通用 AI 文生图 / 图生图 / 图像变体。用户自备图像生成 API key(OpenAI 兼容 或 apimart 异步),产物写入 outputs/

调用共享脚本 skills/shared/scripts/ai_image.py(纯标准库,无第三方依赖)。 本 SKILL 不索要、不回显、不写入、不提交任何真实 API key —— key 只存在于用户自己的 .env

边界(和相邻 SKILL 区分)

  • ai-image-gen(本 SKILL):通用 AI 生图,任意题材,文生图 / 图生图 / 变体。
  • ecom-details-image:电商详情页 / 商品主图专用出图(25 场景模板、PDP 序列)。要做电商商品图走它。
  • card-* / poster-*:HTML+CSS 渲染截图(金句卡、小红书卡、海报),非 AI 生成,是确定性设计出图。
  • image-editing:已有图片的确定性处理(改尺寸/裁剪/加水印/压缩),不生成新画面。

配置(执行前必读)

配置检查路径铁律:先 cdAGENTS.md 末尾给出的 Easel 项目根,确认当前目录有 .envskills/shared/scripts/ai_image.py,再运行下列命令。不得在 OpenClaw workspace 用 ./shared/scripts/... 检查,也不得用 env / printenv 代替读取项目 .env;否则会把已配置的 IMG_BASE_URL/Key 误判为缺失。

需在项目根目录 .env 中设置三项(脚本从当前目录向上自动查找 .env):

变量 说明 兼容别名
IMG_BASE_URL API 根地址 OPENAI_BASE_URL / OPENAI_API_BASE / BASE_URL
IMG_MODEL 图片模型名 OPENAI_IMAGE_MODEL / IMAGE_MODEL / OPENAI_MODEL
IMG_API_KEY API key OPENAI_API_KEY / API_KEY

支持两类服务,脚本按 base_url 自动检测(也可 --mode sync|async 强制):

  • OpenAI 兼容(同步)base_url 不含 apimart。走 /images/generations/images/edits/images/variations。 示例:IMG_BASE_URL=https://api.openai.com/v1IMG_MODEL=gpt-image-1
  • apimart(异步轮询)base_urlapimart。提交任务 → 轮询 /tasks/<id> → 下载。 示例:IMG_BASE_URL=https://api.apimart.ai/v1

执行步骤

1. 先确认配置(离线,不发请求)

python skills/shared/scripts/ai_image.py check

打印三项配置状态(key 脱敏显示)、命中的别名、自动检测的模式。缺项时给出 .env 填写示例并以退出码 2 结束。配置未就绪就不要往下走,直接把缺什么、怎么配告诉用户。

2. 文生图 text2img

先把用户诉求写成一条清晰的图像 Prompt(主体 + 风格 + 构图 + 光线 + 画质),再执行:

python skills/shared/scripts/ai_image.py text2img \
  --prompt "一只戴墨镜的柴犬,扁平插画风,明亮撞色背景,高细节" \
  --size 1024x1024 --n 1 \
  --output outputs/主题名/ai-image
  • --size:同步模式用像素(1024x1024 / 1536x1024 / 1024x1536…);异步模式用比例(1:1 / 16:9 / 9:16…)。
  • --n:生成张数(多张时按序号自动命名)。
  • --output:目录(多张自动编号)或含扩展名的单文件;统一放 outputs/主题名/
  • 同步可加 --quality low|medium|high;异步可加 --resolution 1k|2k|4k

Read the full file on GitHub · 104 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 104 lines · 106 tokens per session scan A 707bdfae68d1

Subscribe to this mod's changes

ai-image-gen is a skill published in the GitHub repository ZJU-REAL/Easel (794 stars, last pushed yesterday), licensed Apache-2.0. It adds 106 tokens to every session and 1,573 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

ppt-generation

Generate PPTX presentations from slide plan + content.

HezaoHezao/poirot · 13 tokens

chart-visualization

Generate charts: select type, extract data, render image.

HezaoHezao/poirot · 17 tokens

jacky-motion2-0-srt

A workflow for turning a Chinese spoken script and matching SRT subtitle file into a single 16:9 HTML information animation. SRT is a subtitle file that stores text with start and end times; the animation follows those times and adds recorded-screen placeholders when needed.

Jackywxsz/Jacky-motion · 127 tokens

video-podcast-maker

Use when the user gives a topic and wants an automated topic-driven narrated explainer, podcast, or knowledge-summary video (Bilibili / YouTube / Xiaohongshu / Douyin / WeChat Channels), or asks to learn visual design patterns from a reference video/image. Trigger when the user mentions creating a knowledge video…

Agents365-ai/video-podcast-maker · 214 tokens

video-podcast-maker-lite

Minimal personal narrated-video pipeline — a topic becomes a talking-head-free explainer MP4 (1080p or 4K) via script → Azure TTS (SSML) → Remotion. Use when the user wants a quick narrated video from a topic without the full video-podcast-maker machinery (no extra skills, no thumbnails/shorts/publish matrix). Do NOT…

Agents365-ai/video-podcast-maker · 96 tokens

video-podcast-maker-nano

Smallest personal narrated-explainer-video pipeline (spoken narration over visuals, not an audio podcast), fully tool-agnostic and autonomous by default — topic → research ∥ asset collection → script → TTS → video → 4K render ∥ publish info + cover. The skill defines the pipeline logic and self-verified checkpoints…

Agents365-ai/video-podcast-maker · 163 tokens