# GPT Image Generation

Generates and edits images with GPT Image models, including posters and inpainting.

- Repository: https://github.com/wuyoscar/GPT-Image2-Skill (5972 stars)
- Category: Media
- License: MIT
- Last updated: 2026-09-30
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add wuyoscar/GPT-Image2-Skill --skill gpt-image -g -a claude-code -y`
Codex: `npx skills add wuyoscar/GPT-Image2-Skill --skill gpt-image -g -a codex -y`
Cursor: `npx skills add wuyoscar/GPT-Image2-Skill --skill gpt-image -g -a cursor -y`
Gemini CLI: `npx skills add wuyoscar/GPT-Image2-Skill --skill gpt-image -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add wuyoscar/GPT-Image2-Skill`

## Description

Generate or edit images with GPT Image 2 or 2.5 through the packaged CLI and Reference Gallery. Use for image requests including imprecise 'GPT 2.5' model names, posters, typography, reference edits, and inpainting; resolve the model choice before generation.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# gpt-image

Agent runbook for GPT Image 2 / 2.5 generation/editing. Use the prompt library + packaged CLI. Do not reimplement image API code.

## Operating loop

1. **Classify request and resolve model**: `generate`, `edit`, `inpaint`, or `multi-reference`; identify asset type, exact text, aspect ratio, references, safety constraints, and budget/quality. Apply the model-choice rules below before any API call.
2. **Choose the reference path**: Image 2 keeps the gallery-first workflow below. For 2.5, a precise brief needs no reference loading; otherwise choose one short task slice.
3. **Refine only as needed**: preserve the brief. Add a specific gallery case, craft section or template only to fill a concrete gap; do not load them as a bundle for 2.5.
4. **Confer when useful**: before costly/ambiguous/high-polish calls, present 1, 3 matched directions plus planned size/quality; ask at most one concise question at a time. Skip long discussion for precise “generate now” requests with a resolved model.
5. **Preflight, no side effects**: use existing CLI/skill if present. Check command availability (`command -v gpt-image`), installed tool lists when the tool manager exists, or the runtime’s own skill registry when available. Do not assume a local home path in cloud/hosted runtimes.
6. **No blind setup**: do not reinstall, overwrite skill folders, create/modify `.env`, or write API keys unless the user explicitly requested setup. Global/shared installs are opt-in only.
7. **Execute via CLI only**: call `gpt-image` or `scripts/generate.py` with an explicit `--model`. Do not create a new `generate.py`, SDK wrapper, or ad-hoc script for normal image requests.
8. **Report**: output file path(s), key flags, and one concise refinement suggestion if useful.

Fast path: confirmed 2.5 model + precise prompt + “generate now” → preflight and CLI, without a mandatory reference/craft pass. Do not reconfirm an exact valid model.

## Model choice and prompt adaptation

The rest: https://github.com/wuyoscar/GPT-Image2-Skill/blob/HEAD/skills/gpt-image/SKILL.md
