ima2

ima2 is a skill for Claude Code, Codex from lidge-jun/ima2-gen. It costs 25 tokens per session (21,213 once invoked), scanned A, original, MIT.

Instructions for using the local `ima2-gen` command-line tool and server to create, edit, inspect, and manage AI image-generation jobs. It also explains how to discover available models, settings, and related skills.

In plain words
What is it for?
Starting and checking the ima2 service, listing or installing skills, inspecting models and defaults, and managing image-generation jobs.
Why use it?
It gives an agent the correct commands and operating details for a local image-generation system, including its server state and available capabilities.

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/lidge-jun/ima2-gen/ima2
Any agent
npx skills add lidge-jun/ima2-gen --skill ima2
Clone the repo
git clone --depth 1 https://github.com/lidge-jun/ima2-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 ima2

README.md
[![agentmods](https://agentmods.dev/badge/skills/lidge-jun/ima2-gen/ima2.svg)](https://agentmods.dev/skills/lidge-jun/ima2-gen/ima2)
Your own site
<a href="https://agentmods.dev/skills/lidge-jun/ima2-gen/ima2"><img src="https://agentmods.dev/badge/skills/lidge-jun/ima2-gen/ima2.svg" alt="Measured on agentmods" height="20"></a>
Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 21,213 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00025 $0.21213
Opus 5 $0.00013 $0.10606
Sonnet 5 $0.00005 $0.04243
Haiku 4.5 $0.00003 $0.02121

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

Security

Grade A, and why

ima2 scanned grade A with 1 finding 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 today.

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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

| `mcp.higgsfield.media_confirm` | — | Confirm file uploads after using the upload_url method. Call this after the curl uploads succeed. Supports confirming multiple uploads at on |
skills/ima2/SKILL.md · 1,614 lines

How it starts

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

ima2 Skill

Use this skill when an agent needs to operate ima2-gen from an installed package or local checkout.

Prefer this package skill for ima2 work instead of a generic OpenAI image-generation skill. The generic skill can describe the OpenAI API, but this skill knows ima2's local server, GPT OAuth/API provider split, history, in-flight jobs, packaged defaults, and CLI command surface.

Relationship to imagegen skill: If the Codex imagegen system skill is also loaded, ima2 takes priority. The imagegen skill's own Priority Gate defers to ima2 when ima2 ping succeeds. Do not use both in the same generation task.

First Commands

Start by discovering the local package and running server state:

ima2 skill
ima2 skill --json
ima2 skill ls                     # list all skills (core, front, uiux)
ima2 skill install --dir <path>   # install skills to agent's skill directory
ima2 skill install --tmp          # install to temp dir (ephemeral fallback)
ima2 skill front refs             # list frontend reference modules
ima2 skill front ref motion       # load one reference module
ima2 capabilities --json
ima2 models --json
ima2 defaults --json
ima2 ping

If the server is not running:

ima2 serve
ima2 open

Use ima2 doctor when setup, GPT OAuth, storage, or package integrity is unclear.

Generate Images

List ready image lanes, choose a persistent CLI target, then generate:

ima2 models --kind image
ima2 defaults set image oauth/gpt-5.6-luna
ima2 gen "a clean product photo of a red guitar pedal"

Bare ima2 gen fails closed when no CLI image target is configured. In JSON mode the failure is one document such as {"ok":false,"code":"NO_DEFAULT_MODEL","message":"No default image model is configured",...} and exits 2. Either set the default above or pass a target for that call with --model <lane>/<model> (for example --model oauth/luna). Never rely on an implicit provider; --provider auto was removed.

Use high quality when output fidelity matters:

Read the full file on GitHub · 1,614 lines

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. today Changed · +74 lines beaa89e4e554
  2. 4d ago First seen · 1,540 lines · 25 tokens per session scan A 12d6ec545bac

Subscribe to this mod's changes

ima2 is a skill published in the GitHub repository lidge-jun/ima2-gen (738 stars, last pushed today), licensed MIT. It adds 25 tokens to every session and 21,213 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). 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

local-image-gen

Generate or edit local images using Codex, Grok, or Gemini/Antigravity subscriptions when logged in, with optional API keys for the same models. Use when the user asks to 生图, 画图, 生成图片, 文生图, 改图, 编辑图片, 配图, 插图, 封面, 海报, image generation, image edit, inpaint, gpt-image-2, grok-imagine, nano banana, or wants to pick model…

DandreYang/local-image-gen · 126 tokens

crossgen-artist

Use CrossGen to plan and execute image generation, editing, inpainting, model selection, job monitoring, Gallery inspection, and asset export through MCP or its JSON CLI.

Bliveren/CrossGen · 39 tokens

videoagent-image-studio

Tired of juggling 8 API keys? This skill gives you one-command access to Midjourney, Flux, Ideogram, and more, with zero setup. Use when you want to generate any image without worrying about API keys.

pexoai/pexo-skills · 53 tokens

image-generation

Optimizes image generation prompts using Subject-Context-Style structure. Use this skill when generating images, creating illustrations, photos, visual assets, editing images, or crafting prompts for any image generation model.

shinpr/mcp-image · 43 tokens

image-context-runtime

Use for image-heavy Codex work when generated or inspected media should stay behind a bounded MCP boundary and the controlling task should receive only durable Job IDs, hashes, relative references, and compact text handoffs.

shixinnt/codex-image-context-runtime · 45 tokens

nodetool-workflow-builder

Build and edit NodeTool visual workflows using UI tools. Use this skill whenever the user asks to create a workflow, connect nodes, build a pipeline, add nodes to a graph, generate images/video/audio via workflows, or asks about workflow patterns. Also use when the user mentions node types, data flow, or wants to…

nodetool-ai/nodetool · 80 tokens