Generate and edit images using Google Gemini image models. Use this skill when the user asks to create, generate, make, or edit images with AI.
Generate and edit images using Google's Gemini image models via the nano-banana CLI.
GEMINI_API_KEY environment variable must be setnpx @the-focus-ai/nano-banana# Generate a new image
npx @the-focus-ai/nano-banana "a serene mountain landscape at sunset"
# Edit an existing image
npx @the-focus-ai/nano-banana "add a hot air balloon to the sky" --file photo.jpg
# Specify output path
npx @the-focus-ai/nano-banana "a minimalist logo" --output logo.png
# Use a specific model
npx @the-focus-ai/nano-banana "detailed illustration" --model gemini-2.5-flash-image
Before generating, clarify:
See prompting-guide.md for comprehensive guidance.
Key principles:
Example - Weak prompt:
"a cat"
Example - Strong prompt:
"A fluffy orange tabby cat curled up on a velvet armchair, soft afternoon sunlight streaming through a window, warm cozy interior, photorealistic style, shallow depth of field"
npx @the-focus-ai/nano-banana "your detailed prompt here"
Default output: output/generated-<timestamp>.png
If the result isn't right:
--file to modify the generated imagenpx @the-focus-ai/nano-banana "<prompt>"
npx @the-focus-ai/nano-banana "<edit instruction>" --file <input-image>
Edit instructions should describe the change:
| Option | Description |
|---|---|
--file <image> |
Input image for editing |
--output <path> |
Custom output path |
--model <name> |
Specific Gemini model |
--flash |
Use gemini-2.5-flash-image (faster, simpler images) |
--prompt-file <path> |
Read prompt from file |
--list-models |
Show available models |
When creating multiple related images:
See the examples/ directory for full prompt examples.
"Wide 16:9 header image for a technology blog. Clean minimalist design with
abstract geometric shapes in teal and orange. Bright white background,
editorial magazine aesthetic. No text, no dark colors, no gradients."
"Professional product photo of a ceramic coffee mug on a marble surface.
Soft natural lighting from the left, subtle shadow, clean white background.
Commercial photography style, 4K quality, sharp focus on the product."
"Whimsical children's book illustration of a fox reading a book under a
large oak tree. Soft watercolor style, warm autumn colors, gentle and
inviting mood. Simple composition with the fox as the focal point."
"Minimalist app icon for a meditation app. Simple lotus flower symbol in
a soft purple gradient. Clean geometric design, works at small sizes,
modern and calming aesthetic."
gemini-2.5-flash-image)Ensure GEMINI_API_KEY is set:
export GEMINI_API_KEY="your-api-key-here"
Or create a .env file in your project:
GEMINI_API_KEY=your-api-key-here