Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

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.

  • Score 94
  • 34k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

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-image

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install generate-image in Claude Code

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

A

No 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 →

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.

generate-image Install

Add to stack

Loading.