imagegen

imagegen is a skill for Claude Code, Codex from nexus-research-lab/nexus. It costs 65 tokens per session (886 once invoked), scanned A, original, Apache-2.0.

A skill for generating or editing raster images, such as photos, illustrations, mockups, and transparent-background graphics. Raster images are made from pixels and are commonly saved as PNG or JPG files.

In plain words
What is it for?
Creating new image assets, editing existing images, making product or interface mockups, and producing visual variations.
Why use it?
It helps create bitmap assets when the result should be an image file rather than HTML, CSS, SVG, or canvas code.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Creating new image assets, editing existing images, making product or interface mockups, and producing visual variations.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/nexus-research-lab/nexus/imagegen
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.

Any agent
npx skills add nexus-research-lab/nexus --skill imagegen
Clone the repo
git clone --depth 1 https://github.com/nexus-research-lab/nexus

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 imagegen

README.md
[![agentmods](https://agentmods.dev/badge/skills/nexus-research-lab/nexus/imagegen.svg)](https://agentmods.dev/skills/nexus-research-lab/nexus/imagegen)
Your own site
<a href="https://agentmods.dev/skills/nexus-research-lab/nexus/imagegen"><img src="https://agentmods.dev/badge/skills/nexus-research-lab/nexus/imagegen.svg" alt="Measured on agentmods" height="20"></a>
Per session 65 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 886 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 pass 7 Sept 2026
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.00065 $0.00886
Opus 5 $0.00032 $0.00443
Sonnet 5 $0.00013 $0.00177
Haiku 4.5 $0.00006 $0.00089

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

Security

Grade A, and why

imagegen 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 8d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/remove_chroma_key.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.

skills/imagegen/SKILL.md · 95 lines

What it actually says

Image Generation Skill

为当前 workspace 生成或编辑位图资产。只使用 nexus.generate_imagenexus.edit_image;Provider、鉴权、接口兼容和响应解析全部由 Go 服务负责。

快路径

普通单图生成必须走内置工具快路径。

  • 调用 generate_image,不要调用 Bash。
  • 不读取 references。
  • 不创建 prompt 文件。
  • 不读取输出图片。
  • 不做目录探测。
  • 不使用 Write、Read、LS、Glob、TaskOutput。
  • 不主动用 high quality。

工具入参模板:

{
  "prompt": "A concise production prompt",
  "size": "1024x1024",
  "quality": "low",
  "output_format": "png",
  "file_name": "stable-name"
}

如果用户明确要横幅、封面或宽图,使用 size=1792x1024,仍保持 quality=low。如果图片服务返回 429/过载,最多再调用 1 次工具,降低尺寸或保持 low 重试。

工具返回的 item.pathitem.markdown 是结果真相源。不要打开生成后的 PNG/JPG/WebP 文件验证,这会把二进制或 base64 塞回上下文。 不要在工具入参里选择 Provider 或模型,让 Settings 里的默认生图模型决定。用户需要切换默认生图模型时,使用 nexus-configuration;当前 authority 不允许时,引导用户到 Settings 或主智能体完成。

判断

  • 没有输入图片:默认 generate
  • 用户要求改图、局部替换、合成、mask:使用 edit
  • 用户提供图片只是做风格或构图参考:仍使用 generate,除非明确要求编辑原图。
  • 多个不同资产使用多次 generate_image 调用,每个资产一条 prompt;不要把多资产塞进一个 prompt。
  • 需求更适合 SVG、HTML/CSS、Canvas 或现有矢量源时,不用本 skill。

生成

把用户描述整理成一条不超过 600 字符的 prompt。用户描述已经具体时不要读取任何 reference。

{
  "prompt": "Nexus AI assistant promotional banner, futuristic dark blue background, glowing neural network core, large clean NEXUS text, premium technology style",
  "size": "1024x1024",
  "quality": "low",
  "output_format": "png",
  "file_name": "nexus-promo-banner"
}

编辑

{
  "image_path": "input.png",
  "mask_path": "mask.png",
  "prompt": "Make this black and white",
  "output_format": "png",
  "file_name": "edited-image"
}

调用 edit_imageimage_pathmask_path 使用 workspace 相对路径。只有路径不明确时才做一次必要的文件查找。

回复

最终回复保持极简,只给工具返回的 markdown 和路径。不要输出尺寸、大小、配色说明、过程说明或下一步建议,除非用户明确询问。

已生成:`output/imagegen/nexus-promo-banner.png`

![Nexus 宣传图](output/imagegen/nexus-promo-banner.png)

复杂任务参考

普通单图生成不要读取 references。只有复杂多资产、透明背景、强文字约束或编辑失败排查时再打开对应文件:

  • references/prompting.md
  • references/sample-prompts.md
  • scripts/remove_chroma_key.py
Files

What ships with it

3 files 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. 8d ago First seen · 95 lines · 65 tokens per session scan A f5d4a4592e46

Subscribe to this mod's changes

imagegen is a skill published in the GitHub repository nexus-research-lab/nexus (144 stars, last pushed yesterday), licensed Apache-2.0. It adds 65 tokens to every session and 886 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.