Agent skill

AI Image Gen

by ZJU-REAL in ZJU-REAL/Easel

通用 AI 生图:文生图 / 图生图 / 图像变体。当用户说 AI 生图、AI 画图、文生图、图生图、生成图片、生成配图、图像生成、AI 出图、AI 作图、换图、改图、图像编辑、给我画一张、生成一张图 时使用。支持 OpenAI 兼容 API 与 apimart 异步 API,用户自备 API key。

Apache-2.0Auto-check: notesAI & LLM Engineering

Install AI Image Gen

skills CLI
$ npx skills add ZJU-REAL/Easel --skill ai-image-gen -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ZJU-REAL/Easel ai-image-gen --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ZJU-REAL/Easel.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/openclaw/ai-image-gen .claude/skills/ai-image-gen && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
ai-image-gen
GitHub stars
3.4k
Token cost
~787 tokens
SKILL.md length
191 words
Files
2
Skills in repo
114
Repo updated
First seen
Licence
Apache-2.0

At a glance

通用 AI 生图:文生图 / 图生图 / 图像变体。当用户说 AI 生图、AI 画图、文生图、图生图、生成图片、生成配图、图像生成、AI 出图、AI 作图、换图、改图、图像编辑、给我画一张、生成一张图 时使用。支持 OpenAI 兼容 API 与 apimart 异步 API,用户自备 API key。

  • Works in 5 steps: 先确认配置(离线,不发请求) → 文生图 text2img → 图生图 / 图像编辑 img2img → …
  • Tasks that involve Image generation
  • SKILL.md covers 边界(和相邻 SKILL 区分), 配置(执行前必读), 执行步骤 and 产物, plus 2 more sections
  • Calls python; reaches api.openai.com and api.apimart.ai; needs IMG_API_KEY and OPENAI_API_KEY

What it does

AI Image Gen is an agent skill from ZJU-REAL/Easel. 通用 AI 生图:文生图 / 图生图 / 图像变体。当用户说 AI 生图、AI 画图、文生图、图生图、生成图片、生成配图、图像生成、AI 出图、AI 作图、换图、改图、图像编辑、给我画一张、生成一张图 时使用。支持 OpenAI 兼容 API 与 apimart 异步 API,用户自备 API key。

Its SKILL.md is about 790 tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `EASEL-META.md`).

It sits in AI & LLM Engineering, covering Image generation and LLM API integration. It works with OpenAI. The repository describes itself as: An open-source AI agent for social media — discover trends, create content, publish everywhere, and learn what works across Xiaohongshu, Douyin, Zhihu, Bilibili, and more.🎨一个开源的… The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Image generation
  • Tasks that involve LLM API integration

Example prompts

  • “/ai-image-gen”

Requirements

  • Python 3
  • A credential in IMG_API_KEY
  • A credential in OPENAI_API_KEY

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. 先确认配置(离线,不发请求)
  2. 文生图 text2img
  3. 图生图 / 图像编辑 img2img
  4. 图像变体 variations
  5. 交付

What it can do on your machine

Read from SKILL.md and the folder at commit 278f420. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • api.openai.com
    • api.apimart.ai

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • IMG_API_KEY
    • OPENAI_API_KEY
    • API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

AI Image Gen loads about 787 tokens when it runs. Until then it costs about 41 tokens; SKILL.md has 191 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~41
When it runs · the whole SKILL.md, loaded when a task matches
~787

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:12
    回显、不写入、不提交任何真实 API key —— key 只存在于用户自己的 `.env`。
  • NoteMentions a .env fileSKILL.md:23
    ` 到 `AGENTS.md` 末尾给出的 Easel 项目根,确认当前目录有 `.env` 和 `skills/shared/scripts/ai_image.py`,再运行下列命令。不得在 OpenClaw workspace 用 `.
  • NoteMentions a .env fileSKILL.md:25
    需在项目根目录 `.env` 中设置三项(脚本从当前目录向上自动查找 `.env`):
  • NoteMentions a .env fileSKILL.md:48
    打印三项配置状态(key 脱敏显示)、命中的别名、自动检测的模式。缺项时给出 `.env` 填写示例并以退出码 2 结束。**配置未就绪就不要往下走**,直接把缺什么、怎么配告诉用户。
  • NoteMentions a .env fileSKILL.md:101
    - **缺 key / 缺配置**:`check` 会明确指出缺哪项及 `.env` 示例;报错为友好中文,不抛 traceback。

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ZJU-REAL/Easel at commit 278f420, republished under its Apache-2.0 licence (© ZJU-REAL). 191 words, ~787 tokens.

