█

AI/TLDR

Buy me a coffee
Buy me a coffee

GPT-Image2-Skill

Agent skills, a CLI and a prompt gallery for OpenAI's GPT Image models

Image GenerationOpen source
Latest
v0.2.0
Updated
25 Apr 2026
Language
Python
License
MIT

What's new

v0.2.025 Apr 2026

Split the prompt gallery into category-level reference files the skill loads on demand, refreshed the README showcase and clarified Codex skill installation.

IN SHORT

What is GPT-Image2-Skill?

GPT-Image2-Skill bundles three things for working with OpenAI's GPT Image 2 and GPT Image 2.5 models: two agent skills, a command-line tool, and a large prompt gallery. The `gpt-image` skill generates and edits images, while `get-prompt-from-image` lets a vision-capable agent extract a reusable prompt from a reference picture and hand it to a generator. It sits in the Image Generation category of the Multimodal Generation tools and is open-source, written in Python and licensed MIT.

Updated Markdown version ↗

Overview

GPT-Image2-Skill bundles three things for working with OpenAI's GPT Image 2 and GPT Image 2.5 models: two agent skills, a command-line tool, and a large prompt gallery. The `gpt-image` skill generates and edits images, while `get-prompt-from-image` lets a vision-capable agent extract a reusable prompt from a reference picture and hand it to a generator. The skills install into Claude Code (as a plugin), Codex, OpenClaw, Hermes Agent and other skill-capable agent runtimes.

A labelled exploded-view technical illustration of a fictional mechanical watch called Meridian 8, with ten numbered component callouts and a specifications panel
A 2048x2048 sample the project made with gpt-image-2.5-sunburst at high quality from gallery prompt No. 113.GPT-Image2-Skill README ↗

The CLI, published from the repo as the Python package `gpt-image-cli`, exposes a `gpt-image` command. Plain prompts go to OpenAI's `/v1/images/generations` endpoint; adding one or more `-i` reference images (and an optional `-m` alpha mask) routes the call through `/v1/images/edits` for restyles, multi-image composites and inpainting. It reads `OPENAI_API_KEY` from the process environment, then `.env`, then `~/.env`, and supports the models `gpt-image-2`, `gpt-image-2.5-flare` and `gpt-image-2.5-sunburst`. When a user asks for an image without naming a model, the skill offers that menu and then always passes an explicit `--model`; the standalone CLI defaults to `gpt-image-2`.

The gallery is what the skill draws on: the README lists 163 numbered entries across 31 categories, from research-paper figures and infographics to UI mockups, posters, game art and photography, each with its prompt, size and quality settings and source credit. Inside the skill they are split into per-category reference files so an agent loads only the relevant slice instead of the whole collection. The project is MIT-licensed and written in Python 3.11+.

What it does

  • `gpt-image` agent skill that picks a model with the user, searches the bundled gallery and craft notes for a fitting prompt, then calls the packaged CLI
  • `get-prompt-from-image` skill that turns a reference image into a reusable positive prompt plus a targeted negative prompt
  • `gpt-image` CLI for text-to-image generation and reference-based editing: multiple `-i` inputs, `-m` mask inpainting, batch output with `-n`, transparent backgrounds and PNG/JPEG/WebP output
  • Size shortcuts (`1k`, `2k`, `4k`, `portrait`, `landscape` and more) and quality levels from `low` to `max`, with `xhigh` and `max` reserved for the 2.5 models
  • Prompt gallery of 163 numbered entries in 31 categories, each with size, quality and source metadata, split into per-category reference files for agents
  • Installs as a Claude Code plugin, through the Codex skill installer, with `npx skills`, by manual symlink, or as a standalone CLI via `uv`

Getting started

You need an OpenAI API key with access to the GPT Image models and, for the CLI, Python 3.11+ with `uv`. The CLI reads `OPENAI_API_KEY` from the process environment, then `.env`, then `~/.env`, without overriding a variable that is already set. The README asks you to check for an existing install before adding one.

Check what is already installed

Look for an existing CLI and API key so you don't overwrite anything.

bashbash
command -v gpt-image || true
command -v uv >/dev/null && uv tool list | grep -E '^gpt-image-cli([[:space:]]|$)' || true
test -n "${OPENAI_API_KEY:-}" && echo "OPENAI_API_KEY is already set (value hidden)"

Install the skill in Claude Code

