gemini-imagegen

gemini-imagegen is a skill for Claude Code from tajmahal226/compound-engineering-plugin. It costs 81 tokens per session (1,546 once invoked), scanned A, a copy of gemini-imagegen, MIT.

A workflow for creating and editing images through Google's Gemini API, including images made from text descriptions and changes to existing images.

In plain words
What is it for?
Use it to generate images, edit them, transfer styles, create logos with text or stickers, and make product mockups.
Why use it?
It gives developers a documented way to call Gemini's image model with settings such as aspect ratio and resolution, provided a Gemini API key is available.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the compound-engineering plugin — 20 skills, 17 commands, 1 MCP server shipped together

Good fit Use it to generate images, edit them, transfer styles, create logos with text or stickers, and make product mockups.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tajmahal226/compound-engineering-plugin/gemini-imagegen
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 tajmahal226/compound-engineering-plugin --skill gemini-imagegen
Clone the repo
git clone --depth 1 https://github.com/tajmahal226/compound-engineering-plugin

Made for: Claude Code.

Or install compound-engineering, the plugin that ships this one along with the rest of its 20 skills, 17 commands, 1 MCP server.

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 gemini-imagegen

README.md
[![agentmods](https://agentmods.dev/badge/skills/tajmahal226/compound-engineering-plugin/gemini-imagegen/github.svg)](https://agentmods.dev/skills/tajmahal226/compound-engineering-plugin/gemini-imagegen)
Your own site
<a href="https://agentmods.dev/skills/tajmahal226/compound-engineering-plugin/gemini-imagegen"><img src="https://agentmods.dev/badge/skills/tajmahal226/compound-engineering-plugin/gemini-imagegen/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 gemini-imagegen

Your own site · 80×15
<a href="https://agentmods.dev/skills/tajmahal226/compound-engineering-plugin/gemini-imagegen"><img src="https://agentmods.dev/badge/skills/tajmahal226/compound-engineering-plugin/gemini-imagegen.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 81 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,546 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod 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.00081 $0.01546
Opus 5 $0.00041 $0.00773
Sonnet 5 $0.00016 $0.00309
Haiku 4.5 $0.00008 $0.00155

Measured 9d ago against content hash cbb929955c60, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

gemini-imagegen scanned grade A with 0 findings 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 9d ago.

The scan reads SKILL.md. This mod also ships 5 executable files (scripts/compose_images.py, scripts/edit_image.py, scripts/gemini_images.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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to gemini-imagegen — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

plugins/compound-engineering/skills/gemini-imagegen/SKILL.md · 238 lines

How it starts

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

Gemini Image Generation (Nano Banana Pro)

Generate and edit images using Google's Gemini API. The environment variable GEMINI_API_KEY must be set.

Default Model

Model Resolution Best For
gemini-3-pro-image-preview 1K-4K All image generation (default)

Note: Always use this Pro model. Only use a different model if explicitly requested.

Quick Reference

Default Settings

  • Model: gemini-3-pro-image-preview
  • Resolution: 1K (default, options: 1K, 2K, 4K)
  • Aspect Ratio: 1:1 (default)

Available Aspect Ratios

1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9

Available Resolutions

1K (default), 2K, 4K

Core API Pattern

import os
from google import genai
from google.genai import types

client = genai.Client(api_key=os.environ["GEMINI_API_KEY"])

# Basic generation (1K, 1:1 - defaults)
response = client.models.generate_content(
    model="gemini-3-pro-image-preview",
    contents=["Your prompt here"],
    config=types.GenerateContentConfig(
        response_modalities=['TEXT', 'IMAGE'],
    ),
)

for part in response.parts:
    if part.text:
        print(part.text)
    elif part.inline_data:
        image = part.as_image()
        image.save("output.png")

Custom Resolution & Aspect Ratio

from google.genai import types

response = client.models.generate_content(
    model="gemini-3-pro-image-preview",
    contents=[prompt],
    config=types.GenerateContentConfig(
        response_modalities=['TEXT', 'IMAGE'],
        image_config=types.ImageConfig(
            aspect_ratio="16:9",  # Wide format
            image_size="2K"       # Higher resolution
        ),
    )
)

Resolution Examples

# 1K (default) - Fast, good for previews
image_config=types.ImageConfig(image_size="1K")

# 2K - Balanced quality/speed
image_config=types.ImageConfig(image_size="2K")

# 4K - Maximum quality, slower
image_config=types.ImageConfig(image_size="4K")

Read the full file on GitHub · 238 lines

Files

What ships with it

6 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. 9d ago First seen · 238 lines · 81 tokens per session scan A cbb929955c60

Subscribe to this mod's changes

gemini-imagegen is a skill published in the GitHub repository tajmahal226/compound-engineering-plugin (4 stars, last pushed 6mo ago), licensed MIT. It adds 81 tokens to every session and 1,546 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to gemini-imagegen, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

webgl-holographic-foil

A self-contained WebGL2 hero: thin-film interference over a crushed-foil surface whose palette shifts with the viewing angle; move the cursor to tilt the film.

nexu-io/open-design · 41 tokens

general-video

Author or edit a custom HyperFrames composition when no specialized workflow fits, or when BRIEF.md sets flow: companion. Use for longer or multi-scene pieces, brand and sizzle reels, montages, static loops, static title cards, footage remixes, and freeform builds. Use motion-graphics instead for a short unnarrated…

heygen-com/hyperframes · 92 tokens

html-ppt-hermes-cyber-terminal

OpenDesign + BYOK: choosing and wiring your own model, hands-on — cost, quality, and the routing decision. Built as a decision-grade AI literacy deck for engineers, IT, applied-AI teams.

nexu-io/open-design · 53 tokens

html-ppt-taste-brutalist

16:9 HTML deck in tactical-telemetry / CRT-terminal taste. Deactivated-CRT charcoal slides, white-phosphor monospace, hazard-red accent, scanline overlay, ASCII syntax, density over decoration. Distilled from Leonxlnx/taste-skill brutalist-skill (Tactical Telemetry mode).

nexu-io/open-design · 78 tokens

diagnostic-stem-delivery

Audio production with diagnostic analysis, timecode parsing from documents, and verified export workflow.

HKUDS/OpenSpace · 23 tokens

chengfeng-check-updates

An environment manager for a video-editing system. It checks whether its skills and runtime—the software needed to run them—are installed and compatible.

Agentchengfeng/chengfeng-videocut-skills · 120 tokens