image-generator

A tool for generating new images from text or reference files and editing existing images, including marked parts of a picture. It produces PNG image files and supports combining visual references.

In plain words
What is it for?
Use it to create illustrations or other images from descriptions, combine reference images, or replace a selected region of an existing image.
Why use it?
It gives an image-producing workflow a defined way to create or change visuals while preserving the rest of an edited scene where requested.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/lessweb/deepcode-cli/image-generator
Any agent
npx skills add lessweb/deepcode-cli --skill image-generator
Clone the repo
git clone --depth 1 https://github.com/lessweb/deepcode-cli

Made for: Claude Code, Codex.

Per session 62 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,525 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00062 $0.01525
Opus 5 $0.00031 $0.00763
Sonnet 5 $0.00012 $0.00305
Haiku 4.5 $0.00006 $0.00153

Measured yesterday against content hash 53568e639dae, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

image-generator 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 yesterday.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/image_generator.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

packages/core/templates/skills/bundled/image-generator/SKILL.md · 108 lines

How it starts

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

Image Generator

通过 scripts/image_generator.py 试算积分并生成无水印 PNG。支持纯文本生图、多参考图融合,以及依据图片中标记区域进行局部编辑。

Language / 语言

Always respond in the user's language, not the language of this document.

  • If the user's latest message or the ongoing conversation is in English (for example Generate a picture of a baby panda), use English for ALL user-facing text: assistant explanations, AskUserQuestion questions, option labels and descriptions, confirmation prompts, and final result reports.
  • If the user writes in Chinese, use Chinese for all of the above.
  • When presenting ratio or resolution options, translate the direction labels into the user's language (for example 1:1 Square, 3:4 Portrait, 4:3 Landscape in English; 1:1 正方形, 3:4 竖屏, 4:3 横屏 in Chinese). Do not mix both languages in a single option label.

执行流程

严格按以下顺序执行。不得在用户明确确认积分消耗前调用图片生成接口。

1. 收集真实需求

  • 将用户真正想得到的画面整理成完整提示词,保留主体、动作、环境、构图、风格、光线、色彩、文字和限制条件。
  • 收集用户提到的全部本地图片路径、HTTP(S) 图片 URL 或 data URL。最多使用 10 张图片,不要把普通网页 URL 当作图片 URL。
  • 对多参考图,在提示词中说明每张图承担的角色,例如“参考图 1 的构图、参考图 2 的人物服装、参考图 3 的配色”,避免只写“融合这些图片”。
  • 对标记区域编辑,将含标记的图片作为参考图,并在提示词中清楚说明标记的外观、要替换或补充的内容、必须保留的未标记区域,以及最终结果中移除标记并自然融合边缘、透视、光照和纹理。
  • 如果需求本身仍有会显著改变结果的歧义,先用 AskUserQuestion 补齐,不要擅自添加关键视觉设定。

2. 确认比例和分辨率

如果用户已经明确指定支持的比例或分辨率,直接采用,不要重复询问。如果任一项缺失,必须使用 AskUserQuestion 让用户选择;两项都缺失时,在同一次工具调用中提出两个问题。

比例选项的标签必须带方向符号,不能只显示数字。支持的比例为:

  • □ 1:1(正方形)
  • ▯ 3:4(竖屏)
  • ▭ 4:3(横屏)
  • ▭ 16:9(横屏)
  • ▯ 9:16(竖屏)
  • ▯ 2:3(竖屏)
  • ▭ 3:2(横屏)
  • ▭ 21:9(超宽横屏)

如果 AskUserQuestion 限制选项数量,优先展示最符合需求的若干比例,并在问题中列出其余受支持比例供用户通过“其他”填写。分辨率选项为 1k1.5k2k4k;不要替用户默认选择。

3. 试算积分

从 Skill 目录运行脚本。每张参考图分别传一个 --image

python3 scripts/image_generator.py cost \
  --prompt "<最终提示词>" \
  --ratio "<比例>" \
  --resolution "<分辨率>" \
  --image "<参考图 1>" \
  --image "<参考图 2>"

没有参考图时省略全部 --image。脚本会把本地图片编码为 data URL,并直接传递 HTTP(S) URL 或已有 data URL。保存本次调用使用的最终提示词、图片顺序、比例和分辨率,生成时必须原样复用。

4. 请求生成确认

成功取得 credits 后,必须使用 AskUserQuestion 明确询问是否生成。问题中同时写明:

Read the full file on GitHub · 108 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. yesterday First seen · 108 lines · 62 tokens per session scan A 53568e639dae

Subscribe to this mod's changes

image-generator is a skill published in the GitHub repository lessweb/deepcode-cli (2,224 stars, last pushed 4d ago), licensed MIT. It adds 62 tokens to every session and 1,525 once invoked, about $0.0003 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

codex-router-media

Generate video, music, speech, or images with the operator's MiniMax Token Plan subscription through the codex-router media CLI. Use when the session runs a MiniMax custom (non-OpenAI) model (for example minimax-m3) with the MiniMax Token Plan provider connected, and the user explicitly asks to create a video, a song…

duolahypercho/codex-router · 97 tokens

bilibili-helper

B站内容助手 - 视频标题描述优化、标签策略、封面设计建议、分区选择、评论互动.

dongsheng123132/u-claw · 29 tokens

ppt-designer

PPT 演示助手 - 幻灯片设计、内容结构、视觉优化、动画建议、演讲稿.

dongsheng123132/u-claw · 29 tokens

douyin-script

抖音/快手短视频脚本 - 前3秒hook、脚本结构、热门音乐建议、话题标签策略.

dongsheng123132/u-claw · 32 tokens

visual-acceptance

UI/视觉改动交付前的终验方法论——多主题截图矩阵复现、像素真值判据链、CSS 层叠陷阱、布局漂移审查、before/after 存证。当视觉改动需要验收(而非实现)时使用:交付前最后一环,回答「看得见的部分真的对吗」。.

huiliyi37/Tianshu-harness · 89 tokens

gemini-interactions-api

Use this skill when writing code that calls the Gemini API for text generation, multi-turn chat, multimodal understanding, image generation, video generation, streaming responses, background research tasks, function calling, structured output, or migrating from the old generateContent API. This skill covers the…

rikkahub/rikkahub · 80 tokens