Download SKILL.mdSave it as .claude/skills/ai-image-gen/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
ai-image-gen
description
通用 AI 生图:文生图 / 图生图 / 图像变体。当用户说 AI 生图、AI 画图、文生图、图生图、生成图片、生成配图、图像生成、AI 出图、AI 作图、换图、改图、图像编辑、给我画一张、生成一张图 时使用。支持 OpenAI 兼容 API 与 apimart 异步 API,用户自备 API key。
layer
produce

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:已有图片的确定性处理(改尺寸/裁剪/加水印/压缩),不生成新画面。

配置(执行前必读)

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

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

变量说明兼容别名
IMG_BASE_URLAPI 根地址OPENAI_BASE_URL / OPENAI_API_BASE / BASE_URL
IMG_MODEL图片模型名OPENAI_IMAGE_MODEL / IMAGE_MODEL / OPENAI_MODEL
IMG_API_KEYAPI keyOPENAI_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/v1,IMG_MODEL=gpt-image-1。
  • apimart(异步轮询):base_url 含 apimart。提交任务 → 轮询 /tasks/<id> → 下载。 示例:IMG_BASE_URL=https://api.apimart.ai/v1。

执行步骤

1. 先确认配置(离线,不发请求)
bash
python skills/shared/scripts/ai_image.py check

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

2. 文生图 text2img

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

bash
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。
3. 图生图 / 图像编辑 img2img

基于一张输入图 + 指令生成新图(OpenAI 走 /images/edits multipart,可选 --mask 局部编辑;apimart 把输入图作参考图走生成端点):

bash
python skills/shared/scripts/ai_image.py img2img \
  --prompt "把背景换成夜晚霓虹街道,保留主体" \
  --image path/to/input.png \
  --output outputs/主题名/edited.png
4. 图像变体 variations

由一张图生成多个变体:

bash
python skills/shared/scripts/ai_image.py variations \
  --image path/to/input.png --n 3 \
  --output outputs/主题名/variations
5. 交付

告诉用户产物路径、生成参数(模式/模型/尺寸/张数)。如需再改尺寸/加水印/压缩,转 image-editing。

产物

统一输出到 outputs/主题名/。脚本会自动创建目录,多张按时间戳 + 序号命名。

Profile 感知

有账号 Profile(=== EASEL ACCOUNT PROFILE ===)时,把品牌视觉风格(配色 / 调性 / 元素偏好)融入 Prompt,保持系列图统一;无 Profile 时按用户描述走通用生成。

常见问题

  • 缺 key / 缺配置:check 会明确指出缺哪项及 .env 示例;报错为友好中文,不抛 traceback。
  • 同步 vs 异步用错尺寸格式:同步用像素、异步用比例。用 --mode 可强制模式。
  • 不要把真实 key 写进任何产物或提交。

© ZJU-REAL, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in skills/openclaw/ai-image-gen of ZJU-REAL/Easel.

  • SKILL.md
  • EASEL-META.md

Open the folder on GitHubat commit 278f420

Compare with similar skills

AI Image Gen next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

