gpt-image-2-skill — Claude Code skill: images and install
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.
npx skills add reason-machines/trending-skills --skill gpt-image-2-skill -a claude-codeWhat gpt-image-2-skill 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.
What it helps with
- 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 for the agent
- Ask the skill to create a product image from a brief and save it as
product.png. - Tell the agent to edit
photo.jpgusingsky_mask.png, changing only the masked sky. - Ask it to produce several visual variants and save them through
gpt-image.
How to install gpt-image-2-skill
1Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill gpt-image-2-skill -a claude-code2Manually: put the files in place
~/.claude/skills/gpt-image-2-skill/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/gpt-image-2-skill/
1Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill gpt-image-2-skill -a codex2Manually: put the files in place
.agents/skills/gpt-image-2-skill/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill gpt-image-2-skill -a cursor2Manually: put the files in place
.cursor/skills/gpt-image-2-skill/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install reason-machines/trending-skills gpt-image-2-skill2Manually: put the files in place
.github/skills/gpt-image-2-skill/SKILL.md1Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill gpt-image-2-skill -a gemini-cli2Platform CLI
gemini skills install https://github.com/reason-machines/trending-skills --path skills/gpt-image-2-skillManually: put the files in place
.devin/skills/gpt-image-2-skill/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill gpt-image-2-skill -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about gpt-image-2-skill
How do I install gpt-image-2-skill in Claude Code?
Run npx skills add reason-machines/trending-skills --skill gpt-image-2-skill -a claude-code. The skill file will be available at ~/.claude/skills/gpt-image-2-skill/SKILL.md.
What does gpt-image-2-skill do?
It gives an agent access to image generation and editing with gpt-image-2, including reference images, masks, and batches of outputs. The package also provides a CLI and a prompt collection.
What is required for the skill to work?
Provide an OpenAI key through OPENAI_API_KEY or ~/.env. Masked edits require an input image and a PNG mask with an alpha channel.