generate-image
Skill by davila7
Generate Image creates new images and edits existing ones using OpenRouter models such as FLUX.2 Pro and Gemini 3 Pro. It is aimed at photos, illustrations, concept art and other visuals that are not technical diagrams.
Install generate-image
Built from the published package, never by AI.
git clone --depth 1 https://github.com/davila7/claude-code-templates /tmp/claude-code-templates && mkdir -p ~/.claude/skills && cp -r /tmp/claude-code-templates/cli-tool/components/skills/scientific/generate-image ~/.claude/skills/generate-imageRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/davila7/claude-code-templates /tmp/claude-code-templates && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/claude-code-templates/cli-tool/components/skills/scientific/generate-image ~/.gemini/antigravity-cli/skills/generate-imageAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
Generate Image is a skill that creates new images from a text prompt or edits an existing image using OpenRouter's image generation models. The included scripts/generate_image.py script supports Gemini 3 Pro, FLUX.2 Pro and FLUX.2 Flex, and saves the result as a PNG file, by default generated_image.png in the current directory. You can choose a model and set the output path with command-line options.
It needs an OpenRouter API key, which the script reads from a .env file or an environment variable. The skill is meant for photos, photorealistic images, artistic illustrations, concept art and visual assets for presentations or documents. For technical diagrams, flowcharts and circuit schematics, the source directs users to the scientific-schematics skill instead. It also covers image editing, such as changing a background or removing text, using a supplied input image in PNG, JPEG, GIF or WebP format.
Written from the project's SKILL.md and checked against it.
What it can do
- Image generationCreates a new image from a text prompt using the selected model.
- Image editingEdits an existing image with written instructions when an input file is given.
- Model selectionLets the user pick Gemini 3 Pro, FLUX.2 Pro or FLUX.2 Flex with the --model option.
- Custom output pathSaves the result to a chosen file with the --output option.
- Error messagesReports missing API keys, API errors and unexpected response formats clearly.
What you need
- OpenRouter API key
- OpenRouter account at openrouter.ai/keys
- Python
- requests library
Try asking
- Generate a watercolor illustration of a mountain lake at dawn.
- Edit photo.jpg so the sky turns sunset orange.
- Create a hero image for a poster on a modern laboratory setting.
Good to know
- FLUX.2 Flex is generation only and is not as high quality as the pro models.
- Generation time varies by model, typically 5 to 30 seconds.
- Costs depend on OpenRouter pricing, which the source says to check on the OpenRouter models page.
- The default Gemini model ID includes the word preview.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: cli-tool/components/skills/scientific/generate-image/SKILL.md, cli-tool/components/skills/scientific/generate-image/scripts/generate_image.py. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md7 KB -
scripts/generate_image.py9 KB
Alternatives to generate-image
All alternatives →Keeps customer-facing CopilotKit Intelligence docs on one approved name per concept. Useful for writers, editors and reviewers of docs, nav labels, signup labels and image alt text in showcase/shell-docs.
Gets, makes and treats media for HyperFrames videos. It sources music, sound effects, images, voiceover, avatars and transcripts with HeyGen or free local tools, and applies colour grades and looks to footage.
Searches the user's uploaded photo library and connected device galleries to find, date, and describe photos. Built for personal photo requests and for cases where a photo could ground or personalize an answer.
Converts text, markdown, or another skill's summary into a listenable MP3 using local CPU-only neural text-to-speech. It rewrites the prose for listening first. Aimed at people who want audio briefings.
Gives an AI assistant the HyperFrames CLI for building, checking, previewing and rendering video projects. It suits people who make videos from HTML compositions and want the assistant to run the full workflow.
HyperFrames is an agent skill for making, editing, animating and rendering video with HyperFrames, which renders HTML to video. It is for people who want films, explainers, charts, captions and overlays built from editable HTML.
Compare with intelligence-vocabulary, media-use or media_library
generate-image: common questions
Can this skill edit existing images?
Yes. Passing an input image with --input enables edit mode, and Gemini 3 Pro and FLUX.2 Pro both support editing according to the source.
Should I use this skill for flowcharts or circuit diagrams?
No. The source says technical diagrams, flowcharts, circuits and pathways should use the scientific-schematics skill instead.
What image formats can be used as input?
The source lists PNG, JPEG, GIF and WebP as supported input formats for editing.
How do I install generate-image?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is generate-image free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is generate-image safe to use?
It scores 94 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to generate-image?
Similar skills: intelligence-vocabulary, media-use, media_library, speak-summary.
