Agent skill

Gpt Image 2

by aiskillstore in aiskillstore/marketplace

Generate images with GPT Image 2 (ChatGPT Images 2.0) inside Claude Code, using your existing ChatGPT Plus or Pro subscription — no separate OpenAI access, no per-image billing.

MITAuto-check passedMedia & Creative

Install Gpt Image 2

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

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

GitHub CLI
$ gh skill install aiskillstore/marketplace 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/aiskillstore/marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/agentspace-so/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
433
Token cost
~1.8k tokens
SKILL.md length
847 words
Files
8 (incl. scripts)
Skills in repo
1,044
Repo updated
First seen
Licence
MIT

At a glance

Generate images with GPT Image 2 (ChatGPT Images 2.0) inside Claude Code, using your existing ChatGPT Plus or Pro subscription — no separate OpenAI access, no per-image billing.

  • Works in 3 steps: codex CLI installed — brew install codex… → Logged in with a ChatGPT plan that… → python3 on PATH (ships with macOS; apt…
  • ChatGPT Images 2.0
  • SKILL.md covers When to trigger, How to invoke, Default behavior and Hard constraints, plus 5 more sections
  • Runs Python and Shell scripts from its folder; calls codex, bash and brew

What it does

Gpt Image 2 is an agent skill from aiskillstore/marketplace. Generate images with GPT Image 2 (ChatGPT Images 2.0) inside Claude Code, using your existing ChatGPT Plus or Pro subscription — no separate OpenAI access, no per-image billing. Supports text-to-image, image-to-image editing, style transfer, and multi-reference composition via the local Codex CLI. Triggers on "gpt image 2", "gpt-image-2", "ChatGPT Images 2.0", "image 2", or any explicit ask to generate or edit an image through the user's ChatGPT plan.

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 9 other files, including scripts (for example `scripts/extract_image.py`, `scripts/gen.sh` and `skill-report.json`).

It sits in Media & Creative, covering Image generation. It works with OpenAI. The repository describes itself as: Security-audited skills for Claude, Codex & Claude Code. One-click install, quality verified. The licence is MIT.

When your agent uses it

  • ChatGPT Images 2.0
  • Any explicit ask to generate
  • Edit an image through the users ChatGPT plan

Example prompts

  • “gpt image 2”
  • “gpt-image-2”
  • “ChatGPT Images 2.0”
  • “/gpt-image-2”

Requirements

  • Python 3
  • A Bash shell

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. codex CLI installed — brew install codex or see openai/codex.
  2. Logged in with a ChatGPT plan that includes Image 2 — codex login.
  3. python3 on PATH (ships with macOS; apt install python3 on Linux).

What it can do on your machine

Read from SKILL.md and the folder at commit 44923f3. 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 2 files in scripts/ (Python and Shell), which the agent can run.

    Shell commands in SKILL.md call:

    • codex
    • bash
    • brew
    • apt

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

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com
    • runcomfy.com
    • agentspace.so
    • raw.githubusercontent.com

    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 1.8k tokens when it runs. Until then it costs about 117 tokens; SKILL.md has 847 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~117
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k

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 aiskillstore/marketplace at commit 44923f3, republished under its MIT licence (© aiskillstore). 847 words, ~1,804 tokens.

Download SKILL.mdSave it as .claude/skills/gpt-image-2/SKILL.md (or your agent's skills folder). This skill also uses 7 other files; get the full folder from GitHub.
name
gpt-image-2
description
Generate images with GPT Image 2 (ChatGPT Images 2.0) inside Claude Code, using your existing ChatGPT Plus or Pro subscription — no separate OpenAI access, no per-image billing. Supports text-to-image, image-to-image editing, style transfer, and multi-reference composition via the local Codex CLI. Triggers on "gpt image 2", "gpt-image-2", "ChatGPT Images 2.0", "image 2", or any explicit ask to generate or edit an image through the user's ChatGPT plan.
displayName
🪞 GPT Image 2 — Image Generation via Your ChatGPT Subscription
emoji
🪞
homepage
https://agentspace.so
license
MIT

🪞 GPT Image 2 — Image Generation via Your ChatGPT Subscription

agentspace.so · GitHub

Generate images with GPT Image 2 (ChatGPT Images 2.0) inside your agent, using your existing ChatGPT Plus or Pro subscription — no separate OpenAI access, no Fal or Replicate tokens, no per-image billing.

Text-to-image, image-to-image editing, style transfer, and multi-reference composition. Runs entirely through the local codex CLI you're already logged into.

Heads up — this skill requires a ChatGPT Plus or Pro subscription plus the Codex CLI installed locally. If you have neither, you can use GPT Image 2 in the browser via RunComfy instead — hosted, no ChatGPT subscription or local install needed (RunComfy account required):

The rest of this document covers the local Codex CLI flow for agents whose user has a ChatGPT subscription.

Image: GPT Image 2 example — flat-color lobster repainted as a 1950s ukiyo-e woodblock print

Example output: a plain flat-color icon repainted via --ref in ukiyo-e style — composition preserved, rendering swapped, period-appropriate red seal added by the model unprompted.

When to trigger

Trigger when the user explicitly asks for GPT Image 2 via their ChatGPT subscription, for example:

  • "use GPT Image 2" / "use gpt-image-2" / "use ChatGPT Images 2.0"
  • "use Image 2" / "image 2 this"
  • attached a reference image and asked to remix / edit / restyle it

Do not auto-trigger for a plain "generate an image" request if the user didn't specify this route. If they did specify it, do not silently fall back to HTML mockups, screenshots, or a different image model.

How to invoke

A single bash script handles everything: runs codex exec with the right flags, then decodes the generated image from the persisted session rollout.

Text-to-image:

bash
bash scripts/gen.sh \
  --prompt "<user's raw prompt>" \
  --out <absolute/path/to/output.png>

Image-to-image (reference flag is repeatable for multi-reference composition):

bash
bash scripts/gen.sh \
  --prompt "<user's raw prompt, e.g. 'repaint in watercolor'>" \
  --ref /absolute/path/to/reference.png \
  --out <absolute/path/to/output.png>

Optional: --timeout-sec 300 (default 300).

Default behavior

  • Pass the user's prompt through raw. Do not translate, polish, or add style modifiers unless the user asked for it.
  • Choose the output path. Default to ./image-<YYYYMMDD-HHMMSS>.png in the current working directory if the user didn't specify.
  • Deliver the image. After the script succeeds, display / attach the output file. Do not stop at "done, see path X".
  • Text-heavy layouts are fine. Image 2 handles infographics and timeline prompts well. Do not preemptively warn just because a prompt has a lot of text.

Hard constraints

  • Do not switch routes without permission. If the user said "use GPT Image 2", do not substitute DALL·E, Midjourney, an HTML mockup, or a manual screenshot workflow.
  • Do not rewrite the prompt unless asked.
  • Do not imply this skill works without a local codex login and a valid ChatGPT subscription with image-generation entitlement.

Prerequisites

  1. codex CLI installed — brew install codex or see openai/codex.
  2. Logged in with a ChatGPT plan that includes Image 2 — codex login.
  3. python3 on PATH (ships with macOS; apt install python3 on Linux).

This skill does not grant image-generation capability on its own. It exposes the capability the user already has through their ChatGPT subscription.

Show full SKILL.md (360 more words)Show less

Exit codes

codemeaning
0success — output path printed on stdout
2bad args
3codex or python3 CLI missing
4--ref file does not exist
5codex exec failed (auth? network? model?)
6no new session file detected
7imagegen did not produce an image payload (feature not enabled, quota, or capability refused)

On failure, name the layer in one sentence instead of dumping the full stderr at the user.

How it works

The codex CLI reuses the logged-in ChatGPT session and exposes an imagegen tool (gated behind the image_generation feature flag). The script:

  1. snapshots ~/.codex/sessions/ before the run
  2. runs codex exec --enable image_generation --sandbox read-only ... (with -i <file> for each reference image)
  3. diffs the sessions directory, then invokes scripts/extract_image.py to scan every new rollout JSONL for a base64 image payload (PNG / JPEG / WebP magic-header match)
  4. decodes the largest matching blob and writes it to --out

Two non-obvious flags other wrappers get wrong on codex-cli 0.111.0+:

  • --enable image_generation is required; the feature is still under-development and off by default.
  • --ephemeral must not be used — ephemeral sessions aren't persisted, so the image payload has nowhere to live.

Data handling

The script is narrowly scoped on purpose:

  • It reads only session rollout files created by its own codex exec invocation. The sessions directory is snapshotted before the call and diffed after, so any prior ~/.codex/sessions/* files (which may contain unrelated Codex conversations) are never touched, read, or transmitted.
  • It writes only two kinds of file: the output PNG at the caller's --out path, and short-lived mktemp logs that are auto-deleted on exit via a trap.
  • No environment variables are read. No credentials are requested. No other paths under ~/.codex/ are accessed.
  • No network calls leave this skill. The only outbound traffic is the one made by the codex CLI itself (to OpenAI, using the user's existing ChatGPT login) — this skill does not add endpoints, telemetry, or callbacks.

What this skill is not

Not a direct OpenAI API client. Not a capability grant — it depends on the user's working Codex CLI login. Not a multi-tenant service (one call per invocation; concurrent calls are serialized by the filesystem-snapshot diff).

© aiskillstore, 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 7 other files (scripts) in skills/agentspace-so/gpt-image-2 of aiskillstore/marketplace.

  • SKILL.md
  • gallery/a-poster.png
  • gallery/c1-logo.png
  • gallery/c2-tshirt.png
  • gallery/d-ukiyoe.png
  • scripts/extract_image.py
  • scripts/gen.sh
  • skill-report.json

Open the folder on GitHubat commit 44923f3

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 skillaiskillstore/marketplace433—~1.8kAutomated 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
Imagegentheowenyoung/home1154 repos~4.8kAutomated safety check: PassApache-2.0
Openai Image Gentrpc-group/trpc-agent-go1.9k12 repos~843Automated safety check: PassApache-2.0
Image Generationonyx-dot-app/onyx32k1 repos~1.7kAutomated safety check: PassCustom licence

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 9 days ago
    Media & CreativeAuto-check: notes
  • Imagegen

    theowenyoung/home

    Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts.

    115 GitHub starsUsed in 4 repos~4.8k tokens
    Media & CreativeAuto-check passed
  • Openai Image Gen

    trpc-group/trpc-agent-go

    Batch-generate images via OpenAI Images API. An agent skill from trpc-group/trpc-agent-go.

    1.9k GitHub starsUsed in 12 repos~843 tokens
    Media & CreativeAuto-check passed
  • Image Generation

    onyx-dot-app/onyx

    Generate or edit raster images (photos, illustrations, textures, sprites, mockups, logos, infographics) using the workspace's configured image-generation provider via onyx-cli image.

    32k GitHub starsUsed in 1 repo~1.7k tokens
    Media & CreativeAuto-check passed
  • 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

More from aiskillstore/marketplace

All 1,044 skills in this repo
  • Code Stats

    aiskillstore/marketplace

    Analyze codebase with tokei (fast line counts by language) and difft (semantic AST-aware diffs).

    433 GitHub starsUsed in 1 repo~697 tokens
    Auto-check: notes
  • Data Processing

    aiskillstore/marketplace

    Process JSON with jq and YAML/TOML with yq. An agent skill from aiskillstore/marketplace.

    433 GitHub starsUsed in 1 repo~720 tokens
    Auto-check: notes
  • Doc Scanner

    aiskillstore/marketplace

    Scans for project documentation files (AGENTS.md, CLAUDE.md, GEMINI.md, COPILOT.md, CURSOR.md, WARP.md, and 15+ other formats) and synthesizes guidance.

    433 GitHub starsUsed in 1 repo~644 tokens
    Auto-check: notes
  • File Search

    aiskillstore/marketplace

    Modern file and content search using fd, ripgrep (rg), and fzf.

    433 GitHub starsUsed in 1 repo~598 tokens
    Auto-check: notes
  • Find Replace

    aiskillstore/marketplace

    Modern find-and-replace using sd (simpler than sed) and batch replacement patterns.

    433 GitHub starsUsed in 1 repo~527 tokens
    Auto-check: notes
  • Project Planner

    aiskillstore/marketplace

    Detects stale project plans and suggests session commands. An agent skill from aiskillstore/marketplace.

    433 GitHub starsUsed in 1 repo~504 tokens
    Auto-check passed

Works with

Questions about Gpt Image 2

What does Gpt Image 2 do?

Generate images with GPT Image 2 (ChatGPT Images 2.0) inside Claude Code, using your existing ChatGPT Plus or Pro subscription — no separate OpenAI access, no per-image billing. Gpt Image 2 is an agent skill from aiskillstore/marketplace.0) inside Claude Code, using your existing ChatGPT Plus or Pro subscription — no separate OpenAI access, no per-image billing.

When should I use Gpt Image 2?

Gpt Image 2 fits situations like: chatGPT Images 2.0; any explicit ask to generate; edit an image through the users ChatGPT plan.

How do I install Gpt Image 2 in Claude Code?

Run `npx skills add aiskillstore/marketplace --skill gpt-image-2 -a claude-code`. Or copy the skill folder (skills/agentspace-so/gpt-image-2 in aiskillstore/marketplace) 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 aiskillstore/marketplace --skill gpt-image-2 -a codex`. Or copy the skill folder (skills/agentspace-so/gpt-image-2 in aiskillstore/marketplace) 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 aiskillstore/marketplace --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 and a shell for the scripts in its folder and the command-line tools its instructions call (codex, bash, brew and apt). Our summary lists: Python 3; A Bash shell.

Does Gpt Image 2 access the network?

SKILL.md names 4 domains. As links in the text: github.com, runcomfy.com, agentspace.so and raw.githubusercontent.com. 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 (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Gpt Image 2 use?

About 1.8k tokens (SKILL.md is roughly 7.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

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), Imagegen (theowenyoung/home, 115 stars) and Openai Image Gen (trpc-group/trpc-agent-go, 1.9k 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?

aiskillstore (a GitHub organization) maintains it in aiskillstore/marketplace, which has 433 GitHub stars. The repository holds 1,044 skills in this directory. The repository was last updated on October 10, 2026.

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