Nano Banana Product Ads
This skill should be used when the user wants to generate photorealistic product ad images using Gemini 3.1 Flash (Nano Banana 2). Triggers on requests like "nano banana", "product shoot", "product ad", "ad creative", "product mockup", "photorealistic product", or "generate product image". Supports 15 ad template types with structured JSON product definitions and multi-turn refinement.
Nano Banana 2 — Photorealistic Product Ad Generator
Generate scroll-stopping, ad-ready product visuals using Gemini 3.1 Flash. No $10K photo shoots — idea to ad in minutes.
Turn a product photo (or just a description) into photorealistic ad creatives across 15 template types — from clean studio hero shots to UGC-style lifestyle scenes to before/after comparisons. Structured JSON product definitions ensure label accuracy and real-world proportions.
What it does
- Product Definition — Extracts a structured JSON from a product image via Gemini, or builds one interactively from a verbal description. This controls proportions and label fidelity in all generated images.
- Template Selection — Choose from 15 ad templates across 5 families: Product Hero, Lifestyle, Comparison, Composition, and With People.
- Variable Fill — Smart defaults based on product category (skincare, supplements, grooming, wellness) with full override capability for shooting style, environment, mood, lighting, and demographics.
- Prompt Assembly — Combines universal quality directives, template skeleton, filled variables, and product JSON into a generation-ready prompt.
- Generation — Runs
generate-product-ad.mjsto produce images via Gemini 3.1 Flash API, optionally using a reference product image for better label accuracy.
- Quality Check & Refinement — Automated quality checklist (label readability, proportions, lighting, composition, realism) with targeted fix prompts for common issues. Fix one issue at a time to avoid overcorrection.
Output
output/
├── product_hero_serum_earthy.jpg # Generated ad creative
├── before_after_supplement_v2.jpg # Variation or refinement
└── ...
15 Ad Templates
| Family | Templates |
|---|---|
| Product Hero | 1. Product Shooting, 2. Product in Environments |
| Lifestyle | 3. Hands-Free Emotional Hero, 4. Social Proof Shot, 5. UGC-Style Lifestyle, 6. Post-Purchase Experience |
| Comparison | 7. Before & After, 8. Split-Screen Comparison, 9. Shelf Simulation, 10. Problem-Product Flow |
| Composition | 11. Bundle Layout (Gift Set), 12. Carousel Scene Builder, 13. Gift-Giving (Unboxing) |
| With People | 14. Product & People, 15. Replicate Ad Reference |
What this replaces
| Before | After |
|---|---|
| $10K+ product photo shoots | AI-generated photorealistic ads in minutes |
| Weeks of creative production lead time | Idea to ad creative in a single session |
| Generic stock mockups | Product-accurate images with correct labels and proportions |
| One angle per shoot | 15 template types from a single product definition |
| Expensive reshoots for iterations | Multi-turn refinement with targeted fix prompts |
| Separate brief for each creative concept | Structured templates with smart category defaults |
Who this is for
- DTC brand founders who need ad creatives before they can afford professional shoots
- Performance marketers testing multiple visual angles without production bottlenecks
- Creative directors rapidly prototyping concepts before committing to production
- Agency teams generating client-ready mockups and concept presentations
- E-commerce sellers who need product-accurate lifestyle shots at scale
Requirements
| Requirement | Details |
|---|---|
| Gemini API Key | GEMINI_API_KEY in .env or environment. Get one at aistudio.google.com/apikey |
| Node.js | For running the generation script |
| Claude Code | Runtime environment |
Skill structure
nano-banana-product-ads/
├── SKILL.md # Workflow, templates overview, generation steps
├── references/
│ ├── global-rules.md # Core philosophy, JSON extraction prompt, quality directives
│ ├── templates.md # All 15 templates with prompt skeletons and examples
│ ├── variables.md # Shared variable libraries (styles, environments, moods, etc.)
│ └── refinement.md # Quality checklist, fix prompts, iteration strategy
├── scripts/
│ └── generate-product-ad.mjs # Gemini 3.1 Flash image generation script
├── .env.example # Required environment variables
└── README.md # This file
How it works under the hood
The skill uses a single Claude agent orchestrating a structured workflow:
- JSON extraction — Product image analyzed by Gemini to extract dimensions, packaging, label content, and color scheme into structured JSON
- Prompt assembly — Template skeleton + variable values + product JSON + 7 universal quality rules combined into a single generation prompt
- Image generation —
generate-product-ad.mjscalls Gemini 3.1 Flash (gemini-2.0-flash-exp-image-generation) with the assembled prompt and optional reference image - Refinement loop — Quality checklist identifies issues, targeted fix prompts address one issue at a time using the previous output as reference
Default output: 9:16 aspect ratio (1080x1920), 2K resolution, vertical-first for social ads.
Pro tip: Always include a product reference image via --ref — it dramatically improves label accuracy and proportions.
For brands that move faster than their photo shoot calendar.