Generate marketing ad images using Nano Banana Pro (Gemini 3 Pro Image). Accepts campaign-planner creative briefs, reads brand bible for visual style, constructs marketing-optimized prompts, and produces platform-ready images at correct aspect ratios. Supports 1:1, 9:16, 16:9, 4:5 formats. Includes self-review loop to catch hallucinated logos, wrong text, and quality issues. Draft-first workflow (1K fast iteration, 4K final). Outputs to /tmp/marketing/assets/images/.
Generate marketing ad images from campaign-planner creative briefs. Wrap nano-banana-pro with brand-aware prompt construction, aspect ratio handling, and a self-review loop that catches quality issues before marking images final.
Verify before starting:
command -v uv
test -n "$GEMINI_API_KEY"
test -f ~/.codex/skills/nano-banana-pro/scripts/generate_image.py
If uv is missing: tell the user to install it with curl -LsSf https://astral.sh/uv/install.sh | sh.
If GEMINI_API_KEY is unset: tell the user to export it from Google AI Studio.
If the script is missing: tell the user the nano-banana-pro skill must be installed first.
Identify which inputs are present in the conversation or filesystem:
| Input | Source | Where to find it |
|---|---|---|
| Creative brief(s) | campaign-planner skill | /tmp/marketing/campaigns/<brand>-campaign-plan.json → ad_creatives[] array, or inline in conversation |
| Brand bible | brand-bible-builder skill | /tmp/marketing/brands/<brand>/brand-bible.md or inline |
| Aspect ratio | User or brief | Defaults to 1:1 if not specified |
| Resolution mode | User | Defaults to draft (1K) unless user says "final" or "4K" |
If the creative brief is missing, ask:
"I need a creative brief to generate the ad. Run
/campaign-plannerfirst, or paste the brief details: headline, visual direction, CTA, and target audience."
If the brand bible is missing, proceed with neutral visual defaults — note this in the output and recommend running /brand-bible-builder for on-brand results.
Open the brand bible and extract these fields into a working reference:
#1A2E5A deep navy, #F5A623 amber)Keep this as a 6-field internal reference. Do not show it to the user. Use it when constructing prompts in Step 3.
Apply these rules every time. They are non-negotiable.
Rule 1 — Less is more. Short, focused prompts outperform long descriptive ones. Target 15–30 words for the visual description. Cut adjectives that repeat the same idea.
Rule 2 — No logos, brand names, or company names. Never include the brand name, product name, logo description, or any trademark in the prompt. The generation engine hallucinates these badly and they must be added in post-production.
Rule 3 — Only include text that is explicitly specified. If the brief specifies a headline to appear in the image, include it exactly as written — no paraphrasing. If no text is specified, do not add any text to the prompt. Do not include CTAs, taglines, or copy unless the brief explicitly says to render text.
Rule 4 — Describe emotion and composition, not data. Instead of "a woman saving money on her bills," write "confident woman, bright home office, warm morning light, relaxed expression." The emotion communicates the message; the model handles the rest.
Rule 5 — Translate brand colors without naming the brand. Convert hex codes to descriptors: #1A2E5A → "deep navy", #F5A623 → "warm amber". Use these color words in the prompt naturally.
Assemble the prompt in this order:
[SUBJECT] — who or what is the focal element
[SETTING] — environment or background context
[MOOD / EMOTION] — feeling the image should evoke
[COMPOSITION] — framing, shot type, perspective
[LIGHTING] — quality and direction of light
[COLOR PALETTE] — 2–3 colors derived from brand bible
[STYLE] — photography/illustration style from brand bible
[AVOID] — explicit exclusions (text, logos, clutter, etc.)
Do not use all 8 fields every time. Use only those relevant to the brief. A 5-field prompt is often stronger than an 8-field one.
Brief input: