image-gen

image-gen is a skill for Claude Code, Codex from EverMind-AI/Raven. It costs 48 tokens per session (1,329 once invoked), scanned A, original, Apache-2.0.

An image-generation skill that creates pictures from text prompts, optionally using input images. It calls Google’s Nano Banana image models through OpenRouter, a service that provides access to AI models through an API.

In plain words
What is it for?
Use it when someone asks for a drawing, illustration, rendered scene, picture, or diagram, with or without one or more reference images.
Why use it?
Creating an illustration, diagram, or scene manually can take time and require separate design tools. This gives the coding agent a defined way to request generated images.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

Good fit Use it when someone asks for a drawing, illustration, rendered scene, picture, or diagram, with or without one or more reference images.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/evermind-ai/raven/image-gen
About the project

Raven is an open-source agent harness for running long-term AI work with terminal execution, tracing, memory, skills, evaluation, and reusable workflows. People use the current release to operate and improve persistent AI workflows, while its described future direction is a multi-agent system that combines specialized harnesses.

EverMind-AI/Raven · 6,366 stars · on GitHub · raven.evermind.ai

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 EverMind-AI/Raven --skill image-gen
Clone the repo
git clone --depth 1 https://github.com/EverMind-AI/Raven

Made for: Claude Code, Codex.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/evermind-ai/raven/image-gen/github.svg)](https://agentmods.dev/skills/evermind-ai/raven/image-gen)
Your own site
<a href="https://agentmods.dev/skills/evermind-ai/raven/image-gen"><img src="https://agentmods.dev/badge/skills/evermind-ai/raven/image-gen/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 image-gen

Your own site · 80×15
<a href="https://agentmods.dev/skills/evermind-ai/raven/image-gen"><img src="https://agentmods.dev/badge/skills/evermind-ai/raven/image-gen.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,329 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
  • NVIDIA SkillSpector pass 7 Sept 2026
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.00048 $0.01329
Opus 5.5 $0.00019 $0.00532
Sonnet 5.5 $0.00010 $0.00266
Haiku 4.5 $0.00005 $0.00133

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

Security

Grade A, and why

image-gen 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 3mo ago.

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.

import os, base64, json, urllib.request
demos/skill_retrieval/skills/image-gen/SKILL.md · 152 lines

How it starts

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

image-gen — Nano Banana via OpenRouter

Generates one or more images from a text prompt (and optionally one or more input images) by calling Google's Nano Banana family on OpenRouter:

  • google/gemini-2.5-flash-image — original (Nano Banana)
  • google/gemini-3.1-flash-image-preview — latest (Nano Banana 2)

OpenRouter speaks the OpenAI-compatible chat-completions API for these models, with two extras:

  1. The request must include "modalities": ["image", "text"] so the server knows to return image bytes, not just a description.
  2. The response carries images in a top-level message.images array (NOT in content — that field still holds optional commentary text).

Quick recipe

import os, base64, json, urllib.request

KEY = os.environ["OPENROUTER_API_KEY"]
MODEL = "google/gemini-2.5-flash-image"   # or 3.1 for "Nano Banana 2"

def generate_image(prompt: str, out_path: str = "out.png") -> str:
    req = urllib.request.Request(
        "https://openrouter.ai/api/v1/chat/completions",
        data=json.dumps({
            "model": MODEL,
            "messages": [{"role": "user", "content": prompt}],
            "modalities": ["image", "text"],
        }).encode(),
        headers={
            "Authorization": f"Bearer {KEY}",
            "Content-Type": "application/json",
        },
        method="POST",
    )
    with urllib.request.urlopen(req, timeout=120) as resp:
        data = json.loads(resp.read())

    msg = data["choices"][0]["message"]
    # ``message.images[i].image_url.url`` is a data URI:
    #   "data:image/png;base64,<base64-bytes>"
    url = msg["images"][0]["image_url"]["url"]
    b64 = url.split(",", 1)[1]
    with open(out_path, "wb") as f:
        f.write(base64.b64decode(b64))

    text_note = msg.get("content") or ""
    return f"Wrote {out_path} ({len(b64)//1024} KB). Model said: {text_note[:200]!r}"

Request shape (full)

{
  "model": "google/gemini-2.5-flash-image",
  "messages": [
    {"role": "user", "content": "A red circle on white background"}
  ],
  "modalities": ["image", "text"]
}

Read the full file on GitHub · 152 lines

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. 3mo ago First seen · 152 lines · 48 tokens per session scan A 29cdb27e062d

Subscribe to this mod's changes

image-gen is a skill published in the GitHub repository EverMind-AI/Raven (6,366 stars, last pushed today), licensed Apache-2.0. It adds 48 tokens to every session and 1,329 once invoked, about $0.0002 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

image-gen compared with skills from other repositories

image-gen next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
image-genEverMind-AI/RavenSkill6.4ktodayApache-2.0A48Claude Code, Codex
dcf-modelNousResearch/hermes-agentSkill267ktodayMITA14Claude Code, Codex
comps-analysisNousResearch/hermes-agentSkill267ktodayMITA13Claude Code, Codex
anatomyNousResearch/hermes-agentSkill267ktodayMITA15Claude Code, Codex
p5jsNousResearch/hermes-agentSkill267ktodayMITA20Claude Code, Codex
pretextNousResearch/hermes-agentSkill267ktodayMITA13Claude Code, Codex
pinggy-tunnelNousResearch/hermes-agentSkill267ktodayMITA15Claude Code, Codex