AI Image Gen compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
AI Image Gen this skillZJU-REAL/Easel3.4k—~787Automated safety check: NotesApache-2.0
Fastllm Gatewayazrtydxb/Fastllm-proxy108—~926Automated safety check: PassApache-2.0
Talking Avatar Voice Chat Appbuildfastwithai/gen-ai-experiments785—~1.7kAutomated safety check: PassMIT
Gpt Imagenikships/droidproxy122—~2.5kAutomated safety check: PassMIT
Draw Image DiagramsRealSeaberry/AutoMCM-Pro257—~1.9kAutomated safety check: NotesMIT
Azure AI Openai Dotnetmicrosoft/skills3.1k5 repos~3.4kAutomated safety check: PassMIT

Similar skills

  • Fastllm Gateway

    azrtydxb/Fastllm-proxy

    Send inference requests through the FastLLM OpenAI-compatible gateway — chat completions, completions, embeddings, rerank, score, responses, moderations, audio speech and transcription, image…

    108 GitHub stars~926 tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Talking Avatar Voice Chat App

    buildfastwithai/gen-ai-experiments

    Builds a realtime voice-chat app around a talking character portrait made from your photo or a text description, with mouth sprites driven by the audio.

    785 GitHub stars~1.7k tokensUpdated 19 days ago
    AI & LLM EngineeringAuto-check passed
  • Gpt Image

    nikships/droidproxy

    Generate or edit images via GPT Image 2.5 Flare or Sunburst through DroidProxy Codex OAuth (no OPENAIAPIKEY).

    122 GitHub stars~2.5k tokensUpdated yesterday
    Media & CreativeAuto-check passed
  • Draw Image Diagrams

    RealSeaberry/AutoMCM-Pro

    Generates diagrams, flowcharts and conceptual illustrations with OpenAI's gpt-image models, while leaving data plots and result figures to real plotting code.

    257 GitHub stars~1.9k tokensUpdated 1 mo ago
    Media & CreativeAuto-check: notes
  • Azure AI Openai Dotnet

    microsoft/skills

    Official

    Azure OpenAI SDK for .NET. An agent skill from microsoft/skills.

    3.1k GitHub starsUsed in 5 repos~3.4k tokens
    AI & LLM EngineeringAuto-check passed
  • Gpt Image Gen

    ninehills/skills

    生图 / 生成图片 / 画图 — 用 OpenAI gpt-image-2 生成图像。支持文生图、参考图生图 (img2img)、蒙版修补 (inpainting)。当用户要求用 GPT 画图、OpenAI 生图、gpt-image-2、文+图生图、参考图片生成、img2img、inpainting 时必加载此技能。Auth 自动继承 OPENAIAPIKEY / Codex OAuth…

    280 GitHub stars~1.8k tokensUpdated 3 mo ago
    Media & CreativeAuto-check: notes

More from ZJU-REAL/Easel

All 114 skills in this repo
  • Gzh Design

    ZJU-REAL/Easel

    微信公众号文章排版引擎:把 Markdown / Word(.docx) / PDF / 纯文本转成可直接粘贴进公众号编辑器的 HTML,自动章节编号、关键词标记、引言卡、目录、代码块、图片/GIF、作者签名;主题从 references/theme-index.md…

    3.4k GitHub stars~2.1k tokensUpdated today
    Auto-check passed
  • 微信公众号文章自动创作与发布工具。给定参考文章、文字或文档,自动搜索整理全网相关信息、生成图文并茂的公众号文章,并发布到微信公众号草稿箱。特别强调反 AI 检测写作。

    3.4k GitHub stars~1.8k tokensUpdated today
    Auto-check passed
  • Card Design

    ZJU-REAL/Easel

    社媒卡片视觉设计系统:提供配色、中文字体层级、满画幅布局、品类骨架和死空白/密度质检,避免模板化 PPT 与廉价 AI 感。

    3.4k GitHub stars~657 tokensUpdated today
    Auto-check passed
  • Ecom Details Image

    ZJU-REAL/Easel

    生成电商商品视觉方案:主图概念、场景图、详情页视觉方向和 AI 生图 Prompt. An agent skill from ZJU-REAL/Easel.

    3.4k GitHub stars~1.1k tokensUpdated today
    Auto-check: notes
  • Infographic

    ZJU-REAL/Easel

    将数据或文字内容转化为可视化信息图,支持静态(AntV)和动画 GIF 两种模式。当用户需要制作信息图、数据可视化、流程图、对比图、动画图表、GIF 图表、思维导图、SWOT 分析图时调用。本地渲染信息图/GIF 动画;要单张静态图片 URL 用 chart-visualization,要 CSV/JSON→整页报告用 data-report

    3.4k GitHub stars~643 tokensUpdated today
    Auto-check passed
  • Novel Writer

    ZJU-REAL/Easel

    长篇小说/网文连载创作:从世界观、人设和三级大纲写到逐章正文,并用文件化状态维护伏笔、前情和跨章一致性. An agent skill from ZJU-REAL/Easel.

    3.4k GitHub stars~1k tokensUpdated today
    Auto-check passed

