gpt-image-2
Skill387 starsChanged 5 months agoMITView on GitHub
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).
14 other projects use a version of this.
Adopted by
Most recently taken up by
- AceDataCloud/Skillstheir own version, first seen Oct 5, 2026
- JustinPerea/nebula-nodestheir own version, first seen Sep 12, 2026
- Linearl/reasonix_skill_repotheir own version, first seen Aug 28, 2026
- genmedia-labs/skillstheir own version, first seen Aug 12, 2026
- pilioai/skillstheir own version, first seen Jul 26, 2026
- runapi-ai/gpt-image-2their own version, first seen Jul 19, 2026
Used with
Projects with it also use image-inpainting, ace-step and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
prime-skillsSkillimage-inpainting
Mask-driven image inpainting on RunComfy via the `runcomfy` CLI. Routes to Tongyi MAI Z-Image Turbo Inpainting (the dedicated inpainting endpoint with mask, strength, and control-scale) and to identity-preserving edit models (Nano Banana 2 Edit, GPT Image 2 Edit, FLUX Kontext Pro) when a mask isn't available and the region must be described instead. Use for object removal, watermark removal, region replacement, blemish cleanup, and any controlled local edit where a binary mask defines the target area. Triggers on "inpaint", "inpainting", "image inpaint", "remove from image", "fill region", "mask-driven edit", "remove watermark", "remove object", "patch the photo", "fill the hole", or any explicit ask to edit a specific masked region of a still.
Also in 4 projects that use this
prime-skillsSkillace-step
Generate, inpaint, and outpaint music with ACE Step on RunComfy via the `runcomfy` CLI. ACE Step is StepFun-AI's open-weights music foundation model — tag-driven composition (genre, mood, instruments), multilingual lyrics with section markers, 5 s to 4 min stereo output, $0.0002–0.0003 per second (≈ 27× cheaper than ElevenLabs Music). Four endpoints: ACE Step text-to-audio (the default), ACE Step 1.5 text-to-audio (50+ language lyrics, refined structured-lyric handling), ACE Step audio-inpaint (regenerate a time range inside an existing track), ACE Step audio-outpaint (extend an existing track before or after). Triggers on "ace step", "ace-step", "acestep", "ACE music", "open music model", "cheap AI music", "inpaint audio", "audio inpaint", "extend music", "audio outpaint", "lengthen track", "music with tags", or any explicit ask to generate or edit music with ACE Step.
Also in 3 projects that use this
- +10 more from prime-skills
Other versions14 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 14
- ConardLi/garden-skills★ 13ksame name
- jiangmuran/claude-image★ 86same name
- robonuggets/gpt-image-2-skill★ 72same name
- prime-skills/runcomfy-agent-skills★ 52same name
- pilioai/skills★ 43same name
- genmedia-labs/skills★ 26same name
- JustinPerea/nebula-nodes★ 18same name
- AceDataCloud/Skills★ 17same name
- agentspace-so/agent-skills★ 16same name
- runcomfy-com/skills★ 15same name
4 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository104 other files it gives its agents.
- automation-advisor/CLAUDE.mdCLAUDE.md
- agency-docs-updaterSkill
- agency-meetup-publishSkill
- agency-socialsSkill
- agent-cliSkill
- app-releaseSkill
- automation-advisorSkill
- balancedSkill
- brand-agencySkill
- browser-mateSkill
- browsing-historySkill
- chrome-historySkill
- coaching-session-summarizerSkill
- codexSkill
- cognitive-toolkitSkill
- context-builderSkill
- cull-release-checkSkill
- cull-release-prepareSkill
- cull-release-publishSkill
- cull-release-recoverSkill
- cull-releaseSkill
- cull-release-verifySkill
- cullSkill
- daydreamSkill
- decision-toolkitSkill
- deep-researchSkill
- design-tokensSkill
- doctorgSkill
- ecosystemSkill
- elevenlabs-ttsSkill
- elimination-researchSkill
- fathomSkill
- feature-factorySkill
- firecrawl-researchSkill
- font-featuresSkill
- github-gistSkill
- gmailSkill
- google-image-searchSkill
- granolaSkill
- gwsSkill
- health-dataSkill
- i18n-studioSkill
- init-tauri-appSkill
- init-xcode-appSkill
- insight-extractorSkill
- jtbdSkill
- lab-retroSkill
- learning-vaultSkill
- linearSkill
- llm-cliSkill
- local-modelsSkill
- meeting-prepSkill
- meeting-processorSkill
- metaSkill
- name-auditionSkill
- nano-bananaSkill
- nielsen-heuristicsSkill
- pdf-generationSkill
- peer-agent-collaborationSkill
- presentation-generatorSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
23 rules. 0 are common, 17 are distinctive, and 6 are very specific to this project.
0
Common
Most of the 11 edited versions we read keep these.
17
Distinctive
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
When the user invokes this skill, guide them through these steps using AskUserQuestion.
- Distinctive: line 16
Ask the user what they want to create.
- Distinctive: line 24
If the user already provided a clear prompt (e.g.
- Distinctive: line 44
Ask: "Which style? Or describe your own."
- Distinctive: line 48
Ask where this will be used:
- Distinctive: line 56
No resize (use API default)
- Distinctive: line 64
Before any generation spend, the script now composes the final prompt first (preset + subject + style), then checks it for internal …
- Very specific: line 76
When composing prompts that set a background/palette, don't combine a background-fixing preset (editorial, blueprint, etc.) with a …
- Distinctive: line 86
Ask: "Like this direction?
- Very specific: line 87
If approved, generate final with --quality high (~$0.21/image)
- Very specific: line 88
Use --seed from the draft to maintain composition when upgrading to final
- Distinctive: line 102
When the user wants a carousel (5-10 slides):
- Distinctive: line 105
Ask: "What's the story? Give me the key message and I'll draft a 10-slide arc."
- Distinctive: line 116
Ask the user to approve or modify the plan.
- Distinctive: line 119
Use the same preset + seed range across all slides.
- Very specific: line 121
Use --seed to lock composition patterns
- Very specific: line 129
Only generate finals for approved slides.
- Distinctive: line 133
When the user wants to transform a photo:
- Distinctive: line 135
Ask for the source image (file path or clipboard)
- Very specific: line 142
Use --edit <path> for the API call.
- Distinctive: line 146
Always communicate costs before generating:
- Distinctive: line 161
When helping users write prompts, apply these patterns:
- Distinctive: line 164
Front-load the subject: put the main thing first
“Common” is measured: kept by at least 6 in 10 of the 11 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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.
- Generate with
--draft(quality=low, ~$0.006/image) - Show the image to the user using the Read tool
- 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"
- If approved, generate final with
--quality high(~$0.21/image) - Use
--seedfrom 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:
- Show the image using the Read tool
- Open it with
open <path>for full-resolution preview - Report the cost
- Offer: "Want to (a) generate variants, (b) edit this further, (c) use as reference for more images, (d) done?"
Carousel Workflow
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 URLAsk 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
--seedto 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:
- Ask for the source image (file path or clipboard)
- For clipboard: save with
osascriptto a temp file - Show available styles and ask which to try
- Generate a draft edit first
- Show result, ask if they want adjustments
- Generate final when approved
Use --edit <path> for the API call.
Cost Awareness
Always communicate costs before generating:
| Quality | Per image | 10-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:
- Structure: Scene → Subject → Detail → Lighting → Constraint
- Front-load the subject: put the main thing first
- For text in images: quote exact text with single quotes:
'with the headline "Hello World"' - Character consistency: maintain a 5-tuple: age + appearance + hairstyle + distinctive features + clothing
- Style tags at end: append tags like
editorial-magazine,studio-productto converge batches - Use
--seedfor iteration: lock composition, vary only the prompt details
CLI Reference
# 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 checkFiles
scripts/gpt_image_2.py— main CLI (Python, requires PyYAML)presets.yaml— style presets (visual + text-heavy + community + reference-anchored). A preset may declare areference:path (relative to the skill dir); it auto-attaches as a style anchor unless the user passes their own--reference. See thevhspreset.platforms.yaml— 8 platform sizing presetsreferences/api_reference.md— full API documentationreferences/vhs-infomercial.png— bundled style anchor for thevhspreset~/.config/gpt-image-2/config.yaml— user defaults~/.config/gpt-image-2/history.jsonl— generation log~/.config/gpt-image-2/last.json— last run (foragain)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

