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 agentmods add skills/aegntic/compound-engineering/gemini-imagegennpx skills add aegntic/compound-engineering --skill gemini-imagegengit clone --depth 1 https://github.com/aegntic/compound-engineeringWrote 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/aegntic/compound-engineering/gemini-imagegen)<a href="https://agentmods.dev/skills/aegntic/compound-engineering/gemini-imagegen"><img src="https://agentmods.dev/badge/skills/aegntic/compound-engineering/gemini-imagegen.svg" alt="Measured on agentmods" 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.01608 |
| Opus 5 | $0.00041 | $0.00804 |
| Sonnet 5 | $0.00016 | $0.00322 |
| Haiku 4.5 | $0.00008 | $0.00161 |
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 5d 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.
This is a copy
95% identical to gemini-imagegen — 13 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.
How it starts
The opening of the file, as written. The whole thing — 249 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.
- 5d ago First seen · 249 lines · 81 tokens per session scan A d5fa53670df1
gemini-imagegen is a skill published in the GitHub repository aegntic/compound-engineering (2 stars, last pushed 2mo ago), licensed MIT. It adds 81 tokens to every session and 1,608 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. It is 95% identical to gemini-imagegen, differing in 13 lines, and is treated as a copy.
Other skills, from other repositories
methodology
Analyzes captured HTTP traffic, designs the CLI architecture, and implements the Python CLI package (Phase 2): parse raw-traffic.json, identify the protocol, write api-spec.json, scaffold from templates, and implement endpoint methods and Click command groups. Use after a capture completes and raw-traffic.json exists.
standards
Runs Phase 4 review/publish/verify for a cli-web- CLI: implementation review by 3 parallel agents, the tiered quality checklist (Tier 1 critical fail-fast, then comprehensive), pip install + smoke test, and per-CLI skill generation. Use when a CLI's tests pass and it is ready to be validated and published.
testing
Writes and documents the test suite for a generated cli-web- CLI (Phase 3): unit tests with mocked HTTP, live E2E tests, subprocess tests via resolvecli, and the TEST.md plan/results record. Use after the methodology skill completes implementation.
sync-check
Walks the documentation dependency web after a CLI code change and reports which downstream files (skills, SOPs, READMEs, plugin references) are out of sync. Use after fixing a bug, adding a command, changing auth behavior, refactoring, or before committing — and when the user says "sync check", "update docs"…
futbin-cli
Queries FUTBIN (EA FC Ultimate Team database) via cli-web-futbin — player search, prices and price history, comparisons, SBCs, evolutions, and market analytics (index, trending, cheapest by rating, movers, fodder, buy/sell signals, undervalue scans, PS/PC arbitrage). Use when the user asks about EA FC player prices…
airbnb-cli
Use cli-web-airbnb to search Airbnb stays, get listing details, check availability calendars, read guest reviews, and look up location suggestions. Invoke this skill whenever the user asks about Airbnb accommodations, vacation rentals, listing prices, availability, guest reviews, or wants to search for places to stay.…