Works with

Questions about AI Image Gen

What does AI Image Gen do?

通用 AI 生图:文生图 / 图生图 / 图像变体。当用户说 AI 生图、AI 画图、文生图、图生图、生成图片、生成配图、图像生成、AI 出图、AI 作图、换图、改图、图像编辑、给我画一张、生成一张图 时使用。支持 OpenAI 兼容 API 与 apimart 异步 API,用户自备 API key。. AI Image Gen is an agent skill from ZJU-REAL/Easel.

When should I use AI Image Gen?

AI Image Gen fits situations like: tasks that involve Image generation; tasks that involve LLM API integration.

How do I install AI Image Gen in Claude Code?

Run `npx skills add ZJU-REAL/Easel --skill ai-image-gen -a claude-code`. Or copy the skill folder (skills/openclaw/ai-image-gen in ZJU-REAL/Easel) into .claude/skills/ai-image-gen in your project. Claude Code loads it when a task matches its description.

How do I install AI Image Gen in Codex?

Run `npx skills add ZJU-REAL/Easel --skill ai-image-gen -a codex`. Or copy the skill folder (skills/openclaw/ai-image-gen in ZJU-REAL/Easel) into .agents/skills/ai-image-gen in your project. Codex loads it when a task matches its description.

Can I use AI Image Gen in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ZJU-REAL/Easel --skill ai-image-gen -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ai-image-gen, .gemini/skills/ai-image-gen, .github/skills/ai-image-gen and .opencode/skills/ai-image-gen in your project.

What does AI Image Gen need to run?

Going by SKILL.md and its folder, AI Image Gen needs the command-line tools its instructions call (python) and credentials named IMG_API_KEY, OPENAI_API_KEY and API_KEY. Our summary lists: Python 3; A credential in IMG_API_KEY; A credential in OPENAI_API_KEY.

Does AI Image Gen access the network?

SKILL.md names 2 domains. In commands or code: api.openai.com and api.apimart.ai; the agent is likely to contact these when it follows the instructions. This is read from the text; nothing was executed.

Is AI Image Gen safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does AI Image Gen use?

AI Image Gen is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does AI Image Gen use?

About 787 tokens (SKILL.md is roughly 3.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to AI Image Gen?

Skills that share tags, products or a category with AI Image Gen: Fastllm Gateway (azrtydxb/Fastllm-proxy, 108 stars), Talking Avatar Voice Chat App (buildfastwithai/gen-ai-experiments, 785 stars), Gpt Image (nikships/droidproxy, 122 stars) and Draw Image Diagrams (RealSeaberry/AutoMCM-Pro, 257 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains AI Image Gen?

ZJU-REAL (a GitHub organization) maintains it in ZJU-REAL/Easel, which has 3,376 GitHub stars. The repository holds 114 skills in this directory. The repository was last updated on October 9, 2026.

Source: ZJU-REAL/Easel on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.