Add the project's plugin marketplace, then install the `gpt-image` plugin.

texttext
/plugin marketplace add wuyoscar/gpt_image_2_skill
/plugin install gpt-image@wuyoscar-skills

Or install both skills into another agent runtime

The cross-agent `skills` installer works for Codex, OpenCode, OpenClaw and other supported runtimes; change `--agent` to match yours. Codex users can also run its built-in `$skill-installer` with the GitHub URL of each skill folder.

bashbash
npx --yes skills@latest add wuyoscar/gpt_image_2_skill \
  --skill gpt-image \
  --skill get-prompt-from-image \
  --agent codex --copy

Install the CLI

Run it once with `uvx`, or put `gpt-image` on your PATH as a uv tool.

bashbash
uvx --from git+https://github.com/wuyoscar/gpt_image_2_skill gpt-image --model gpt-image-2.5-flare -p "a cat astronaut"

# or install to PATH if not already installed
command -v gpt-image >/dev/null || uv tool install git+https://github.com/wuyoscar/gpt_image_2_skill

Generate an image

A plain prompt calls the generations endpoint. Start with `low` quality drafts and rerun finalists at `high`; `-f` sets the output file.

bashbash
gpt-image --model gpt-image-2.5-flare -p "a photorealistic convenience store at 10pm" --size 1k --quality high -f store.png
A photorealistic tournament chess board in mid-game with a digital clock on the left and captured pieces on the right
Input image for the edit endpoint showcase.
The same chess position restyled as a winter evening with heavy snowfall and snow dusted on the board and pieces
Output of `gpt-image -p 'Make it a winter evening with heavy snowfall…' -i chess-midgame.png`, with the board position preserved.

Edit with reference images or a mask

Any `-i` input routes the request through the edits endpoint. In a mask, opaque pixels are kept and transparent ones are regenerated.

bashbash
# Single-reference edit / restyle
gpt-image --model gpt-image-2.5-sunburst -p "Make it a winter evening with heavy snowfall" \
  -i chess.png --quality high -f chess-winter.png

# Mask-based inpaint
gpt-image --model gpt-image-2.5-sunburst -p "replace sky with aurora" \
  -i photo.jpg -m sky_mask.png -f aurora.png
A painterly illustration of a hooded young woman kneeling to touch the muzzle of a large wolfdog in a snowy city alley
An image generated from a prompt that get-prompt-from-image extracted from a contributor's reference picture.GPT-Image2-Skill README ↗

Extract a prompt from a reference image

Attach an image in your agent and invoke the second skill by slash command, `$get-prompt-from-image`, or plain language.

texttext
/get-prompt-from-image
Extract a reusable English positive prompt and a targeted negative prompt from this image, then recreate it with gpt-image.

Commands and code are distilled from the project's own documentation — always check the official repo for the latest.

When to use it

  • Ask a coding agent such as Claude Code or Codex to produce a poster, infographic or UI mockup, letting the skill pull a matching prompt from the gallery
  • Draft research-figure sketches, diagrams and paper illustrations as references, then prepare the final figure separately, as the README advises
  • Restyle, composite or inpaint existing images from the terminal with reference inputs and masks
  • Reverse-engineer the prompt behind a reference picture and regenerate it in a new variation

How GPT-Image2-Skill compares

GPT-Image2-Skill alongside other open-source image generation tools AI/TLDR tracks, ranked by GitHub stars.

ToolStarsWhat it does
Stable Diffusion web UI (AUTOMATIC1111)★ 165kA browser interface for running Stable Diffusion image generation locally with extensions and fine-grained controls.
ComfyUI★ 149kA node-based visual editor for building and running image and video generation pipelines like Stable Diffusion and FLUX locally.
Fooocus★ 54kA simplified image generation app built on Stable Diffusion that hides technical settings for easy prompting.
InvokeAI★ 29.2kA self-hosted creative tool and canvas for generating and editing images with open diffusion models.
Stability-AI generative-models★ 27.3kStability AI's official code for its Stable Diffusion family of image and video generation models.
FLUX★ 26.1kBlack Forest Labs' open-weight diffusion models and inference code for generating and editing images from text prompts.
Z-Image★ 12.2kAlibaba Tongyi's 6B-parameter open image model that produces photorealistic images quickly on a single GPU.
GPT-Image2-Skill★ 6.2kAgent skills, a CLI and a prompt gallery for OpenAI's GPT Image models