Agent skill · Backend & API

generate-image

Generate or edit images with AI models through the OpenRouter Image API (Gemini, FLUX, Seedream, Recraft, GPT-Image). Use for photos, illustrations, artwork, concept art, visual assets, logos, and image editing or compositing from reference images. For flowcharts, circuits, pathways, and other technical diagrams, use the scientific-schematics skill instead.

K-Dense-AIgithub.com/K-Dense-AIGitHub ↗
claude-codecan modify filesships scriptsMIT
Install
npx skills add K-Dense-AI/claude-scientific-writer --skill generate-image --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 3
SKILL.md size: 8 KB
Bundled scripts: yes
Version: 2.0
Allowed tools: ReadWriteEditBash
Requires: Requires Python 3.9+ and network access to openrouter.ai. The bundled script uses only the standard library. Image…
Path: skills/generate-image/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 2,169
Language: Python
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Generate Image Generate and edit images through OpenRouter's Image API, which reaches Gemini, FLUX, Seedream, Recraft, GPT-Image, and roughly thirty other models behind one request shape. ## When to use **Use this skill for:** photos and photorealistic images, illustrations and artwork, concept art, presentation and poster visuals, logos and vector marks, image editing, and compositing from reference images. **Use `scientific-schematics` instead for:** flowcharts, circuit diagrams, biological pathways, system architecture diagrams, CONSORT diagrams, and other technical schematics. ## API key Generation requires an OpenRouter key. The script resolves it in this order: 1. `--api-key` 2. the `OPENROUTER_API_KEY` environment variable 3. `OPENROUTER_API_KEY=` in a `.env` file, searching the working directory upward If none is present the script exits with setup instructions. Keys: https://openrouter.ai/keys `--list-models` needs no key. ## Quick start ```bash # Generate python scripts/generate_image.py "A beautiful sunset over mountains" # Edit an existing image python scripts/generate_image.py "Make the sky purple" -i photo.jpg -o edited.png ``` Output defaults to `generated_image.<e

What's inside
Steps it walks through
  1. When to use
  2. API key
  3. Quick start
  4. Choosing a model
  5. Parameter support varies by model
  6. Editing and reference images
  7. Worked examples
  8. Script parameters
  9. API shape
  10. Notes and caveats
  11. Related skills
Ships with 2 files
  • references/models.md
  • scripts/generate_image.py
Commands it runs
Generate
python scripts/generate_image.py "A beautiful sunset over mountains"
Edit an existing image
python scripts/generate_image.py "Make the sky purple" -i photo.jpg -o edited.png
python scripts/generate_image.py --list-models
Single-image edit
python scripts/generate_image.py "Add sunglasses to the person" -i portrait.png
Composite several references
python scripts/generate_image.py "Blend these two styles" -i style_a.png -i style_b.jpg -o blend.png
Reference an image already on the web
More from claude-scientific-writer
All skills →
About this skill
What does the generate-image skill do?

Generate or edit images with AI models through the OpenRouter Image API (Gemini, FLUX, Seedream, Recraft, GPT-Image). Use for photos, illustrations, artwork, concept art, visual assets, logos, and image editing or compositing from reference images. For flowcharts, circuits, pathways, and other technical diagrams, use the scientific-schematics skill instead.

How do I install it?

Run `npx skills add K-Dense-AI/claude-scientific-writer --skill generate-image --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From K-Dense-AI/claude-scientific-writer, a repository with 2,169 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going