Awesome-omni-skill nano-image-generate
Generate images using Nano Banana (Flash) or Nano Banana Pro. Use 'flash' for speed/efficiency and 'pro' for high quality, text rendering, and complex prompt adherence. Triggers include 'generate image', 'create logo', 'fast image', 'high quality image'.
git clone https://github.com/diegosouzapw/awesome-omni-skill
T=$(mktemp -d) && git clone --depth=1 https://github.com/diegosouzapw/awesome-omni-skill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/content-media/nano-image-generate" ~/.claude/skills/diegosouzapw-awesome-omni-skill-nano-image-generate && rm -rf "$T"
skills/content-media/nano-image-generate/SKILL.mdNano Image Generator
Generate images using Nano Banana Pro (Gemini 3 Pro Preview) for any visual asset needs. Supports reference images for style transfer and character consistency.
Quick Start
[!IMPORTANT] Path Check: Before running, localize the
file. If running this skill from another project, use the absolute path to the script or copy it to your project.scripts/generate_image.py
# Basic generation (saves to ./generated/) # Ensure you are running this from the directory containing 'scripts/' OR provide full path python scripts/generate_image.py "A friendly robot mascot waving" # With style reference (keep same visual style) python scripts/generate_image.py "Same style, new content" --ref ./reference.jpg --output ./new.png
Model Selection
Choose the model based on user intent:
| Model | ID | Use Case | Keywords |
|---|---|---|---|
| Pro | | Quality & Detail. Default choice. Best for text, complex prompts, logos, and high-fidelity assets. | "high quality", "logo", "text", "detail", "complex" |
| Flash | | Speed & Efficiency. Best for rapid prototyping, large batches, or when low latency is critical. | "fast", "quick", "draft", "rapid" |
Script Usage
python scripts/generate_image.py <prompt> --output <path> [options]
Required:
- Image descriptionprompt
Options:
- Output file path. Optional. Defaults to--output, -o
../generated/<slug>.png
- Model selection:--model, -m
(default) orproflash
- Gemini API Key (optional)--key, -k
- Aspect ratio (default:--aspect, -a
)1:1
- Resolution:--size, -s
,1K
(default),2K4K
- Reference image (max 14)--ref, -r
Examples
High Quality Logo (Pro - Default):
python scripts/generate_image.py "Futuristic company logo with text 'NANO'" --output ./logo.png
Quick Prototype (Flash):
python scripts/generate_image.py "Draft sketch of a cat" --model flash --output ./cat_draft.png
Reference Images
Gemini supports up to 14 reference images for:
Style Transfer
Keep the visual style (colors, textures, mood) from a reference:
python scripts/generate_image.py "New scene with mountains, same visual style as reference" \ --ref ./style-reference.jpg --output ./styled-mountains.png
Character Consistency
Maintain character appearance across multiple images:
python scripts/generate_image.py "Same character now in a forest setting" \ --ref ./character.png --output ./character-forest.png
Multi-Image Fusion
Combine elements from multiple references:
python scripts/generate_image.py "Combine the style of first image with subject of second" \ --ref ./style.png --ref ./subject.png --output ./combined.png
Serial Image Generation (Batch Workflow)
For generating a series with consistent style:
- Generate first image
- Use first image as
for subsequent images--ref - Each new image inherits the established style
# Generate cover python scripts/generate_image.py "Tech knowledge card cover" -o ./01-cover.png # Generate subsequent cards with style reference python scripts/generate_image.py "Card 2 content, same style" --ref ./01-cover.png -o ./02-card.png python scripts/generate_image.py "Card 3 content, same style" --ref ./01-cover.png -o ./03-card.png
Directory Structure
To keep things organized, this skill uses a standard directory structure:
- Default output location. Images are automatically saved here if no path is provided../generated/
- Recommended for storing reference images../assets/
Workflow
-
Verify Output Directory & Script Path:
- Ensure the output directory exists (e.g.,
) or is writable.mkdir -p generated - Confirm the location of
.generate_image.py
- Ensure the output directory exists (e.g.,
-
Craft effective prompts - Be specific and descriptive:
- Include style: "flat design", "3D rendered", "watercolor", "minimalist"
- Include context: "for a mobile app", "website hero image"
- Include details: colors, mood, composition
- For references: mention "same style as reference" or "keep the visual style"
-
Choose appropriate settings:
- Icons/logos →
--aspect 1:1 - Banners/headers →
or--aspect 16:921:9 - Mobile screens →
--aspect 9:16 - Xiaohongshu cards →
--aspect 3:4 - Photos →
or--aspect 3:24:3
- Icons/logos →
Examples
App icon:
python scripts/generate_image.py "Minimalist flat design app icon of a lightning bolt, purple gradient background, modern iOS style" \ --output ./assets/app-icon.png --aspect 1:1
Marketing banner:
python scripts/generate_image.py "Professional website hero banner for a productivity app, abstract geometric shapes, blue and white color scheme" \ --output ./public/images/hero-banner.png --aspect 16:9
Xiaohongshu knowledge card:
python scripts/generate_image.py "Tech knowledge card, dark blue purple gradient, neon cyan accents, code block style, Chinese text '标题'" \ --output ./xiaohongshu/card.png --aspect 3:4
Style transfer:
python scripts/generate_image.py "Transform this photo into watercolor painting style" \ --ref ./photo.jpg --output ./watercolor.png
Character in new scene:
python scripts/generate_image.py "Same character from reference, now sitting in a cafe, warm lighting" \ --ref ./character.png --output ./character-cafe.png --aspect 3:2
Prompt Tips
- Be specific - "A red apple on a wooden table" vs "an apple"
- Include style - "in the style of pixel art" or "photorealistic"
- Mention purpose - "for a children's book" affects the output style
- Describe composition - "centered", "rule of thirds", "close-up"
- Specify colors - Explicit color palettes yield better results
- Reference prompts - Use "same style as reference", "keep the visual aesthetic", "match the color palette"
- Avoid - Don't ask for complex text in images (use overlays instead)
Limitations
- Maximum 14 reference images per request
- Text rendering may be imperfect (better to overlay text separately)
- Very specific brand logos may not reproduce exactly