Use when the user asks to generate images or videos with Google Nano Banana or Veo: social media content (Reels, TikTok, YouTube thumbnails), product photography, storyboard-to-video, ad creatives, multilingual campaign variants, website asset packs, app icons, favicon sets. NOT for editing raw local code files, NOT for Midjourney/DALL-E/Stable Diffusion, NOT for video trimming/ffmpeg editing.
Generate images, icons, and videos using Google's Nano Banana (Gemini image models) and Veo — directly from Claude Code. One command for every visual production need.
echo $GOOGLE_API_KEYecho $GOOGLE_APPLICATION_CREDENTIALS/visual-factory setup to configure." and stop.references/MODEL_MATRIX.md first (needed for step 4). Then read the command-specific reference file(s) per the Command Routing table below.assets/generated/<command>/YYYY-MM-DD/..json manifest for every generated file.Before every generation, read references/MODEL_MATRIX.md and apply the decision tree.
Quick rules (memorize these):
gemini-3.1-flash-image-preview (Nano Banana 2)gemini-3-pro-image-preview (NB Pro) for: hero assets, text rendering, mockups, >3 refs, NB→Veo first frame, batch campaignsveo-3.1-lite-generate-previewAlways tell the user which model you chose and why, before generating.
GOOGLE_API_KEY or GOOGLE_APPLICATION_CREDENTIALS). Never hardcode. Never log.16:9 or 9:16..json sidecar for every generated file (prompt, model, cost, timestamp, output path).Detect the command from the user's message and execute the matching workflow below.
| User says... | Run workflow | Read reference(s) |
|---|---|---|
| "generate", "create image", "make a picture", "logo", "illustration" | → generate | PROMPT_FRAMEWORKS.md |
| "edit", "modify", "change this image" | → edit | PROMPT_FRAMEWORKS.md |
| "icon", "favicon", "app icon", "logo icon" | → icon | PLATFORM_RECIPES.md |
| "social", "instagram", "twitter", "linkedin", "tiktok", "social pack" | → social | PLATFORM_RECIPES.md, PROMPT_FRAMEWORKS.md |
| "web assets", "hero", "OG image", "website", "banner", "landing page" | → web | PLATFORM_RECIPES.md |
| "from content", "from README", "from blog post", "read this file" | → content | PROMPT_FRAMEWORKS.md |
| "translate", "localize", "in Spanish/French/etc." | → translate | PROMPT_FRAMEWORKS.md |
| "animate", "make a video from this image" | → animate | PROMPT_FRAMEWORKS.md, CINEMATOGRAPHY.md |
| "video", "reel", "tiktok video", "youtube video" | → video | PROMPT_FRAMEWORKS.md, CINEMATOGRAPHY.md |
| "batch", "variations", "multiple versions" | → batch | PROMPT_FRAMEWORKS.md |
| "brand kit", "brand register", "brand list" | → brand | (none — brand kit logic is self-contained) |
| "setup", "configure", "API key" | → setup | TROUBLESHOOTING.md |
If unclear, ask: "Which command? (generate / edit / icon / social / web / content / translate / animate / video / batch / brand / setup)"
references/PROMPT_FRAMEWORKS.md (Framework 1 and 4 if reference images provided).[Subject] + [Action] + [Location] + [Composition] + [Style]. Stack lighting, camera, color grading, materiality dimensions for quality.assets/generated/generate/YYYY-MM-DD/output.png + output.json manifest.references/PROMPT_FRAMEWORKS.md (Framework 2).assets/generated/edit/YYYY-MM-DD/edit-N.png + edit-N.json.references/PLATFORM_RECIPES.md (Favicon & PWA Icon Set section).next.config.* (Next.js), astro.config.* (Astro), svelte.config.* (SvelteKit), vite.config.* (Vite).icon-512.png.mkdir -p assets/generated/icon/YYYY-MM-DD
# After generating icon-512.png, resize using sips (macOS) or convert (ImageMagick)
# sips is available on macOS without installation:
sips -z 192 192 icon-512.png --out icon-192.png
sips -z 180 180 icon-512.png --out icon-180.png
sips -z 96 96 icon-512.png --out icon-96.png
sips -z 32 32 icon-512.png --out icon-32.png
sips -z 16 16 icon-512.png --out icon-16.png
If sips not available (Linux), use convert from ImageMagick.manifest.json with icon entries.references/PLATFORM_RECIPES.md (Social Media Platforms section).assets/generated/social/YYYY-MM-DD/.social-pack.json manifest listing all files.references/PLATFORM_RECIPES.md (Website Assets section).hero.png.
b. Dark mode variant: same prompt + "dark mode color scheme, dark backgrounds, high contrast for dark UI". Save as hero-dark.png.
c. OG image: 1200×630 (16:9). Same concept, adjust composition for the wider format. Save as og.png.
d. Favicon set: same as icon workflow (reuse icon command logic for the 6 sizes + manifest.json).web-pack.json manifest.content-hero.png.
b. Social pack: 1080×1080 (Instagram feed) + 1200×628 (LinkedIn) + 1200×630 (OG). Save with platform names.
c. Supporting illustration: 1:1, more abstract/conceptual variation of the theme. Save as content-illustration.png.assets/generated/content/YYYY-MM-DD/. Write content-pack.json manifest.<base-name>-<lang-code>.png (e.g., hero-fr.png, hero-ar.png).translate-pack.json manifest listing all localized files.brand register [name]:
.visual-factory/memory/brands/ directory if it doesn't exist:
mkdir -p .visual-factory/memory/brands
.visual-factory/memory/brands/<name>.json:
{
"name": "<name>",
"reference_images": ["path/to/ref1.png", "path/to/ref2.png"],
"colors": {
"primary": "#1A1A2E",
"secondary": "#E94560",
"accent": "#FFD700"
},
"style": "Minimalist, premium, dark backgrounds, gold accents",
"tone": "Professional",
"created": "YYYY-MM-DD"
}
--brand [name] with any command to apply it."brand list:
.visual-factory/memory/brands/ exists.*.json files in that directory./visual-factory brand register [name] to create one."brand use [name] / --brand [name] flag:
.visual-factory/memory/brands/<name>.json.references/PROMPT_FRAMEWORKS.md (Veo Framework 4: Image-to-Video).references/MODEL_MATRIX.md (Video Models section).animate-frame.png.
c. Confirm with user before proceeding to video.--extend requested. Veo Full if 4K requested.operation.done == true.assets/generated/animate/YYYY-MM-DD/output.mp4.output.json manifest.references/PROMPT_FRAMEWORKS.md (Veo Frameworks 1–3).references/CINEMATOGRAPHY.md.[Cinematography] + [Subject] + [Action] + [Context] + [Style & Ambiance].[00:00-00:02] Shot 1. [00:02-00:05] Shot 2. [00:05-00:08] Shot 3.assets/generated/video/YYYY-MM-DD/output.mp4 + manifest.--extend requested: poll for completion, then submit extension with a continuation prompt.lighting, mood, style, setting, color (default: all)references/PROMPT_FRAMEWORKS.md (Framework 1).assets/generated/batch/<concept-slug>/YYYY-MM-DD/ as variant-01.png, variant-02.png, etc.batch.json manifest listing all files with their variation axis values.echo "GOOGLE_API_KEY: ${GOOGLE_API_KEY:+set (hidden)}"
echo "GOOGLE_APPLICATION_CREDENTIALS: ${GOOGLE_APPLICATION_CREDENTIALS:-not set}"
GOOGLE_API_KEY is set: confirm "Found GOOGLE_API_KEY. Running a test generation to verify..."
export GOOGLE_API_KEY=your_key_here"export GOOGLE_API_KEY=your_key_here"export GOOGLE_APPLICATION_CREDENTIALS=/path/to/key.json"