imagegen

Generate and edit raster images using built-in image tools or a GPT Image CLI fallback.

1|Updated Aug 1, 2026
One-click install
npx skills add https://github.com/xlnn/modelmux-vscode --skill imagegen-xlnn
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: imagegen
Source: https://github.com/xlnn/modelmux-vscode/tree/main/.tmp-codex-home4/skills/.system/imagegen
Command: npx skills add https://github.com/xlnn/modelmux-vscode --skill imagegen-xlnn

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires openai, pillow, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve? Creating bitmap assets like photos, illustrations, sprites, mockups, and transparent cutouts normally requires manual design work or ad-hoc API scripting; this Skill provides a structured workflow for generating and editing images directly within a project. ## Core Features & Use Cases - Built-in generation and editing: Uses the built-in image_gen tool by default for new images, edits, and simple transparent-background requests via chroma-key removal. - CLI fallback mode: A bundled Python CLI (scripts/image_gen.py) supports generate, edit, and generate-batch subcommands with explicit control over model, quality, size, masks, and output paths. - Prompt engineering guidance: Shared prompt schemas, use-case taxonomy, and copy-paste recipes ensure consistent, production-quality image prompts. - Use Case: Generate a landing-page hero image of a product, remove its background for a transparent cutout, and save the final PNG into the project workspace. ## Quick Start Ask the assistant to generate a hero image of your product on a flat green background and save the final transparent PNG into the project workspace.

Frequently Asked Questions about imagegen

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate an image with a transparent background?

Generate the subject on a flat chroma-key background (default #00ff00) with the built-in image_gen tool, then run the remove_chroma_key.py helper to convert the key color to alpha. For complex subjects like hair or glass, true transparency requires the CLI fallback with gpt-image-1.5 and background=transparent.

How do I batch generate multiple images from prompts?

In the default path, issue one built-in image_gen call per asset. In CLI fallback mode, create a JSONL file with one prompt object per line and run the generate-batch subcommand with --out-dir and optional --concurrency settings.

Does the image generation CLI require an API key?

The built-in image_gen tool does not require OPENAI_API_KEY. The fallback CLI scripts/image_gen.py requires OPENAI_API_KEY set as an environment variable for live API calls, though --dry-run works without it.

What image sizes does gpt-image-2 support?

gpt-image-2 accepts auto or any WIDTHxHEIGHT where edges are multiples of 16, max edge is 3840px, aspect ratio is at most 3:1, and total pixels fall between 655,360 and 8,294,400. Popular sizes include 1024x1024, 1536x1024, and 3840x2160.

When should I not use AI image generation for assets?

Avoid it when extending an existing SVG or vector icon system, creating simple diagrams better done in HTML/CSS/canvas, or editing assets that already exist in an editable native format. It targets bitmap output, not code-native visuals.