generate-image
Skill4 starsChanged 54 days agoMITView on GitHub
Generate or edit raster images with OpenAI gpt-image-2.5 (default, via the OpenAI SDK) or Google Gemini 3.1 Flash Image (via OpenRouter). Use for photos, illustrations, artwork, logos, icons, mascots, and edits to existing images.
- Reads credentials
37 other projects use a version of this.
Adopted by
Most recently taken up by
- lancy69/skillstheir own version, first seen Nov 8, 2026
- oivanfelipe/claude-skillstheir own version, first seen Nov 8, 2026
- BrightGold70/skillstheir own version, first seen Nov 8, 2026
- K-Dense-AI/claude-scientific-writertheir own version, first seen Nov 7, 2026
- the-gigi/learn-claude-codetheir own version, first seen Nov 1, 2026
- MakiDevelop/claude-skillstheir own version, first seen Nov 1, 2026
Used with
Projects with it also use edit-image, scientific-slides and 6 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.
SamurAIGPTSkilledit-image
Edits an existing image using natural language instructions via MuAPI. Use when the user wants to modify, change, transform, or retouch an existing image.
Also in 3 projects that use this
ZanderRussSkillscientific-slides
Build slide decks and presentations for research talks. Use this for making PowerPoint slides, conference presentations, seminar talks, research presentations, thesis defense slides, or any scientific talk. Provides slide structure, design templates, timing guidance, and visual validation. Works with PowerPoint and LaTeX Beamer.
Also in 3 projects that use this
nicepkgSkillteam
根据任务快速组建临时 AI Agent 团队协作。自动从 .claude/agents/ 中选择最合适的成员组队。
Also in 3 projects that use this
AnthropicSkillpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions \"deck,\" \"slides,\" \"presentation,\" or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill.
Also in 5 projects that use this
AnthropicSkillpdf
Comprehensive PDF manipulation toolkit for extracting text and tables, creating new PDFs, merging/splitting documents, and handling forms. When Claude needs to fill in a PDF form or programmatically process, generate, or analyze PDF documents at scale.
Also in 4 projects that use this
SentrySkillskill-creator
Create new agent skills following the Agent Skills specification. Use when asked to "create a skill", "add a new skill", "write a skill", "make a skill", "build a skill", or scaffold a new skill with SKILL.md. Guides through requirements, writing, registration, and verification.
Also in 5 projects that use this
- +1 more from anthropics
Other versions37 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 37
- github/awesome-copilot★ 41ksame name
- K-Dense-AI/claude-scientific-writer★ 2.6ksame name
- LeonChaoX/qinyan-academic-skills★ 910same name
- OpenClaudia/openclaudia-skills★ 731same name
- ansari-project/codev★ 298same name
- cluesmith/codev★ 298same name
- Sateezg/codex-bridge★ 248same name
- DojoCodingLabs/remotion-superpowers★ 153same name
- happycapy-ai/Happycapy-skills★ 137same name
- qinyan-ai/qinyan-academic-skills★ 80same name
27 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 repository18 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- agent-browserSkill
- ai-writing-detectorSkill
- animate-svgSkill
- browserbaseSkill
- clickhouseSkill
- commitSkill
- geist-designSkill
- generate-faviconSkill
- google-indexingSkill
- google-search-consoleSkill
- google-searchSkill
- humanizerSkill
- keyword-researchSkill
- parallelSkill
- remove-backgroundSkill
- reviewSkill
- web-uiSkill
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 31 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 83
No route returns a real alpha channel (gpt-image rejects background=transparent at the API level.
“Common” is measured: kept by at least 6 in 10 of the 31 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
Generate Image
./scripts/generate_image "A red fox in autumn forest" -o fox.png
./scripts/generate_image "Make the sky purple" -i photo.jpg -o edited.pngRequirements
Routing picks the key automatically; only the one for the chosen model is needed.
OPENAI_API_KEY— forgpt-image-*(default route, OpenAI Images API via the OpenAI SDK, not OpenRouter)OPENROUTER_API_KEY— forgoogle/gemini-*(OpenRouter chat-completions)
Models
gpt-image-2.5-sunburst (default) | google/gemini-3.1-flash-image | |
| Fresh flat-vector app icons | ⚠️ raster shimmer, wobbly geometry, jaggies on downscale | ✅ best — --size 2K -r high |
| Edit existing icon (layout preserved, color swap, light/dark) | ✅ best — adheres rigidly to the reference | ✅ good |
| Wordmark logos / brand text | ✅ best, correct brand colors | ⚠️ drifts on brand colors |
| Illustrated character / mascot consistency | ⚠️ drops accent colors | ✅ best — pass the reference via -i |
| Fresh editorial illustration | ✅ richer | ⚠️ sparser |
| Extended aspects (21:9, 4:1, 1:4, 8:1, 1:8) | ⚠️ -a maps to nearest portrait/landscape; exact via --size WxH within 1:3–3:1 | ✅ honoured exactly |
| Resolution | ✅ --size WxH, multiples of 16, ≤3840/edge | ✅ --size 0.5K/1K/2K/4K |
| Quality tiers | ✅ -q auto|low|medium|high|xhigh|max | ❌ |
| Output format | ✅ --format png|jpeg|webp | ❌ PNG only |
-r/--reasoning effort | ❌ | ✅ minimal/high |
| Seed / temperature | ❌ | ✅ |
| True alpha channel | ❌ | ❌ renders opaque |
| Input image for editing | ✅ PNG/JPG/GIF/WebP | ✅ same |
gpt-image-2.5-flare is the cheaper/faster OpenAI sibling; same flags.
Routing
Fresh flat-vector icon, crisp edges? → Gemini + --size 2K -r high
Wordmark / brand-color logo? → default
Edit preserving existing layout/colors? → default
…illustrated character w/ accent colors → Gemini + -i ref
Exact extended aspect (4:1, 8:1, 1:8)? → Gemini + -a
>3840px on an edge? → Gemini + --size 4K
webp / jpeg output, or quality tier? → default + --format / -q
True transparent PNG? → chroma bg → remove-backgroundOptions
| Flag | Applies to | Notes |
prompt (positional) | both | Description, or editing instruction with -i |
-i, --input | both | Reference/source image (enables edit mode) |
-o, --output | both | Default generated_image.png |
-m, --model | both | Default gpt-image-2.5-sunburst |
-a, --aspect-ratio | both | 1:1 16:9 9:16 4:3 3:4 3:2 2:3 4:5 5:4 21:9 1:4 4:1 1:8 8:1 |
--size | both | gpt-image: WxH or auto. Gemini: 0.5K/1K/2K/4K (ignored on gpt-image) |
-q, --quality | gpt-image | auto low medium high xhigh max |
--format | gpt-image | png (default), jpeg, webp |
-t, --max-tokens | Gemini | Default 1024 |
-s, --seed, --temp | Gemini | Reproducibility / creativity |
-r, --reasoning | Gemini | minimal, high |
--api-key | both | Overrides the auto-picked key |
The output file extension does not set the format — --format does (gpt-image only);
Gemini always returns PNG bytes regardless of the filename you give -o.
Aspect → size mapping (gpt-image)
-a maps to discrete sizes: portrait ratios (9:16 2:3 3:4 4:5 1:4 1:8) → 1024x1536,
landscape (16:9 3:2 4:3 5:4 21:9 4:1 8:1) → 1536x1024, otherwise 1024x1024. For an
exact ratio pass --size WxH instead (multiples of 16, 1:3–3:1, ≤3840/edge); anything
wider than 3:1 needs Gemini.
Transparent backgrounds — chroma-key workflow
No route returns a real alpha channel (gpt-image rejects background=transparent at the
API level; Gemini renders opaque). Generate on a solid chroma color, then segment:
./scripts/generate_image "BrandName app icon on a solid magenta #FF00FF chroma-key background, no magenta anywhere in the icon itself, icon fills the frame" -o icon-chroma.png
../remove-background/scripts/remove_background icon-chroma.png -o icon.png --crop --padding 32
sips -g hasAlpha icon.png # expect hasAlpha=yesremove-background uses BiRefNet segmentation, not color keying, so any background works
— but a high-contrast non-brand chroma improves edge accuracy around thin strokes and
letterform counters. Name the hex in the prompt (models track hex better than color
names) and tell the model not to use it elsewhere.
Failure modes
| Symptom | Cause | Fix |
| Square output when you asked for wide | No -a/--size | Add -a 16:9 or --size 1536x1024 |
| Need wider than 3:1 | gpt-image caps at 1:3–3:1 | Gemini + -a 4:1 / 8:1 |
| Icon edges wobble / look like a bad SVG | gpt-image drawing fresh vector | Gemini + --size 2K -r high |
Transparent background is not supported | Asked gpt-image for alpha | Chroma-key workflow above |
Error: No image in response (Gemini) | Reasoning returned text only | Retry without -r high, or simplify |
| Wordmark text came out the wrong color | Gemini misread the accent spec | Use the default gpt-image model |
| Mascot lost its accent colors | gpt-image on an illustrated ref | Gemini, list each accent color explicitly |
| Input rejected on format | Passed an SVG to -i | Rasterize: qlmanage -t -s 1024 -o ./refs icon.svg |
OPENAI_API_KEY not found | Default model is OpenAI-routed | Set it, or -m google/gemini-3.1-flash-image |
Prompting notes
- Pass hex codes for brand colors; enumerate what to preserve on an edit ("keep the rounded-square tile, the letterform, the corner badge position") and anchor with "exactly the reference but …".
- For character consistency pass the reference via
-ion every call and list each accent color; prompt-only consistency drifts. - Pair with
remove-backgroundfor alpha.
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.

