generate-image

generate-image is a skill for Claude Code from K-Dense-AI/scientific-agent-skills. It costs 82 tokens per session (4,429 once invoked), scanned A, original, MIT.

An image-generation and editing workflow that sends requests to AI image models through OpenRouter, a service that provides access to multiple models through one interface. It is intended for visual artwork and image assets, not technical diagrams.

In plain words
What is it for?
Use it to create or edit photos, illustrations, artwork, concept art, posters, logos, and composited images from reference pictures.
Why use it?
It removes the need to build every visual asset by hand and provides one workflow for creating new images or modifying existing ones. An OpenRouter API key is needed for generation.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: positional $N argument; built for openclaw.

Good fit Use it to create or edit photos, illustrations, artwork, concept art, posters, logos, and composited images from reference pictures.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/k-dense-ai/scientific-agent-skills/generate-image
About the project

Scientific Agent Skills is a collection of reusable procedures that give AI agents capabilities for scientific research across areas such as biology, chemistry, medicine, and drug discovery. It is used by researchers and by people building AI scientist workflows with compatible coding agents. The catalogue contains many of the project's skills and supporting instructions.

K-Dense-AI/scientific-agent-skills · 58,946 stars · on GitHub · arxiv.org

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add K-Dense-AI/scientific-agent-skills --skill generate-image
Clone the repo
git clone --depth 1 https://github.com/K-Dense-AI/scientific-agent-skills

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for generate-image

README.md
[![agentmods](https://agentmods.dev/badge/skills/k-dense-ai/scientific-agent-skills/generate-image/github.svg)](https://agentmods.dev/skills/k-dense-ai/scientific-agent-skills/generate-image)
Your own site
<a href="https://agentmods.dev/skills/k-dense-ai/scientific-agent-skills/generate-image"><img src="https://agentmods.dev/badge/skills/k-dense-ai/scientific-agent-skills/generate-image/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for generate-image

Your own site · 80×15
<a href="https://agentmods.dev/skills/k-dense-ai/scientific-agent-skills/generate-image"><img src="https://agentmods.dev/badge/skills/k-dense-ai/scientific-agent-skills/generate-image.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 82 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,429 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 1 Oct 2026
  • Snyk warn 1 Oct 2026
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Data Exfiltration · line 229
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00082 $0.04429
Opus 5.5 $0.00033 $0.01772
Sonnet 5.5 $0.00016 $0.00886
Haiku 4.5 $0.00008 $0.00443

Measured 1mo ago against content hash 42438be890c5, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

generate-image scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/generate_image.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s https://openrouter.ai/api/v1/images \
Origin

Copies of this mod

2 near-identical copies found in the catalogue:

skills/generate-image/SKILL.md · 340 lines

How it starts

The opening of the file, as written. The whole thing — 340 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Generate Image

Generate and edit images through OpenRouter's Image API, which reaches Gemini, Seedream, Recraft, GPT-Image, Riverflow, and 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, then the script's own directory

If none is present the script exits with setup instructions. Keys: https://openrouter.ai/keys

--list-models, --model-info, and --dry-run need no key.

Quick start

# 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

Run these commands from the skill directory; input and output paths resolve from the working directory. Output defaults to generated_image.<ext>, using each image's returned media type (or .bin when unknown). An explicit output suffix is kept, with a warning on mismatch; the script does not transcode. OpenRouter and upstream costs are printed separately when supplied.

Then look at the image. Read the file back and check it before using it anywhere: composition, aspect ratio, and any text are all things models get wrong silently.

Choosing a model

Default: google/gemini-3.1-flash-image.

Need Model
General quality, prompt adherence google/gemini-3.1-flash-image
Highest Gemini tier google/gemini-3-pro-image
Cheap iteration google/gemini-3.1-flash-lite-image (1K only), openai/gpt-image-1-mini
Photoreal control, seeded generation bytedance-seed/seedream-4.5
Several images per request bytedance-seed/seedream-4.5, openai/gpt-image-2 (up to 10)
Vector / SVG output recraft/recraft-v4.1-vector
Transparent background openai/gpt-image-1 with --background transparent
Legible text inside the image recraft/recraft-v4.1, sourceful/riverflow-v2.5-pro — see the caveat below

Read the full file on GitHub · 340 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed · +16 lines · +1 tokens per session 42438be890c5
  2. 2mo ago Changed · +2 lines 97a1b0783718
  3. 2mo ago Changed · +17 lines d765aed1c1fd
  4. 3mo ago First seen · 305 lines · 81 tokens per session scan A ecb4d409924e

Subscribe to this mod's changes

generate-image is a skill published in the GitHub repository K-Dense-AI/scientific-agent-skills (58,946 stars, last pushed 7d ago), licensed MIT. It adds 82 tokens to every session and 4,429 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

generate-image compared with skills from other repositories

generate-image next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
generate-imageK-Dense-AI/scientific-agent-skillsSkill59k7d agoMITA82Claude Code
discovery-toolboxdekan-aleksandr/biodiscovery-skillsSkill113mo agoMITA122Claude Code
discovery-directordekan-aleksandr/biodiscovery-skillsSkill113mo agoMITA114Claude Code
create-video-seedance-2-falgooseworks-ai/goose-skillsSkill1.3k2d agoMITA121Claude Code, Codex
meta-ad-managergooseworks-ai/goose-skillsSkill1.3k2d agoMITA108Codex
run-memorygooseworks-ai/goose-skillsSkill1.3k2d agoMITA72Claude Code, Codex
render-imessage-chatgooseworks-ai/goose-skillsSkill1.3k2d agoMITA63Claude Code, Codex