gemini-imagegen
This skill should be used when generating and editing images using the Gemini API (Nano Banana Pro).
Skill by sammyjoyce
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/sammyjoyce-gemini-imagegen
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend, writing, productivity
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions: not checked yet.
What's inside
- Skill name
gemini-imagegen- Description
- This skill should be used when generating and editing images using the Gemini API (Nano Banana Pro). It applies when creating images from text prompts, editing existing images, applying style transfers, generating logos with text, creating stickers, product mockups, or any image generation/manipulation task. Supports text-to-image, image editing, multi-turn refinement, and composition from multiple reference images.
- License
- MIT
- Instructions
- 234 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Files (7)
- SKILL.md
- requirements.txt
- compose_images.py · scripts/
- edit_image.py · scripts/
- gemini_images.py · scripts/
- generate_image.py · scripts/
- multi_turn_chat.py · scripts/
SKILL.md (first lines)
# 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
```python
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
```python
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
```python
# 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")
```
### Aspect Ratio Examples
```python
# Square (default)
image_config=types.ImageConfig(aspect_ratio="1:1")
# Landscape wide
image_config=types.ImageConfig(aspect_ratio="16:9")
# Ultra-wide panoramic
image_config=types.ImageConfig(aspect_ratio="21:9")
# Portrait
image_config=types.ImageConfig(aspect_ratio="9:16")
# Photo standard
image_config=types.ImageConfig(aspect_ratio="4:3")
```
## Editing Images
Pass existing images with text prompts:
```python
from PIL import Image
img = Image.open("input.png")
response = client.models.generate_content(
model="gemini-3-pro-image-preview",
contents=["Add a sunset to this scene", img],
config=types.GenerateContentConfig(
response_modalities=['TEXT', 'IMAGE'],
),
)
```
## Multi-Turn RefinementFrom sammyjoyce/pi-compound-engineering, MIT.
More from sammyjoyce/pi-compound-engineering
- 0.414score
git-worktree
sammyjoyce
Manage Git worktrees for isolated parallel development.
SkillDFreshness: DClaude Code +9 - 0.414score
resolve-pr-parallel
sammyjoyce
Resolve GitHub PR review threads efficiently.
SkillDFreshness: DClaude Code +9 - 0.383score
skill-creator
sammyjoyce
Guide for creating effective skills.
SkillDFreshness: DClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Feb 10, 2026 (8 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
- 0.485score
gemini-imagegen
ratacat
This skill should be used when generating and editing images using the Gemini API (Nano Banana Pro).
SkillDFreshness: D★ 57Claude Code +9 - 0.386score
gemini-imagegen
gvkhosla
This skill should be used when generating and editing images using the Gemini API (Nano Banana Pro).
SkillAFreshness: A★ 51Claude Code +9 - 0.258score
gemini-imagegen
futuretyler
This skill should be used when generating and editing images using the Gemini API (Nano Banana Pro).
SkillDFreshness: D★ 3Claude Code +9 - 0.244score
gemini-imagegen
nbbaier
This skill should be used when generating and editing images using the Gemini API (Nano Banana Pro).
SkillDFreshness: D★ 1Claude Code +9
More from sammyjoyce
- 0.544score
setup-pstack
sammyjoyce
Configure which models pstack uses per role and at what reasoning budget.
SkillBFreshness: B★ 1Claude Code +9 - 0.524score
how
sammyjoyce
Use for "how does X work", code walkthroughs before changing something, and placement / ownership / layering questions ("where should this live", "which…
SkillBFreshness: B★ 1Claude Code +9 - 0.524score
poteto-mode
sammyjoyce
poteto's agent style for concise, detailed responses, deliberate subagents, unslopped prose, simple code, and verified work.
SkillBFreshness: B★ 1Claude Code +9 - 0.524score
interrogate
sammyjoyce
Use for "interrogate", "adversarial review", "multi-model review", "challenge this", "stress test this code", "find blind spots", or "tear this apart".
SkillBFreshness: B★ 1Claude Code +9 - 0.522score
automate-me
sammyjoyce
Use for "automate me", "create/update/refresh my -mode skill", "turn/capture my preferences or working style into a skill", or wanting agents to follow how…
SkillBFreshness: B★ 1Claude Code +9 - 0.516score
no-comments
sammyjoyce
Spawn Comment Sicko, fix accepted findings, and offer encodings for claimed constraints.
SkillBFreshness: B★ 1Claude Code +9
Cite this page
gemini-imagegen skill. Agent Mart. https://agentmart.dev/skills/sammyjoyce-gemini-imagegen (last updated 2026-10-24)