gemini-image-generator
Original:🇺🇸 English
Translated
4 scriptsChecked / no sensitive code detected
Generate, edit, or transform images with Gemini Nano Banana using bundled Python scripts (Flash or Pro) including aspect ratio, resolution, image-to-image edits, logo overlays, and reference images. Use when users request image generation, image edits, image-to-image transformations, logo placement, or specific aspect ratios or resolutions.
5installs
Sourcefeed-mob/agent-skills
Added on
NPX Install
npx skill4agent add feed-mob/agent-skills gemini-image-generatorTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Gemini Image Generator
Use this skill to turn a user prompt (and optional images) into Gemini image generation calls via the bundled Python scripts.
Workflow
- Collect the user prompt and any images (local paths or URLs).
- Infer the operation mode and translate parameters into CLI flags.
- Run the appropriate script to generate or edit images.
- Return the output file paths.
Defaults and Rules
- Default model: (CLI value
gemini-2.5-flash-image).flash - Default aspect ratio: .
9:16 - Default count: (max
1).3 - Default image size: , but only apply it for the Pro model.
1K - If the user specifies a size (), switch to Pro (
1K|2K|4K).gemini-3-pro-image-preview - If the user explicitly asks for Pro or higher quality, use Pro.
- If the user supplies multiple reference images (2+), switch to Pro.
- Logo overlay always uses Pro (even if the user asks for Flash).
- Only set when using Pro.
--size
Allowed Values
- Aspect ratios: ,
1:1,2:3,3:2,3:4,4:3,4:5,5:4,9:16,16:9.21:9 - Image sizes (Pro only): ,
1K,2K.4K - Reference images (Pro): up to 14 total. Gemini guidance: up to 6 object images + up to 5 human images.
Script
Scripts
Text-to-image
Run:
bash
python scripts/generate_image.py \
--prompt "<user prompt>" \
--aspect 9:16 \
--count 1 \
--model flash \
--out-dir outputsOnly add flags when the user asks for them. The script reads from the environment.
GEMINI_API_KEYImage editing / image-to-image
Use when the user supplies a base image to edit or transform.
Run:
bash
python scripts/edit_image.py \
--input /path/to/base.png \
--prompt "<edit instructions>" \
--reference /path/to/ref1.png \
--reference https://example.com/ref2.png \
--aspect 9:16 \
--count 1 \
--model flash \
--out-dir outputsLogo overlay
Use when the user wants to place a logo onto a base image.
Run:
bash
python scripts/logo_overlay.py \
--base /path/to/base.png \
--logo /path/to/logo.png \
--aspect 9:16 \
--count 1 \
--model pro \
--out-dir outputsExamples
User: "Generate a portrait of a dancer in a foggy forest."
Claude:
- Use defaults (flash, 9:16, count 1).
- Run:
python scripts/generate_image.py --prompt "Generate a portrait of a dancer in a foggy forest."
User: "Make a 2K 16:9 cinematic still of a neon city, give me 3 options."
Claude:
- Use Pro with size 2K, aspect 16:9, count 3.
- Run:
python scripts/generate_image.py --prompt "Make a 2K 16:9 cinematic still of a neon city" --aspect 16:9 --size 2K --count 3 --model pro
User: "Edit this image to remove the background and make it studio white." (with one image)
Claude:
- Use edit script with Flash.
- Run:
python scripts/edit_image.py --input /path/to/image.png --prompt "Remove the background and make it studio white."
User: "Put this logo on the shirt in the photo." (with base + logo images)
Claude:
- Use logo overlay script (Pro).
- Run:
python scripts/logo_overlay.py --base /path/to/photo.png --logo /path/to/logo.png
Notes
- If the script fails with a missing module, install and retry.
google-genai - Dependencies live in (install with
scripts/requirements.txt).pip install -r scripts/requirements.txt - Output files are written into the directory using timestamped names.
outputs/ - For prompt best practices and templates, read .
references/prompt-guide.md - For logo-specific guidance, read .
references/logo-overlay.md - For edit/image-to-image guidance, read .
references/image-editing.md - For watermarking guidance, read .
references/watermarking.md