Back to Skills

gpt-image-2

Full OpenAI-compatible GPT Image 2 coverage across images/generations, images/edits, and responses with the image_generation tool. Use when the one-shot image helper is not enough - text-to-image, mask edits, multi-image batches, streaming, partial_images, and mixed text+image Responses flows. Reads .env and respects process environment variables; works with any OpenAI-compatible gateway.

2starsUpdated 5/8/2026

Security Assessment

Medium Risk(50/100)

Detected risks:

Secret Exposure([README.md] API_KEY=, [README.md] API_KEY =, [references/config.md] API_KEY=)
Sensitive File Access([README.md] .env, [SKILL.md] .env, [references/config.md] .env)
Security Score50/100

About gpt-image-2

gpt-image-2 is a reusable AI skill focused on a specific workflow. description: Full OpenAI-compatible GPT Image 2 coverage across images/generations, images/edits, and responses with the image_generation tool. Use when the one-shot image helper is not enough - text-to-image, mask edits, multi-image batches, streaming, partial_images, and mixed text+image Responses flows. Reads .env and respects process environment variables; works with any OpenAI-compatible gateway.

The skill packages instructions, conventions, and task-specific guidance so an agent can execute the job more consistently. A single Python entrypoint that covers every GPT Image 2 route, with strict pre-flight validation of the model's size, aspect, and feature constraints. 1. Open [references/config.md](./references/config.md) to pick environment variables and defaults. 2. Open [references/api-surface.md](./references/api-surface.md) to choose between `generations`, `edits`, and `responses`.

In practice, this skill is best suited for users who need repeatable execution with fewer setup steps and less ambiguity. 3. Prefer `OPENAI_BASE_URL=https://api.openai.com/v1` unless the user asks for a different OpenAI-compatible endpoint. 4. Use `gpt-image-2` for `generations` and `edits`; use a text-capable Responses model such as `gpt-5.4` for `responses`. 5. Run `scripts/gpt_image.py` with one of the three subcommands. 6. Add `--dry-run` first when the payload shape is the main risk.

FAQ

What does gpt-image-2 help with?

gpt-image-2 helps agents follow a focused workflow described in the source documentation, reducing ambiguity and keeping execution aligned with the intended task.

When should this skill be used?

Use it when the task matches the workflow, domain, or operating rules described in the skill documentation, especially when consistent execution matters.

What are the main limitations?

The skill is constrained by the quality and scope of its source instructions. If the underlying documentation is incomplete, the agent may still need extra context or manual validation.

All Files

7 files
README.md5.9 KB
View
agents/openai.yaml0.2 KB
View
SKILL.md4.2 KB
View
tests/test_gpt_image.py4.6 KB
View
references/config.md2.8 KB
View
references/api-surface.md2.4 KB
View
scripts/gpt_image.py32.9 KB
View

Install gpt-image-2

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill