imagegen

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

2|Updated Aug 15, 2026
One-click install
npx skills add https://github.com/Jensen-Yao/agents-skills --skill imagegen-jensen-yao
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: imagegen
Source: https://github.com/Jensen-Yao/agents-skills/tree/main/skills/imagegen
Command: npx skills add https://github.com/Jensen-Yao/agents-skills --skill imagegen-jensen-yao

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 design tools or manual API scripting; this Skill gives the agent a governed workflow for generating and editing images with the right tool, model, and output path. ## Core Features & Use Cases - Dual-mode generation and editing: Uses the built-in image_gen tool by default, with a guarded scripts/image_gen.py CLI fallback supporting generate, edit, and generate-batch subcommands against GPT Image models. - Transparent-background workflow: Generates subjects on a flat chroma-key background and removes it locally with remove_chroma_key.py, escalating to gpt-image-1.5 --background transparent only after explicit user confirmation. - Structured prompt engineering: Classifies requests into a use-case taxonomy (product-mockup, ui-mockup, photorealistic-natural, precise-object-edit, etc.) and normalizes prompts into a labeled production spec. - Use Case: A user asks for a landing-page hero image of a ceramic mug; the Skill classifies it as product-mockup, builds a structured prompt, generates it with the built-in tool, and copies the final asset into the project workspace. ## Quick Start Ask the agent to generate a product photo of your item on a clean background and save it into your project's assets folder.

Frequently Asked Questions about imagegen

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

FAQPage Schema
How do I generate images with the built-in image_gen tool?▼

Describe the image you want and the agent uses the built-in image_gen tool by default, no API key required. The Skill structures your prompt with scene, subject, style, and constraints, then saves project-bound outputs into the workspace.

How do I create an image with a transparent background?▼

The default path generates the subject on a flat chroma-key background (usually #00ff00) and removes it locally with remove_chroma_key.py to produce an alpha PNG. True native transparency requires the CLI fallback with gpt-image-1.5, which the agent asks about before using.

When should I use the image_gen.py CLI fallback instead of the built-in tool?▼

Use the CLI only when you explicitly ask for CLI/API/model controls or confirm a true-transparency fallback. It requires OPENAI_API_KEY and exposes generate, edit, and generate-batch subcommands with quality, size, mask, and output-format flags.

Does gpt-image-2 support transparent backgrounds?▼

No, gpt-image-2 does not support background=transparent. The Skill defaults to chroma-key generation plus local removal, and only switches to gpt-image-1.5 with --background transparent after you explicitly confirm that fallback.

What image sizes does gpt-image-2 support?▼

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

When should I not use AI image generation for a visual asset?▼

Avoid it when extending an existing SVG/vector icon or logo system, building simple shapes or diagrams better done in HTML/CSS/canvas, or editing an asset that already exists in an editable native format. The Skill targets bitmap output, not code-native visuals.