generate-image
Skill0 starsChanged 9 months agoMITView on GitHub
Generate or edit images using Google's Gemini API. Use this skill when the user asks to create, generate, draw, or make an image, picture, illustration, photo, graphic, icon, logo, or visual. Also use when the user asks to edit, modify, change, or transform an existing image. Supports aspect ratios, sizes up to 4K, and image editing with an input image.
- Reads credentials
- Installs packages
44 other projects use a version of this.
Adopted by
Most recently taken up by
- Philmattt04/Claude-Skillstheir own version, first seen Nov 16, 2026
- Ivan-propio/claude-skillstheir own version, first seen Nov 16, 2026
- hayato-kishikawa/claude-code-demo-video-kittheir own version, first seen Nov 15, 2026
- GodD6366/skillstheir own version, first seen Nov 15, 2026
- AESiR-0/skillstheir own version, first seen Nov 15, 2026
- krowten/claude-media-generationtheir own version, first seen Nov 15, 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 versions44 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 44
- 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
34 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 repository4 other files it gives its agents.
- create-skillSkill
- reconSkill
- send-emailSkill
- spriteSkill
The file
We split this skill into the rules it gives an agent
7 rules. 0 are common, 1 is distinctive, and 6 are very specific to this project.
0
Common
Most of the 36 edited versions we read keep these.
1
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 53
When the user asks you to generate or edit an image:
- Very specific: line 58
If the user references an existing image file, use --input with that file path.
- Very specific: line 59
If they say "edit", "modify", "change", "update", "fix", or "transform" an image, use --input.
- Very specific: line 71
Default to 2K for most requests.
- Very specific: line 72
Use 4K if they ask for high-res, print-quality, or detailed output.
- Very specific: line 73
Use 1K for quick drafts, icons, or thumbnails.
- Very specific: line 76
If they specify a filename or location, use --output.
“Common” is measured: kept by at least 6 in 10 of the 36 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
Image Generation & Editing with Gemini
Generate or edit images by running the bundled Python script. The script uses only Python stdlib (no pip install needed). It requires the GEMINI_API_KEY environment variable.
Usage
python3 ~/.claude/skills/generate-image/scripts/generate_image.py "PROMPT" [OPTIONS]Options
| Flag | Description | Default |
--ratio RATIO | Aspect ratio: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9 | 1:1 |
--size SIZE | Resolution: 1K, 2K, 4K (4K only with default model) | 2K |
--output PATH | Output file path (auto-adds .png if needed) | Auto-generated timestamped name in cwd |
--input PATH | Input image for editing mode | None (text-to-image) |
--fast | Use gemini-2.5-flash-image (faster, cheaper, max 2K) | Off (uses gemini-3-pro-image-preview) |
--no-open | Do not open the image after generation | Off (opens by default) |
Examples
Basic generation:
python3 ~/.claude/skills/generate-image/scripts/generate_image.py "a watercolor painting of a mountain lake at sunset"With options:
python3 ~/.claude/skills/generate-image/scripts/generate_image.py "product photo of a coffee mug" --ratio 4:3 --size 4K --output mug.pngFast model:
python3 ~/.claude/skills/generate-image/scripts/generate_image.py "simple icon of a house" --fast --ratio 1:1 --size 1KImage editing:
python3 ~/.claude/skills/generate-image/scripts/generate_image.py "remove the background and replace with a beach scene" --input photo.pngInterpreting user requests
When the user asks you to generate or edit an image:
- Extract the prompt from their request. Use their description as-is when it's detailed. Enhance vague requests with reasonable artistic details.
- Detect generate vs edit mode:
- If the user references an existing image file, use
--inputwith that file path. - If they say "edit", "modify", "change", "update", "fix", or "transform" an image, use
--input. - Otherwise, it's a text-to-image generation.
- If the user references an existing image file, use
- Choose aspect ratio based on context:
- Portrait/vertical/phone/story:
9:16 - Landscape/wide/desktop/banner:
16:9 - Ultra-wide/cinematic:
21:9 - Square/social media/icon/avatar:
1:1 - Standard photo:
4:3or3:2 - Tall/poster/pin:
2:3or3:4
- Portrait/vertical/phone/story:
- Choose size:
- Default to
2Kfor most requests. - Use
4Kif they ask for high-res, print-quality, or detailed output. - Use
1Kfor quick drafts, icons, or thumbnails.
- Default to
- Choose output path:
- If they specify a filename or location, use
--output. - Otherwise let it auto-generate a timestamped filename in the current directory.
- If they specify a filename or location, use
- Run the script and report the output path and file size to the user.
- If the script fails, read the error output and explain the issue clearly. Common fixes:
- Missing API key: tell them to set GEMINI_API_KEY
- Safety filter: suggest rephrasing the prompt
- Rate limit: suggest waiting or using --fast
Environment setup
The GEMINI_API_KEY environment variable must be set. If missing, the script exits with setup instructions.
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.

