# gpt-image-2-skill

A skill and CLI for creating and editing images with OpenAI gpt-image-2. Use it for reference-based edits, masks, and batches of variants.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 315 installs · ★ 88
- Author: reason-machines
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/reason-machines/trending-skills/tree/HEAD/skills/gpt-image-2-skill/SKILL.md
- Updated: 2026-10-09
- HTML: https://affpapa.org/en/nevibecode/skills/gpt-image-2-skill

## What it does

This skill lets an agent call `gpt-image-2` for text-to-image generation, single-image edits, multi-reference compositions, and masked inpainting. It also includes a collection of 162 prompts covering interface mockups, diagrams, type-focused images, maps, photography, and product scenes.

The `gpt-image` CLI accepts a prompt plus output path, size, quality, format, and variant count. Results can be written as PNG, JPEG, or WebP. Set `OPENAI_API_KEY` in the environment or in `~/.env` before use; without that key, the call exits with a missing-key error.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill gpt-image-2-skill -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/gpt-image-2-skill/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/gpt-image-2-skill/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill gpt-image-2-skill -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/gpt-image-2-skill/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill gpt-image-2-skill -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/gpt-image-2-skill/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install reason-machines/trending-skills gpt-image-2-skill
```

2. **Manually: put the files in place**
- File: `.github/skills/gpt-image-2-skill/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill gpt-image-2-skill -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/reason-machines/trending-skills --path skills/gpt-image-2-skill
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/gpt-image-2-skill/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill gpt-image-2-skill -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/reason-machines/trending-skills/tree/HEAD/skills/gpt-image-2-skill/SKILL.md

## When to use it
- generate an image from a text brief
- restyle a scene using one or more references
- replace a selected area with a PNG mask
- save several generated variants as separate files

## Example prompts
- Ask the skill to create a product image from a brief and save it as `product.png`.
- Tell the agent to edit `photo.jpg` using `sky_mask.png`, changing only the masked sky.
- Ask it to produce several visual variants and save them through `gpt-image`.

## Similar
- [gpt-image](https://affpapa.org/en/nevibecode/skills/gpt-image.md) — skill · 12300 installs
- [gpt-image-2](https://affpapa.org/en/nevibecode/skills/gargantuax-gpt-image-2.md) — skill · 16800 installs
- [gpt-image-1-5](https://affpapa.org/en/nevibecode/skills/gpt-image-1-5.md) — skill · 615 installs
- [gpt-image-2-style-library](https://affpapa.org/en/nevibecode/skills/gpt-image-2-style-library.md) — skill · 4000 installs
- [codex-gpt-image-2-5-flare](https://affpapa.org/en/nevibecode/skills/codex-gpt-image-2-5-flare.md) — skill · 475 installs
- [scenario-gpt-image](https://affpapa.org/en/nevibecode/skills/scenario-gpt-image.md) — skill · 402 installs

From the same set: [reason-machines/trending-skills](https://affpapa.org/en/nevibecode/by/reason-machines/trending-skills.md) — 199 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
