Agent skill

Gpt Image 2

by glebis in glebis/claude-skills

Generate and edit images using OpenAI's GPT Image 2 API. An agent skill from glebis/claude-skills.

MITAuto-check passedMedia & Creative

Install Gpt Image 2

skills CLI
$ npx skills add glebis/claude-skills --skill gpt-image-2 -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install glebis/claude-skills gpt-image-2 --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/glebis/claude-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/gpt-image-2 .claude/skills/gpt-image-2 && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
gpt-image-2
GitHub stars
391
Token cost
~2.5k tokens
SKILL.md length
1,096 words
Files
9 (incl. scripts, references)
Skills in repo
92
Repo updated
First seen
Licence
MIT

At a glance

Generate and edit images using OpenAI's GPT Image 2 API. An agent skill from glebis/claude-skills.

  • Works in 10 steps: What are we making? → Style selection → Platform & sizing → …
  • Requests image generation via OpenAI/GPT Image 2
  • SKILL.md covers Interactive Flow, Carousel Workflow, Photo Edit Workflow and Cost Awareness, plus 3 more sections
  • Runs Python scripts from its folder

What it does

Gpt Image 2 is an agent skill from glebis/claude-skills. Generate and edit images using OpenAI's GPT Image 2 API. Interactive skill that guides users through image creation with style presets, cost-aware draft/final workflow, thinking mode, carousels, and photo editing. This skill should be used when the user requests image generation via OpenAI/GPT Image 2, wants to create social media carousels, edit photos into artistic styles, or needs images with readable text (infographics, diagrams, posters).

Its SKILL.md is about 2.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 11 other files, including scripts and reference files (for example `.claude-plugin/plugin.json`, `platforms.yaml` and `presets.yaml`).

It sits in Media & Creative, covering Image generation and Image editing. It works with OpenAI. The repository describes itself as: Collection of Claude Code skills for enhanced AI workflows. The licence is MIT.

When your agent uses it

  • Requests image generation via OpenAI/GPT Image 2
  • Wants to create social media carousels
  • Edit photos into artistic styles
  • Needs images with readable text (infographics

Example prompts

  • “/gpt-image-2”

Requirements

  • Python 3

Workflow steps

10 steps, taken from the step headings in SKILL.md.

  1. What are we making?
  2. Style selection
  3. Platform & sizing
  4. 5: Preflight prompt check (automatic)
  5. Draft first, then final
  6. Show result and offer next actions
  7. Story arc
  8. Style consistency
  9. Draft batch
  10. Final batch

What it can do on your machine

Read from SKILL.md and the folder at commit 3b88261. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Gpt Image 2 loads about 2.5k tokens when it runs, and up to ~130k if it reads all its reference files. Until then it costs about 115 tokens; SKILL.md has 1,096 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~115
When it runs · the whole SKILL.md, loaded when a task matches
~2.5k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~130k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from glebis/claude-skills at commit 3b88261, republished under its MIT licence (© glebis). 1,096 words, ~2,463 tokens.

Download SKILL.mdSave it as .claude/skills/gpt-image-2/SKILL.md (or your agent's skills folder). This skill also uses 8 other files; get the full folder from GitHub.
name
gpt-image-2
description
Generate and edit images using OpenAI's GPT Image 2 API. Interactive skill that guides users through image creation with style presets, cost-aware draft/final workflow, thinking mode, carousels, and photo editing. This skill should be used when the user requests image generation via OpenAI/GPT Image 2, wants to create social media carousels, edit photos into artistic styles, or needs images with readable text (infographics, diagrams, posters).

GPT Image 2 — Interactive Image Generation

Generate and edit images via OpenAI's GPT Image 2 API with an interactive, guided workflow.

Interactive Flow

When the user invokes this skill, guide them through these steps using AskUserQuestion. Do not skip steps — the interactive flow is the core experience.

Step 1: What are we making?

Ask the user what they want to create. Offer these options:

  • Single image — one image from a text prompt
  • Photo edit — transform an existing photo into a style
  • Carousel — 5-10 cohesive slides for LinkedIn/Instagram
  • Variants — multiple versions of the same concept
  • Quick generate — skip questions, just run the prompt

If the user already provided a clear prompt (e.g. "generate an editorial image of a rocket"), skip to Step 3.

Step 2: Style selection

Show the user available presets grouped by category. Read presets.yaml and present them:

Visual styles (no text in image): editorial, blueprint, ink, risograph, wireframe, constellation, brutalist, grain

Text-heavy (leverages GPT Image 2 text rendering): infographic, slide, diagram, poster, menu, manga

Community favorites: trading-card, pixar, app-mockup, isometric, action-figure, cinematic, panorama

Reference-anchored: vhs — 1980s late-night infomercial title card: scanline-striped gradient italic caps on pure black. It auto-attaches a bundled reference image (references/vhs-infomercial.png), so the look stays consistent batch-to-batch. Pass the ad copy as the subject; for multi-line copy separate lines with / (e.g. --preset vhs "THEY TRUSTED YOU / NOW / PROVE IT").

Custom — user describes their own style

Ask: "Which style? Or describe your own."

Step 3: Platform & sizing

Ask where this will be used:

  • YouTube thumbnail (1280×720)
  • Instagram square (1080×1080)
  • Slides/presentation (1920×1080)
  • Blog hero (1200×630)
  • X/Twitter (1600×900)
  • Story (1080×1920)
  • Custom size
  • No resize (use API default)

Aspect-ratio caveat: --platform does NOT change the generation size — it generates at the configured size (default 1024×1024) and resizes/stretches afterwards, which distorts non-square targets (e.g. --platform story stretches a square to 1080×1920, cropping the composition's edges). For portrait or landscape compositions, pass the API-native size directly: --size 1024x1536 (portrait) or --size 1536x1024 (landscape).

Preflight false positives: the background-conflict heuristic trips on color words applied to non-background elements (e.g. "off-white text" in a dark-background prompt reads as a second background). If the flagged conflict is spurious, re-run with --force, or rephrase ("pale gray text").

Step 3.5: Preflight prompt check (automatic)

Before any generation spend, the script now composes the final prompt first (preset + subject + style), then checks it for internal contradictions — most often a preset that hard-codes something the subject overrides (e.g. the editorial preset forces "on pure black background" while your subject asks for a warm off-white ground).

The check prefers a fast Haiku call via the llm CLI; if Haiku is unavailable (no llm, no Anthropic credit) it falls back to the configured llm default model, then to a built-in static heuristic. The resolved prompt and the verdict are printed. If a conflict is found, generation is aborted before spending — fix the prompt or preset and re-run, or override with --force (generate anyway) or --no-preflight (skip the check). This is what prevents the "generated on the wrong background, now regenerate" waste.

When composing prompts that set a background/palette, don't combine a background-fixing preset (editorial, blueprint, etc.) with a different requested background — either drop the preset and specify the full style yourself, or accept the preset's background.

Step 4: Draft first, then final

Always generate a draft first unless the user says "skip draft" or uses --draft false.

  1. Generate with --draft (quality=low, ~$0.006/image)
  2. Show the image to the user using the Read tool
  3. Ask: "Like this direction? I can: (a) generate final quality, (b) adjust the prompt, (c) try a different style, (d) regenerate with a new seed"
  4. If approved, generate final with --quality high (~$0.21/image)
  5. Use --seed from the draft to maintain composition when upgrading to final

This draft→final flow saves ~97% on iteration costs.

Step 5: Show result and offer next actions

After generation, always:

  1. Show the image using the Read tool
  2. Open it with open <path> for full-resolution preview
  3. Report the cost
  4. Offer: "Want to (a) generate variants, (b) edit this further, (c) use as reference for more images, (d) done?"
Show full SKILL.md (414 more words)Show less

When the user wants a carousel (5-10 slides):

1. Story arc

Ask: "What's the story? Give me the key message and I'll draft a 10-slide arc."

Then propose a slide-by-slide plan like:

Slide 1: [Cover] — hook headline + hero image
Slide 2: [Problem] — bold statement
Slide 3: [Context] — illustration + explanation
...
Slide 10: [CTA] — call to action with URL

Ask the user to approve or modify the plan.

2. Style consistency

Use the same preset + seed range across all slides. For carousels:

  • Pick one visual style for all slides
  • Use --seed to lock composition patterns
  • Include pagination dots in prompts (e.g., "10 small dots at bottom, third dot highlighted orange")
  • Maintain consistent color palette and typography
3. Draft batch

Generate all slides as drafts first ($0.006 × 10 = $0.06 total). Show them all to the user as a contact sheet or one by one. Ask which ones to regenerate or adjust.

4. Final batch

Only generate finals for approved slides. Offer to generate all at once with -y flag.

Photo Edit Workflow

When the user wants to transform a photo:

  1. Ask for the source image (file path or clipboard)
  2. For clipboard: save with osascript to a temp file
  3. Show available styles and ask which to try
  4. Generate a draft edit first
  5. Show result, ask if they want adjustments
  6. Generate final when approved

Use --edit <path> for the API call.

Cost Awareness

Always communicate costs before generating:

QualityPer image10-slide carousel
--draft (low)$0.006$0.06
medium$0.05$0.50
high (default)$0.21$2.10
high + thinking$0.25-0.42$2.50-4.20

Thinking mode adds 20-100% cost. Only suggest it for text-heavy or complex compositions.

The script auto-confirms when cost < $0.50. Above that, it prompts the user.

Prompt Engineering Tips

When helping users write prompts, apply these patterns:

  1. Structure: Scene → Subject → Detail → Lighting → Constraint
  2. Front-load the subject: put the main thing first
  3. For text in images: quote exact text with single quotes: 'with the headline "Hello World"'
  4. Character consistency: maintain a 5-tuple: age + appearance + hairstyle + distinctive features + clothing
  5. Style tags at end: append tags like editorial-magazine, studio-product to converge batches
  6. Use --seed for iteration: lock composition, vary only the prompt details

CLI Reference

bash
# Basic generation
scripts/gpt_image_2.py "prompt" output.png

# With preset and platform
scripts/gpt_image_2.py --preset editorial --platform square "subject" out.png

# Draft mode (~$0.006/image)
scripts/gpt_image_2.py --draft "prompt" out.png

# With thinking for complex layouts
scripts/gpt_image_2.py --thinking medium --preset diagram "OAuth flow" out.png

# Seed for reproducibility
scripts/gpt_image_2.py --seed 42 "prompt" out.png

# Edit existing photo
scripts/gpt_image_2.py --edit photo.png "transform into constellation style" out.png

# Reference-anchored preset (auto-attaches its bundled reference image)
scripts/gpt_image_2.py --preset vhs --platform youtube "THEY TRUSTED YOU / NOW / PROVE IT" ad.png

# Variants with contact sheet
scripts/gpt_image_2.py --n 4 --preset ink "mountain" out.png

# Cost estimate
scripts/gpt_image_2.py --estimate --n 10 --quality high "batch test"

# Skip confirmation
scripts/gpt_image_2.py -y --n 10 "batch" out.png

# Dry run (show prompt without API call)
scripts/gpt_image_2.py --dry-run --preset editorial "test" out.png

# Preflight runs automatically before spend; override if needed
scripts/gpt_image_2.py --force "prompt with a known conflict" out.png    # generate anyway
scripts/gpt_image_2.py --no-preflight "prompt" out.png                   # skip the check

Files

  • scripts/gpt_image_2.py — main CLI (Python, requires PyYAML)
  • presets.yaml — style presets (visual + text-heavy + community + reference-anchored). A preset may declare a reference: path (relative to the skill dir); it auto-attaches as a style anchor unless the user passes their own --reference. See the vhs preset.
  • platforms.yaml — 8 platform sizing presets
  • references/api_reference.md — full API documentation
  • references/vhs-infomercial.png — bundled style anchor for the vhs preset
  • ~/.config/gpt-image-2/config.yaml — user defaults
  • ~/.config/gpt-image-2/history.jsonl — generation log
  • ~/.config/gpt-image-2/last.json — last run (for again)

© glebis, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 8 other files (scripts, references) in gpt-image-2 of glebis/claude-skills.

  • SKILL.md
  • .claude-plugin/plugin.json
  • platforms.yaml
  • presets.yaml
  • references/api_reference.md
  • references/vhs-infomercial.png
  • screenshot.json
  • screenshot.png
  • scripts/gpt_image_2.py

Open the folder on GitHubat commit 3b88261

Compare with similar skills

Gpt Image 2 next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Gpt Image 2 compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Gpt Image 2 this skillglebis/claude-skills391—~2.5kAutomated safety check: PassMIT
AI Image Generation and Editingzhayujie/CowAgent47k—~1.3kAutomated safety check: PassMIT
GPT Image Generation CLIwuyoscar/GPT-Image2-Skill5.7k—~2.5kAutomated safety check: NotesMIT
BlockRun Image GenerationBlockRunAI/ClawRouter6.6k—~2.1kAutomated safety check: PassMIT
Codex API Image Generatoryc-duan/api-image101—~4.9kAutomated safety check: PassMIT
ImagegenJetBrains/skills3663 repos~2.5kAutomated safety check: PassApache-2.0

Similar skills

  • Generates or edits images from text prompts through a Python script that picks an image backend based on which API keys are configured.

    47k GitHub stars~1.3k tokensUpdated today
    Media & CreativeAuto-check passed
  • GPT Image Generation CLI

    wuyoscar/GPT-Image2-Skill

    Generates and edits images with GPT Image 2 or 2.5 through a packaged CLI and a prompt gallery, after settling which model fits the request.

    5.7k GitHub stars~2.5k tokensUpdated 10 days ago
    Media & CreativeAuto-check: notes
  • BlockRun Image Generation

    BlockRunAI/ClawRouter

    Generates or edits images through ClawRouter's local image API, with a choice of models and sizes and payment handled automatically through x402.

    6.6k GitHub stars~2.1k tokensUpdated 4 days ago
    Media & CreativeAuto-check passed
  • Codex API Image Generator

    yc-duan/api-image

    Replaces Codex's built-in image tool with provider-based generation and editing, fetching reference images first whenever visual accuracy actually matters.

    101 GitHub stars~4.9k tokensUpdated 5 mo ago
    Media & CreativeAuto-check passed
  • Imagegen

    JetBrains/skills

    Official

    A skill your agent uses when the user asks to generate or edit images via the OpenAI Image API (for example: generate image, edit/inpaint/mask, background removal or replacement, transparent…

    366 GitHub starsUsed in 3 repos~2.5k tokens
    Media & CreativeAuto-check passed
  • BananaTape Image Editor CLI

    NomaDamas/bananatape

    Drives the BananaTape CLI to create, launch, list and delete local AI image editing projects from an agent, including headless smoke tests.

    188 GitHub stars~547 tokensUpdated 2 mo ago
    Media & CreativeAuto-check passed

More from glebis/claude-skills

All 92 skills in this repo
  • Runs a human-first workflow for labeling PII spans in a transcript, then scores inter-annotator agreement and drafts an adjudicated gold set.

    391 GitHub stars~1.3k tokensUpdated 2 days ago
    Auto-check passed
  • Automates a dedicated, logged-in Chrome instance per profile without ever closing the user's own open tabs or browser windows.

    391 GitHub stars~973 tokensUpdated 2 days ago
    Auto-check passed
  • Deep Research

    glebis/claude-skills

    This skill should be used when conducting comprehensive research on any topic using the OpenAI Deep Research API.

    391 GitHub stars~2.6k tokensUpdated 2 days ago
    Auto-check: notes
  • Elimination Research

    glebis/claude-skills

    This skill should be used for elimination-style research where the user wants to choose from a shortlist of products, tools, services, vendors, or other options using explicit criteria, numeric…

    391 GitHub stars~1.6k tokensUpdated 2 days ago
    Auto-check passed
  • Narrated HTML Presentations

    glebis/claude-skills

    Generates a self-contained HTML presentation with article and slides modes, ElevenLabs voiceover narration and optional GPT Image 2 illustrations.

    391 GitHub stars~2.3k tokensUpdated 2 days ago
    Auto-check: notes
  • Writes fictional but realistic coaching or therapy session transcripts for evals, demos and few-shot examples, in several modalities and export formats.

    391 GitHub stars~2.9k tokensUpdated 2 days ago
    Auto-check passed

Works with

Questions about Gpt Image 2

What does Gpt Image 2 do?

Generate and edit images using OpenAI's GPT Image 2 API. An agent skill from glebis/claude-skills. Gpt Image 2 is an agent skill from glebis/claude-skills. Generate and edit images using OpenAI's GPT Image 2 API.

When should I use Gpt Image 2?

Gpt Image 2 fits situations like: requests image generation via OpenAI/GPT Image 2; wants to create social media carousels; edit photos into artistic styles; needs images with readable text (infographics.

How do I install Gpt Image 2 in Claude Code?

Run `npx skills add glebis/claude-skills --skill gpt-image-2 -a claude-code`. Or copy the skill folder (gpt-image-2 in glebis/claude-skills) into .claude/skills/gpt-image-2 in your project. Claude Code loads it when a task matches its description.

How do I install Gpt Image 2 in Codex?

Run `npx skills add glebis/claude-skills --skill gpt-image-2 -a codex`. Or copy the skill folder (gpt-image-2 in glebis/claude-skills) into .agents/skills/gpt-image-2 in your project. Codex loads it when a task matches its description.

Can I use Gpt Image 2 in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add glebis/claude-skills --skill gpt-image-2 -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/gpt-image-2, .gemini/skills/gpt-image-2, .github/skills/gpt-image-2 and .opencode/skills/gpt-image-2 in your project.

What does Gpt Image 2 need to run?

Going by SKILL.md and its folder, Gpt Image 2 needs Python for the scripts in its folder. Our summary lists: Python 3.

Does Gpt Image 2 access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Gpt Image 2 safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Gpt Image 2 use?

Gpt Image 2 is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Gpt Image 2 use?

About 2.5k tokens (SKILL.md is roughly 9.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 127k tokens, read only when the agent opens those files.

What are the alternatives to Gpt Image 2?

Skills that share tags, products or a category with Gpt Image 2: AI Image Generation and Editing (zhayujie/CowAgent, 47k stars), GPT Image Generation CLI (wuyoscar/GPT-Image2-Skill, 5.7k stars), BlockRun Image Generation (BlockRunAI/ClawRouter, 6.6k stars) and Codex API Image Generator (yc-duan/api-image, 101 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Gpt Image 2?

glebis (a GitHub user) maintains it in glebis/claude-skills, which has 391 GitHub stars. The repository holds 92 skills in this directory. The repository was last updated on October 8, 2026.

Source: glebis/claude-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.