Image generation and editing with imgen

VerifiedCaution

Generate or edit raster images using the imgen CLI: create images from text descriptions (text-to-image) or modify existing images (image-to-image).

Sby Skills Guide Bot
ContentBeginner
8/25/2026
Claude Code
#image-generation#img2img#png#cli#transparent-background

Recommended for

Automated summary

Generates or edits PNG bitmap images through the imgen CLI, either from a text prompt or from input images (img2img).

Strengths

  • Covers both text-to-image and editing of existing images with up to five inputs
  • Practical flags for size, quality, multiple outputs, and transparent backgrounds (great for stickers and icons)
  • Clear workflow that displays the resulting PNG and maps common errors (401/403, 429, 400)
  • Translates non-English requests into English prompts for better results

Limitations

  • Requires the imgen CLI plus an authenticated Codex CLI session
  • Slow generation (roughly 15-30 seconds per image), so long timeouts are needed
  • Resolution capped at 3840 px on the longest side
  • Produces only PNG bitmaps, not SVG or diagrams
When to use it

Use it whenever a user wants to create or restyle a bitmap image such as an illustration, logo, icon, sticker, avatar, or wallpaper.

When not to use it

Avoid it for charts, diagrams, UI mockups, or vector SVG graphics, which belong to other tools.

Security analysis

Caution
Quality score85/100

The skill is a thin, readable wrapper around an `imgen` command: it builds a prompt and output path, runs the CLI, and reads back the resulting PNG. There is no obfuscation, no curl|sh piping, no destructive filesystem operation, no secret exfiltration, and no attempt to disable safety controls. The only risk class is the legitimate use of Bash/network to call an image-generation service, so it lands at caution rather than risky.

Findings
  • •Invokes an external `imgen` CLI via Bash, which implies network access and an authenticated account (Codex CLI login), though no credentials are handled by the skill itself
  • •Output paths and filenames are decided by the model, so files are written into the working directory without an explicit confirmation step
How this analysis is made

Examples

Text-to-image fox
Draw a red fox sitting in deep snow, portrait orientation, and save it as fox.png
Restyle to neon
Turn fox.png into a nighttime neon-lit scene, keeping the fox and composition
Transparent cat sticker
Make me a cute cartoon cat sticker with a transparent background

name: imgen description: Generate or edit raster images with the imgen CLI (outputs PNG). Use this WHENEVER the user wants to create/generate/draw/make an image, picture, logo, icon, illustration, wallpaper, sticker, avatar, or art from a text description — OR edit/modify/restyle/change an existing image (img2img). Triggers on phrasings like "画一张…", "生成一张…图", "做个 logo / 图标 / 贴纸", "把这张图改成…", "P 成…", "give me a picture of…", "turn this photo into…", "make me an image of…" — even when the user never says "imgen". Do NOT use for charts / diagrams / flowcharts (use code or mermaid), UI mockups / web pages (use frontend-design), or SVG vector graphics. allowed-tools: Bash, Read

imgen — 图片生成 / 编辑

用 imgen CLI 从文字生成图片,或对已有图片做编辑(图生图)。产出 PNG 文件。

何时用 / 不用

  • 用:文生图("画/生成一张 X")、图生图("把这张图改成 X")、logo / 图标 / 插画 / 壁纸 / 贴纸 / 头像 等位图。
  • 不用:图表 / 流程图 / 架构图(用代码或 mermaid)、UI 界面 / 网页(用 frontend-design)、SVG 矢量图。

文生图

imgen "<prompt,英文质量更好>" -o <输出.png>

图生图(编辑已有图)

用户给了图、或上文刚生成过图、或要"改这张",把输入图给 -i:

imgen "<想怎么改>" -i <输入.png> -o <输出.png>

多张输入:-i a.png -i b.png(1~5 张)。

参数

| 参数 | 说明 | |---|---| | -s, --size | 如 1024x1024 / 1024x1536 / 3840x2160(4K);最长边 ≤ 3840;默认 auto | | -q, --quality | low / medium / high / auto(默认 auto) | | -b, --background | transparent(透明,做贴纸/图标)/ opaque / auto | | -n, --count | 生成数量(>1 输出 out-1.png out-2.png…) |

流程

  1. 判类型:有输入图 → 图生图(-i);否则文生图。
  2. 选输出路径:用户没指定就放当前目录、起个语义化文件名(如 fox.png)。
  3. 把中文需求转成英文 prompt(对英文响应更好),保留用户要的风格/构图细节。
  4. 跑命令:约 15-30 秒/张,给足超时(Bash timeout 设 180000 左右)。
  5. 展示:生成后用 Read 工具读这张 PNG 直接展示给用户,并报保存路径。
  6. 失败:把 imgen 的报错原样转达(401/403=账号问题、429=限流、400=参数如尺寸超限)。

例子

Example 1 — 文生图 用户:帮我画一张雪地里的红色狐狸,竖版

imgen "a red fox sitting in deep snow, cinematic, soft morning light" -s 1024x1536 -o fox.png

然后 Read fox.png 给用户看。

Example 2 — 图生图 用户:把 fox.png 改成夜晚霓虹风

imgen "make it nighttime with neon lighting, keep the fox and composition" -i fox.png -o fox-neon.png

Example 3 — 透明贴纸 用户:做个猫咪贴纸,要透明背景

imgen "a cute cartoon cat sticker, bold clean outline" -b transparent -o cat.png

注意

  • 需已完成 Codex CLI 登录;未登录会 401/403。
  • 分辨率上限:最长边 3840px(4K UHD 3840x2160 可,4096 会被拒)。

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/image-generation-and-editing-with-imgen-mt87675z/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/image-generation-and-editing-with-imgen-mt87675z' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/image-generation-and-editing-with-imgen-mt87675z/download' --output '.skill-downloads/image-generation-and-editing-with-imgen-mt87675z/SKILL.md.part' && mv '.skill-downloads/image-generation-and-editing-with-imgen-mt87675z/SKILL.md.part' '.skill-downloads/image-generation-and-editing-with-imgen-mt87675z/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

Tools declared by the author (check availability in your agent): Bash, Read

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/image-generation-and-editing-with-imgen-mt87675z/SKILL.md' && test -s '.skill-downloads/image-generation-and-editing-with-imgen-mt87675z/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/imgen' && cp -R '.skill-downloads/image-generation-and-editing-with-imgen-mt87675z' '.claude/skills/imgen'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/image-generation-and-editing-with-imgen-mt87675z'

openskills read 'image-generation-and-editing-with-imgen-mt87675z'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/image-generation-and-editing-with-imgen-mt87675z/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills