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.
npx skills add gvkhosla/compound-engineering-pi --skill gemini-imagegengit clone --depth 1 https://github.com/gvkhosla/compound-engineering-piWrote 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.
[](https://agentmods.dev/skills/gvkhosla/compound-engineering-pi/gemini-imagegen)<a href="https://agentmods.dev/skills/gvkhosla/compound-engineering-pi/gemini-imagegen"><img src="https://agentmods.dev/badge/skills/gvkhosla/compound-engineering-pi/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.
<a href="https://agentmods.dev/skills/gvkhosla/compound-engineering-pi/gemini-imagegen"><img src="https://agentmods.dev/badge/skills/gvkhosla/compound-engineering-pi/gemini-imagegen.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once 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 |
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.
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.
Copies of this mod
4 near-identical copies found in the catalogue:
- gemini-imagegen — 100% identical, 0 lines differ
- gemini-imagegen — 100% identical, 0 lines differ
- gemini-imagegen — 100% identical, 0 lines differ
- gemini-imagegen — 95% identical, 13 lines differ
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")
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.
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.
- 9d ago First seen · 238 lines · 81 tokens per session scan A cbb929955c60
gemini-imagegen is a skill published in the GitHub repository gvkhosla/compound-engineering-pi (51 stars, last pushed 4mo 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. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
ad-creative
Plan and produce advertising concepts, copy variants, visual directions, and test matrices for paid campaigns.
image-generation
Generate or refine one image with Kun's image tool using explicit composition and authorized references.
media-video
Generate a short Kun video from text or an authorized first-frame image.
pptx
Criar, editar e analisar apresentacoes PowerPoint (.pptx). Trigger quando usuario quer criar slides, pitch deck, editar apresentacao existente, extrair conteudo de .pptx.
storyboard
Create a six-frame storyboard that shows a user's journey from problem to solution. Use when you need a fast narrative for alignment, concept reviews, or demos.
gerar-imagem
Gera ou edita imagens com IA via OpenAI gpt-image-1 (default, funcionando) ou Nano Banana/Gemini (aguarda billing). Use quando o usuário pedir para gerar, criar, desenhar ou editar imagem, ilustração, logo, ícone, mockup visual, asset gráfico, foto sintética ou variação de imagem existente.