This is a straightforward wrapper around OpenRouter's image generation APIs, specifically FLUX.2 and Gemini 3.1 Flash Image Preview. You call a Python script with a text prompt and it spits out a PNG. It handles both generation and editing if you pass an input image. The documentation is clear about when to use this versus their scientific-schematics skill, which is helpful since that's a real decision point. Setup requires an OpenRouter API key in a .env file. It's basic glue code, but sometimes that's exactly what you need when you want to generate images from the command line without writing your own base64 encoding logic.

skills.sh installs
2.1K
GitHub stars
56.6K
last updated
Aug 21, 2026

Install

$ npx -y skills add k-dense-ai/scientific-agent-skills --skill generate-image --agent claude-code

Installs into .claude/skills of the current project.

Files

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"

Sponsors

Details

Repository
github.com/k-dense-ai/scientific-agent-skills
Categories
Backend & APIs, AI & Agent Building, Design & UI/UX
First seen
Jun 3, 2026

More from k-dense-ai/scientific-agent-skills

All 137
1k-dense-ai avatarstable-baselines3k-dense-ai/scientific-agent-skillsProduction-ready reinforcement learning algorithms (PPO, SAC, DQN, TD3, DDPG, A2C) with scikit-learn-like API. Use for standard RL experiments, quick prototypin2.1Kskills.sh installs
2coinbase avatarquery-onchain-datacoinbase/agentic-wallet-skillsQuery onchain data on Base using the CDP SQL API via x402. Use when you or your user want to view onchain information about decoded blocks, transactions, and ev2.1Kskills.sh installs
3jezweb avatargoogle-apps-scriptjezweb/claude-skillsBuild Google Apps Script automation for Sheets and Workspace. Custom menus, triggers (onEdit / time-driven / form submit), dialogs, sidebars, email batches, PDF2Kskills.sh installs
4nvidia avatarphysical-ai-infrastructure-setup-and-resilient-scalingnvidia/skillsUse when the user wants to set up, scale, validate, or harden NVIDIA physical AI infrastructure for synthetic data generation workflows across local MicroK8s or2Kskills.sh installs
5alirezarezvani avatarengineering-advanced-skillsalirezarezvani/claude-skillsIndex of 37 advanced engineering agent skills for Claude Code, Codex, Gemini CLI, Cursor, OpenClaw. Use when browsing or choosing among the POWERFUL-tier engine2Kskills.sh installs
6neondatabase avatarpostgres-best-practicesneondatabase/postgres-skillsBest practices and guidelines for working with Postgres. Covers schema design, indexing strategies, query optimization, migrations, and common pitfalls. Use whe2Kskills.sh installs