SEO image gen: AI image generation for SEO assets (extension)

01What is it?
AI image generation for SEO assets: OG/social preview images, blog hero images, schema images, product photography, infographics. Powered by Gemini via nanobanana-mcp. Requires banana extension installed. It stands out by giving search and SEO workflows a defined shape, so the agent asks for better context and returns a more usable result.
02Inputs
Context for search and SEO workflows: your goals, audience, constraints, and any source material the skill asks for.
03Output
A ready-to-use result for search and SEO workflows: the analysis, copy, or recommendations the agent produces.
Install-only

Install as a package

Installs this one skill package for your coding agent, including any supporting files that skill ships with — not every skill in the repository. Read the tutorial.

Terminal
$ npx skills add agricidaniel/claude-seo --skill seo-image-gen

Skill instructions

The instruction file for this skill. The skill also includes other files you need to install to use it.

SKILL.md

SEO Image Gen: AI Image Generation for SEO Assets (Extension)

Generate production-ready images for SEO use cases using Gemini's image generation via the banana Creative Director pipeline. Maps SEO needs to optimized domain modes, aspect ratios, and resolution defaults.

Architecture Note

This extension is built on Claude Banana (https://github.com/AgriciDaniel/banana-claude), the standalone AI image generation skill for Claude Code.

This skill has two components with distinct roles:

  • SKILL.md (this file): Handles interactive /seo image-gen commands for generating images
  • Agent (agents/seo-image-gen.md): Audit-only analyst spawned during /seo audit to assess existing OG/social images and produce a generation plan (never auto-generates)

Prerequisites

This skill requires the banana extension to be installed:

./extensions/banana/install.sh

Check availability: Before using any image generation tool, verify the MCP server is connected by checking if gemini_generate_image or set_aspect_ratio tools are available. If tools are not available, inform the user the extension is not installed and provide install instructions.

Quick Reference

CommandWhat it does
/seo image-gen og <description>Generate OG/social preview image (1200x630 feel)
/seo image-gen hero <description>Blog hero image (widescreen, dramatic)
/seo image-gen product <description>Product photography (clean, white BG)
/seo image-gen infographic <description>Infographic visual (vertical, data-heavy)
/seo image-gen custom <description>Custom image with full Creative Director pipeline
/seo image-gen batch <description> [N]Generate N variations (default: 3)

SEO Image Use Cases

Each use case maps to pre-configured banana parameters:

Use CaseAspect RatioResolutionDomain ModeNotes
OG/Social Preview16:91KProduct or UI/WebClean, professional, text-friendly
Blog Hero16:92KCinema or EditorialDramatic, atmospheric, editorial quality
Schema Image4:31KProductClean, descriptive, schema ImageObject
Social Square1:11KUI/WebPlatform-optimized square
Product Photo4:32KProductWhite background, studio lighting
Infographic2:34KInfographicData-heavy, vertical layout
Favicon/Icon1:1512LogoMinimal, scalable, recognizable
Pinterest Pin2:32KEditorialTall vertical card

Generation Pipeline

For every generation request:

  1. Identify use case from command or context (og, hero, product, etc.)
  2. Apply SEO defaults from the use cases table above
  3. Set aspect ratio via set_aspect_ratio MCP tool
  4. Construct Reasoning Brief using the banana Creative Director pipeline:
    • Load references/prompt-engineering.md for the 6-component system
    • Apply domain mode emphasis (Subject 30%, Style 25%, Context 15%, etc.)
    • Be SPECIFIC and VISCERAL: describe what the camera sees
  5. Generate via gemini_generate_image MCP tool
  6. Post-generation SEO checklist (see below)

Check for Presets

If the user mentions a brand or has SEO presets configured:

# Use the installed Banana MCP/tool configuration to list presets.

Load matching preset and apply as defaults. Also check references/seo-image-presets.md for SEO-specific preset templates.

Post-Generation SEO Checklist

After every successful generation, guide the user on:

  1. Alt text:Write descriptive, keyword-rich alt text for the generated image
  2. File naming:Rename to SEO-friendly format: keyword-description-widthxheight.webp
  3. WebP conversion:Convert to WebP for optimal page speed:
    magick output.png -quality 85 output.webp
    
  4. File size:Target under 200KB for hero images, under 100KB for thumbnails
  5. Schema markup:Suggest ImageObject schema for the generated image:
    {
      "@type": "ImageObject",
      "url": "https://example.com/images/keyword-description.webp",
      "width": 1200,
      "height": 630,
      "caption": "Descriptive caption with target keyword"
    }
    
  6. OG meta tags:For social preview images, remind about:
    <meta property="og:image" content="https://example.com/images/og-image.webp" />
    <meta property="og:image:width" content="1200" />
    <meta property="og:image:height" content="630" />
    <meta property="og:image:alt" content="Descriptive alt text" />
    

Cost Awareness

Image generation costs money. Be transparent:

  • Show estimated cost before generating (especially for batch)
  • Log every generation in the installed Banana MCP/tool ledger when available
  • Use the installed Banana MCP/tool usage summary if user asks about usage

Approximate costs:

  • Verify current pricing in the installed MCP/tool configuration before quoting

Model Routing

ScenarioModelWhy
OG images, social previewsInstalled MCP/tool default @ 1KFast, cost-effective
Hero images, product photosInstalled MCP/tool quality model @ 2KQuality + detail
Infographics with textInstalled MCP/tool text-capable model @ 2K, thinking: high if supportedBetter text rendering
Quick draftsInstalled MCP/tool draft model @ 512Rapid iteration

Error Handling

ErrorResolution
MCP not configuredRun ./extensions/banana/install.sh
API key invalidNew key at https://aistudio.google.com/apikey
Rate limited (429)Wait 60s, retry. Free tier: ~10 RPM / ~500 RPD
IMAGE_SAFETYRephrase prompt - see references/prompt-engineering.md Safety section
MCP unavailableConfigure MCP with ./extensions/banana/install.sh; claude-seo does not vendor a local generation fallback script
Extension not installedShow install instructions: ./extensions/banana/install.sh

Cross-Skill Integration

  • seo-images (analysis) feeds into seo-image-gen (generation): audit results from /seo images identify missing or low-quality images; use those findings to drive /seo image-gen commands
  • seo-audit spawns the seo-image-gen agent (not this skill) to analyze OG/social images across the site and produce a prioritized generation plan
  • seo-schema can consume generated images: after generation, suggest ImageObject schema markup pointing to the new assets

Reference Documentation

Load on-demand. Do NOT load all at startup:

  • references/prompt-engineering.md:6-component system, domain modes, templates
  • references/gemini-models.md:Model specs, rate limits, capabilities
  • references/mcp-tools.md:MCP tool parameters and responses
  • references/post-processing.md:ImageMagick/FFmpeg pipeline recipes
  • references/cost-tracking.md:Pricing, usage tracking
  • references/presets.md:Brand preset management
  • references/seo-image-presets.md:SEO-specific preset templates

Response Format

After generating, always provide:

  1. Image path:where it was saved
  2. Crafted prompt:show what was sent to the API (educational)
  3. Settings:model, aspect ratio, resolution
  4. SEO checklist:alt text suggestion, file naming, WebP conversion
  5. Schema snippet:ImageObject or og:image markup if applicable

Supporting file: LICENSE.txt

MIT License - see repository root LICENSE file for complete terms.

Copyright (c) 2026 AgriciDaniel https://github.com/AgriciDaniel/claude-seo


Supporting file: references/cost-tracking.md

Cost Tracking Reference

Load this on-demand when the user asks about costs or before batch operations.

Pricing Table

ModelResolutionCost/ImageNotes
Installed MCP modelAnyVerify before useCheck https://ai.google.dev/gemini-api/docs/pricing and installed MCP config
Batch APIAnyVerify before useConfirm availability and discount before quoting

Do not quote fixed package prices unless they have been verified at https://ai.google.dev/gemini-api/docs/pricing.

Free Tier Limits

  • ~10 requests per minute (RPM)
  • ~500 requests per day (RPD)
  • Per Google Cloud project, resets midnight Pacific

Cost Tracker Commands

# Log a generation
cost_tracker.py log --model gemini-3.1-flash-image-preview --resolution 1K --prompt "coffee shop hero"

# View summary (total + last 7 days)
cost_tracker.py summary

# Today's usage
cost_tracker.py today

# Estimate before batch
cost_tracker.py estimate --model gemini-3.1-flash-image-preview --resolution 1K --count 10

# Reset ledger
cost_tracker.py reset --confirm

Storage

Ledger stored at ~/.banana/costs.json. Created automatically on first use.


Supporting file: references/gemini-models.md

Gemini Image Generation Models

Package alias notes. Verify current Google model IDs before use. Do not treat these as Google-confirmed current model IDs.

Package Model Aliases

gemini-3.1-flash-image-preview (Unverified package-specific alias)

PropertyValue
Model IDgemini-3.1-flash-image-preview (verify in installed MCP/tool config)
TierPackage label: Nano Banana 2 (Flash)
SpeedFast - optimized for high-volume use
Aspect RatiosAll 14 ratios (see table below)
Max ResolutionUp to 4096×4096 (4K tier)
FeaturesGoogle Search grounding (web + image), thinking levels, image-only output, extreme aspect ratios
Rate Limits (Free)~10 RPM / ~500 RPD (per Google Cloud project, resets midnight Pacific)
Output Tokens~1,290 output tokens per image
Best ForMost use cases, rapid iteration, batch generation

gemini-2.5-flash-image

PropertyValue
Model IDgemini-2.5-flash-image
TierNano Banana 2 (Flash, previous gen)
SpeedFast
Aspect Ratios1:1, 16:9, 9:16, 4:3, 3:4
Max ResolutionUp to 1024×1024 (1K tier)
Rate Limits (Free)~10 RPM / ~500 RPD
Best ForStable fallback, proven quality

Deprecated Models (DO NOT USE)

gemini-3-pro-image-preview

  • Status: Base model deprecated March 9, 2026. Image generation variant may still be accessible. Use at your own discretion via set_model. Prefer 3.1 Flash.
  • Was: Nano Banana Pro tier (professional asset production, 4K output, 14 reference images)
  • Migration: Use gemini-3.1-flash-image-preview instead

gemini-2.0-flash-exp

  • Status: Deprecated, replaced by gemini-2.5-flash-image

Aspect Ratios

All 14 supported ratios. Availability varies by model:

RatioOrientationUse Cases3.1 Flash2.5 Flash
1:1SquareSocial posts, avatars, thumbnails
16:9LandscapeBlog headers, YouTube thumbnails, presentations
9:16PortraitStories, Reels, TikTok, mobile
4:3LandscapeProduct shots, classic display
3:4PortraitBook covers, portrait framing
2:3PortraitPinterest pins, posters
3:2LandscapeDSLR standard, photo prints
4:5PortraitInstagram portrait, social
5:4LandscapeLarge format photography
1:4Tall stripVertical banners, side panels
4:1Wide stripWebsite banners, headers
1:8Extreme tallNarrow vertical strips
8:1Extreme wideUltra-wide banners
21:9Ultra-wideCinematic, film-grade, ultra-wide monitors

Resolution Tiers

Control output resolution with the imageSize parameter. Note the uppercase K requirement.

imageSize ValuePixel RangeModel AvailabilityUse Case
512Up to 512×512All modelsDrafts, quick iteration, low bandwidth
1K (default)Up to 1024×1024All modelsStandard web use, social media
2KUp to 2048×20483.1 FlashQuality assets, detailed work
4KUp to 4096×40963.1 FlashPrint production, hero images, final assets

Notes:

  • Actual pixel dimensions depend on aspect ratio (e.g., 4K at 16:9 = 4096×2304)
  • Higher resolutions consume more tokens and cost more
  • Default is 1K if imageSize is not specified

API Configuration

Endpoint

https://generativelanguage.googleapis.com/v1beta/models/{model-id}:generateContent

Required Parameters

{
  "contents": [{"parts": [{"text": "your prompt here"}]}],
  "generationConfig": {
    "responseModalities": ["TEXT", "IMAGE"],
    "imageConfig": {
      "aspectRatio": "16:9",
      "imageSize": "1K"
    }
  }
}

Image-Only Output Mode

Force the model to return only an image (no text response):

{
  "generationConfig": {
    "responseModalities": ["IMAGE"]
  }
}

Thinking Level

Control how much the model "thinks" before generating. Higher levels improve complex compositions but increase latency:

{
  "generationConfig": {
    "thinkingConfig": {
      "thinkingLevel": "medium"
    }
  }
}

Levels: minimal, low, medium, high

Google Search Grounding

Ground generation in real-world visual references. Supports web and image search (3.1 Flash):

{
  "tools": [{"googleSearch": {}}]
}

Prompt pattern: [Search/source request] + [Analytical task] + [Visual translation]

Example: "Search for the latest SpaceX Starship design, analyze its proportions and markings, then generate a photorealistic image of it at sunset on the launch pad."

Multi-Image Input

Up to 14 reference images can be provided:

  • 10 object references: for style, composition, or visual matching
  • 4 character references: assign distinct names to preserve features across generations

Useful for character consistency, style transfer, and brand-aligned generation.

Rate Limits by Tier

TierRPMRPDNotes
Free~10~500Per Google Cloud project, resets midnight Pacific. Reduced Dec 2025.
Pay-as-you-go3010,000Production workloads
EnterpriseCustomCustomContact Google

Pricing

ModelResolutionCost per ImageNotes
3.1 Flash1K~$0.039Standard
3.1 Flash2K~$0.0782× standard
3.1 Flash4K~$0.1564× standard
2.5 Flash1K~$0.039Standard
Batch APIAny50% discountAsynchronous, higher latency

Pricing is approximate and based on ~1,290 output tokens per image. Research suggests NB2 pricing may be ~$0.067/img (vs documented $0.039). Verify current pricing at https://ai.google.dev/gemini-api/docs/pricing

Image Output Specs

PropertyValue
FormatPNG
Max ResolutionUp to 4096×4096 (4K tier, 3.1 Flash)
Color SpacesRGB
Text RenderingSupported - best under 25 characters
Style ControlVia prompt engineering

Safety Filters

Gemini uses a two-layer safety architecture:

  1. Input filters: block prompts containing prohibited content before generation
  2. Output filters: analyze generated images and block unsafe results
finishReasonMeaningRetryable?
STOPSuccessful generationN/A
IMAGE_SAFETYOutput blocked by safety filterRephrase prompt
PROHIBITED_CONTENTContent policy violationNo - topic is blocked
SAFETYGeneral safety blockRephrase prompt
RECITATIONDetected copyrighted contentRephrase prompt

Known issue: Filters are known to be overly cautious. Benign prompts may be blocked. Iterate with rephrased wording if this happens.

Content Credentials

  • SynthID watermarks are always embedded in generated images (invisible, machine-readable)
  • C2PA metadata is included on Pro/paid outputs (verifiable provenance chain)

Key Limitations

  • No video generation (image only)
  • No transparent backgrounds (PNG but always with background)
  • Text rendering quality varies; keep text under 25 characters for best results
  • Safety filters may block some prompts (violence, NSFW, public figures), known to be overly cautious
  • Session context resets between Claude Code conversations
  • imageSize and thinking level depend on MCP package version support

Supporting file: references/mcp-tools.md

MCP Tools Reference: @ycse/nanobanana-mcp

Package: @ycse/nanobanana-mcp GitHub: https://github.com/YCSE/nanobanana-mcp

Tools

gemini_generate_image

Generate an image from a text prompt.

Parameters:

ParamTypeRequiredDescription
promptstringYesText description of the image to generate

Returns: Image data + file path (saved to ~/Documents/nanobanana_generated/)

Example usage in Claude Code:

User: "Generate a sunset over mountains in watercolor style"
→ Claude calls gemini_generate_image with prompt
→ Returns image path and description

gemini_edit_image

Edit an existing image with text instructions.

Parameters:

ParamTypeRequiredDescription
imagePathstringYesPath to the image file to edit
promptstringYesEdit instructions

Returns: Modified image data + file path

Example:

User: "Remove the background from ~/Documents/photo.png"
→ Claude calls gemini_edit_image with path and instruction

gemini_chat

Multi-turn visual conversation maintaining session context.

Parameters:

ParamTypeRequiredDescription
messagestringYesChat message (can reference previous images)

Returns: Text response + optional image

Key feature: Session consistency, which maintains style, characters, and context across turns. Great for iterative refinement.

set_aspect_ratio

Configure the aspect ratio for subsequent image generations.

Parameters:

ParamTypeRequiredDescription
ratiostringYesAspect ratio (e.g., "16:9", "1:1", "9:16")

Supported ratios: 1:1, 16:9, 9:16, 4:3, 3:4, 2:3, 3:2, 4:5, 5:4, 1:4, 4:1, 1:8, 8:1, 21:9

set_model

Switch the active Gemini model.

Parameters:

ParamTypeRequiredDescription
modelstringYesModel identifier

MCP package model aliases, verify against the installed MCP package and Google model docs before use:

  • gemini-3.1-flash-image-preview (package default alias, unverified as a Google-confirmed model name)
  • gemini-2.5-flash-image (package fallback alias, verify before use)

get_image_history

Retrieve list of images generated in the current session.

Parameters: None

Returns: Array of image entries with paths and prompts

clear_conversation

Reset session context and conversation history.

Parameters: None

Returns: Confirmation of reset

Environment Variables

VariableRequiredDescription
GOOGLE_AI_API_KEYYesAPI key from https://aistudio.google.com/apikey
NANOBANANA_MODELNoOverride default model from the installed MCP package

Output Directory

All generated images are saved to: ~/Documents/nanobanana_generated/

Images are named with timestamps for easy identification.

Feature Availability via MCP

Some newer Gemini API features depend on the MCP package version of @ycse/nanobanana-mcp. Check the package version to confirm support:

FeatureAPI StatusMCP Support
imageSize (resolution control)AvailableDepends on package version
Thinking level (thinkingConfig)AvailableDepends on package version
Search grounding (googleSearch)AvailableDepends on package version
Image-only output (responseModalities: ["IMAGE"])AvailableDepends on package version
Multi-image input (up to 14 refs)AvailableVia gemini_chat with image paths
All 14 aspect ratiosAvailableVia set_aspect_ratio

If a feature is not yet supported by the MCP package, you can still use it via direct API calls with curl or the Google AI SDK.


Supporting file: references/post-processing.md

Post-Processing Pipeline Reference

Load this on-demand when the user needs image manipulation after generation.

Prerequisites

Check availability before using:

which magick    # ImageMagick 7 (preferred)
which convert   # ImageMagick 6 (fallback)
which ffmpeg    # For video/animation

Install ImageMagick if not present: sudo apt install imagemagick (Debian/Ubuntu) or brew install imagemagick (macOS).

Common Operations

Resize for Platforms

# Instagram post (1080x1080)
magick input.png -resize 1080x1080^ -gravity center -extent 1080x1080 instagram.png

# Twitter/X header (1500x500)
magick input.png -resize 1500x500^ -gravity center -extent 1500x500 twitter-header.png

# YouTube thumbnail (1280x720)
magick input.png -resize 1280x720^ -gravity center -extent 1280x720 youtube-thumb.png

# LinkedIn banner (1584x396)
magick input.png -resize 1584x396^ -gravity center -extent 1584x396 linkedin-banner.png

# Favicon (multi-size ICO)
magick input.png -resize 32x32 favicon.ico

Background Removal (Transparency)

# Remove solid white background
magick input.png -fuzz 10% -transparent white output.png

# Remove solid color background (specify color)
magick input.png -fuzz 15% -transparent "#F0F0F0" output.png

# Clean edges after transparency (anti-alias)
magick input.png -fuzz 10% -transparent white -channel A -blur 0x1 -level 50%,100% output.png

# Auto-crop transparent padding
magick input.png -trim +repage output.png

Format Conversion

# PNG to WebP (web-optimized, smaller file)
magick input.png -quality 85 output.webp

# PNG to JPEG (with white background for transparency)
magick input.png -background white -flatten -quality 90 output.jpg

# PNG to AVIF (modern, smallest size)
magick input.png -quality 80 output.avif

# SVG trace (for logos; requires potrace)
potrace input.pbm -s -o output.svg

Color Adjustments

# Increase contrast
magick input.png -contrast-stretch 2%x1% output.png

# Warm color temperature
magick input.png -modulate 100,110,105 output.png

# Cool color temperature
magick input.png -modulate 100,90,95 output.png

# Desaturate (muted colors)
magick input.png -modulate 100,70,100 output.png

# Convert to grayscale
magick input.png -colorspace Gray output.png

# Sepia tone
magick input.png -sepia-tone 80% output.png

Compositing

# Overlay watermark (bottom-right, 20% opacity)
magick base.png watermark.png -gravity southeast -geometry +20+20 \
  -compose dissolve -define compose:args=20 -composite output.png

# Side-by-side comparison
magick input1.png input2.png +append comparison.png

# Vertical stack
magick input1.png input2.png -append stack.png

# Add padding/border
magick input.png -bordercolor white -border 40 output.png

# Add rounded corners
magick input.png \( +clone -alpha extract -draw \
  "roundrectangle 0,0,%[fx:w-1],%[fx:h-1],20,20" \) \
  -alpha off -compose CopyOpacity -composite rounded.png

Batch Processing

# Resize all PNGs in directory
for f in ~/Documents/nanobanana_generated/*.png; do
  magick "$f" -resize 800x800 "${f%.png}_thumb.png"
done

# Convert all to WebP
for f in ~/Documents/nanobanana_generated/*.png; do
  magick "$f" -quality 85 "${f%.png}.webp"
done

Animation (GIF/Video from Multiple Frames)

# Create GIF from multiple images
magick -delay 100 frame1.png frame2.png frame3.png animation.gif

# Create MP4 from image sequence
ffmpeg -framerate 1 -pattern_type glob -i '*.png' \
  -c:v libx264 -pix_fmt yuv420p slideshow.mp4

Note on 4K Output

With Gemini 3.1 Flash's imageSize: "4K" option (up to 4096×4096), many traditional upscaling post-processing steps are no longer necessary. If your target platform accepts images at or below 4K resolution, generate at native 4K instead of generating at 1K and upscaling. This produces better detail and avoids upscaling artifacts.

Green Screen Transparency Pipeline

Gemini cannot generate transparent backgrounds. Use this workaround:

1. Generate with green screen prompt

Append to any prompt:

on a solid bright green (#00FF00) chroma key background
with a thin white outline separating the subject from the background

2. Remove green screen (ImageMagick)

magick input.png -fuzz 20% -transparent "#00FF00" output.png

3. Clean edges + trim (ImageMagick)

magick output.png -channel A -blur 0x1 -level 50%,100% -trim +repage final.png

4. Alternative (FFmpeg, better for batch)

ffmpeg -i input.png -vf "colorkey=0x00FF00:0.3:0.1,despill=type=green" -pix_fmt rgba output.png

Tips

  • -fuzz 20% handles slight color variations at edges; increase to 25% for softer edges
  • The white outline in the prompt helps prevent color spill on subject edges
  • For batch processing, the FFmpeg approach is faster and handles despill automatically
  • Always verify edges after conversion; may need manual touchup for hair/fur

Quality Assessment

# Get image dimensions and info
magick identify -verbose input.png | head -20

# Check file size
ls -lh input.png

# Get exact pixel dimensions
magick identify -format "%wx%h" input.png

Supporting file: references/presets.md

Brand/Style Presets Reference

Load this on-demand when the user asks about presets or brand consistency.

Preset Schema

Each preset is stored as ~/.banana/presets/NAME.json:

{
  "name": "tech-saas",
  "description": "Clean tech SaaS brand",
  "colors": ["#2563EB", "#1E40AF", "#F8FAFC"],
  "style": "clean minimal tech illustration, flat vectors, soft shadows",
  "typography": "bold geometric sans-serif",
  "lighting": "bright diffused studio, no harsh shadows",
  "mood": "professional, trustworthy, modern",
  "default_ratio": "16:9",
  "default_resolution": "2K"
}

Example Presets

tech-saas

  • Colors: #2563EB, #1E40AF, #F8FAFC (blue + white)
  • Style: Clean minimal tech illustration, flat vectors, soft shadows
  • Typography: Bold geometric sans-serif
  • Mood: Professional, trustworthy, modern

luxury-brand

  • Colors: #1A1A1A, #C9A96E, #FAFAF5 (black + gold + cream)
  • Style: Elegant high-end photography, rich textures, deep contrast
  • Typography: Thin elegant serif, generous letter-spacing
  • Mood: Exclusive, sophisticated, aspirational

editorial-magazine

  • Colors: #000000, #FFFFFF, #FF3B30 (black + white + accent red)
  • Style: Bold editorial photography, strong geometric composition
  • Typography: Condensed all-caps sans-serif headlines
  • Mood: Bold, provocative, contemporary

How Presets Merge into Reasoning Brief

When a preset is active, Claude uses its values as defaults for the Reasoning Brief:

  1. Colors → inform palette descriptions in Context and Style components
  2. Style → becomes the base for the Style component
  3. Typography → used for any text rendering
  4. Lighting → becomes the base for the Lighting component
  5. Mood → influences Action and Context components

User instructions always override preset values. If a user says "make it dark" but the preset has bright lighting, follow the user's instruction.

Managing Presets

# List presets
presets.py list

# Show details
presets.py show tech-saas

# Create interactively (Claude fills in details from conversation)
presets.py create NAME --colors "#hex,#hex" --style "..." --mood "..."

# Delete
presets.py delete NAME --confirm

Supporting file: references/prompt-engineering.md

Prompt Engineering Reference: Claude Banana

Load this on-demand when constructing complex prompts or when the user asks about prompt techniques. Do NOT load at startup.

Package prompt guidance. Do not cite this as aligned with a Google-owned prompting guide unless a current source is verified.

Table of Contents

The 6-Component Reasoning Brief

Every image prompt should contain these components, written as natural narrative paragraphs, NEVER as comma-separated keyword lists.

1. Subject

The main focus of the image. Describe with physical specificity.

Good: "A weathered Japanese ceramicist in his 70s, deep sun-etched wrinkles mapping decades of kiln work, calloused hands cradling a freshly thrown tea bowl with an irregular, organic rim"

Bad: "old man, ceramic, bowl"

2. Action

What is happening. Movement, pose, gesture, state of being.

Good: "leaning forward with intense concentration, gently smoothing the rim with a wet thumb, a thin trail of slip running down his wrist"

Bad: "making pottery"

3. Context

Environment, setting, temporal and spatial details.

Good: "inside a traditional wood-fired anagama kiln workshop, stacked shelves of drying pots visible in the soft background, late afternoon light filtering through rice paper screens"

Bad: "workshop, afternoon"

4. Composition

Camera angle, shot type, framing, spatial relationships.

Good: "intimate close-up shot from slightly below eye level, shallow depth of field isolating the hands and bowl against the soft bokeh of the workshop behind"

Bad: "close up"

5. Lighting

Light source, quality, direction, temperature, shadows.

Good: "warm directional light from a single high window camera-left, creating gentle Rembrandt lighting on the face with a soft triangle of light on the shadow-side cheek, deep warm shadows in the workshop"

Bad: "natural lighting"

6. Style

Art medium, aesthetic reference, technical photographic details.

Good: "captured with a Sony A7R IV, 85mm f/1.4 GM lens, Kodak Portra 400 color grading with lifted shadows and muted earth tones, reminiscent of Dorothea Lange's documentary portraiture"

Bad: "photorealistic, 8K, masterpiece"

Domain Mode Modifier Libraries

Cinema Mode

Camera specs: RED V-Raptor, ARRI Alexa 65, Sony Venice 2, Blackmagic URSA Lenses: Cooke S7/i, Zeiss Supreme Prime, Atlas Orion anamorphic Film stocks: Kodak Vision3 500T (tungsten), Kodak Vision3 250D (daylight), Fuji Eterna Vivid Lighting setups: three-point, chiaroscuro, Rembrandt, split, butterfly, rim/backlight Shot types: establishing wide, medium close-up, extreme close-up, Dutch angle, overhead crane, Steadicam tracking Color grading: teal and orange, desaturated cold, warm vintage, high-contrast noir

Product Mode

Surfaces: polished marble, brushed concrete, raw linen, acrylic riser, gradient sweep Lighting: softbox diffused, hard key with fill card, rim separation, tent lighting, light painting Angles: 45-degree hero, flat lay, three-quarter, straight-on, worm's-eye Style refs: Apple product photography, Aesop minimal, Bang & Olufsen clean, luxury cosmetics

Portrait Mode

Focal lengths: 85mm (classic), 105mm (compression), 135mm (telephoto), 50mm (environmental) Apertures: f/1.4 (dreamy bokeh), f/2.8 (subject-sharp), f/5.6 (environmental context) Pose language: candid mid-gesture, direct-to-camera confrontational, profile silhouette, over-shoulder glance Skin/texture: freckles visible, pores at macro distance, catch light in eyes, subsurface scattering

Editorial/Fashion Mode

Publication refs: Vogue Italia, Harper's Bazaar, GQ, National Geographic, Kinfolk Styling notes: layered textures, statement accessories, monochromatic palette, contrast patterns Locations: marble staircase, rooftop at golden hour, industrial loft, desert dunes, neon-lit alley Poses: power stance, relaxed editorial lean, movement blur, fabric in wind

UI/Web Mode

Styles: flat vector, isometric 3D, line art, glassmorphism, neumorphism, material design Colors: specify exact hex or descriptive palette (e.g., "cool blues #2563EB to #1E40AF") Sizing: design at 2x for retina, specify exact pixel dimensions needed Backgrounds: transparent (request solid white then post-process), gradient, solid color

Logo Mode

Construction: geometric primitives, golden ratio, grid-based, negative space Typography: bold sans-serif, elegant serif, custom lettermark, monogram Colors: max 2-3 colors, works in monochrome, high contrast Output: request on solid white background, post-process to transparent

Landscape Mode

Depth layers: foreground interest, midground subject, background atmosphere Atmospherics: fog, mist, haze, volumetric light rays, dust particles Time of day: blue hour (pre-dawn), golden hour, magic hour (post-sunset), midnight blue Weather: dramatic storm clouds, clearing after rain, snow-covered, sun-dappled

Infographic Mode

Layout: modular sections, clear visual hierarchy, bento grid, flow top-to-bottom Text: use quotes for exact text, descriptive font style, specify size hierarchy Data viz: bar charts, pie charts, flow diagrams, timelines, comparison tables Colors: high-contrast, accessible palette, consistent brand colors

Abstract Mode

Geometry: fractals, voronoi tessellation, spirals, fibonacci, organic flow, crystalline Textures: marble veining, fluid dynamics, smoke wisps, ink diffusion, watercolor bleed Color palettes: analogous harmony, complementary clash, monochromatic gradient, neon-on-black Styles: generative art, data visualization art, glitch, procedural, macro photography of materials

Advanced Techniques

Character Consistency (Multi-turn)

Use gemini_chat and maintain descriptive anchors:

  • First turn: Generate character with exhaustive physical description
  • Following turns: Reference "the same character" + repeat 2-3 key identifiers
  • Key identifiers: hair color/style, distinctive clothing, facial feature

Multi-image reference technique (3.1 Flash):

  • Provide up to 4-5 character reference images in the conversation
  • Assign distinct names to each character ("Character A: the red-haired knight")
  • Model preserves features across different angles, actions, and environments
  • Works best when reference images show the character from multiple angles

Style Transfer Without Reference Images

Describe the target style exhaustively instead of referencing an image:

Render this scene in the style of a 1950s travel poster: flat areas of
color in a limited palette of teal, coral, and cream. Bold geometric
shapes with visible paper texture. Hand-lettered title text with a
mid-century modern typeface feel.

Text Rendering Tips

  • Quote exact text: with the text "OPEN DAILY" in bold condensed sans-serif
  • 25 characters or less:this is the practical limit for reliable rendering
  • 2-3 distinct phrases max:more text fragments degrade quality
  • Describe font characteristics, not font names
  • Specify placement: "centered at the top third", "along the bottom edge"
  • High contrast: light text on dark, or vice versa
  • Text-first hack: Establish the text concept conversationally first ("I need a sign that says FRESH BREAD"), then generate. The model anchors on text mentioned early
  • Expect creative font interpretations, not exact replication of described styles

Positive Framing (No Negative Prompts)

Gemini does NOT support negative prompts. Rephrase exclusions:

  • Instead of "no blur" → "sharp, in-focus, tack-sharp detail"
  • Instead of "no people" → "empty, deserted, uninhabited"
  • Instead of "no text" → "clean, uncluttered, text-free"
  • Instead of "not dark" → "brightly lit, high-key lighting"

Search-Grounded Generation

For images based on real-world data (weather, events, statistics), Gemini can use Google Search grounding to incorporate live information. Useful for infographics with current data.

Three-part formula for search-grounded prompts:

  1. [Source/Search request:What to look up
  2. [Analytical task:What to analyze or extract
  3. [Visual translation:How to render it as an image

Example: "Search for the current top 5 programming languages by GitHub usage in 2026, analyze their relative popularity percentages, then generate a clean infographic bar chart with the language logos and percentages in a modern dark theme."

Prompt Adaptation Rules

When adapting prompts from the claude-prompts database (Midjourney/DALL-E/etc.) to Gemini's natural language format:

Source SyntaxGemini Equivalent
--ar 16:9Call set_aspect_ratio("16:9") separately
--v 6, --style rawRemove - Gemini has no version/style flags
--chaos 50Describe variety: "unexpected, surreal composition"
--no treesPositive framing: "open clearing with no vegetation"
(word:1.5) weightDescriptive emphasis: "prominently featuring [word]"
8K, masterpiece, ultra-detailedKeep only "ultra-realistic, high resolution"; remove the rest
Comma-separated tagsExpand into descriptive narrative paragraphs
shot on HasselbladKeep - camera specs work well in Gemini

Common Prompt Mistakes

  1. Keyword stuffing:stacking generic quality terms ("8K, masterpiece, best quality") adds nothing. Use only "ultra-realistic, high resolution" at the end
  2. Tag lists:Gemini wants prose, not "red car, sunset, mountain, cinematic"
  3. Missing lighting:The single biggest quality differentiator
  4. No composition direction:Results in generic centered framing
  5. Vague style:"make it look cool" vs specific art direction
  6. Ignoring aspect ratio:Always set before generating
  7. Overlong prompts:Diminishing returns past ~200 words; be precise, not verbose
  8. Text longer than ~25 characters:Rendering degrades rapidly past this limit
  9. Burying key details at the end:In long prompts, details placed last may be deprioritized; put critical specifics (exact text, key constraints) in the first third of the prompt
  10. Not iterating with follow-up prompts:Use gemini_chat for progressive refinement instead of trying to get everything right in one generation

Proven Prompt Templates

Extracted from 2,500+ tested prompts. These patterns consistently produce high-quality results. Use them as starting points and adapt to the request.

The Winning Formula (Weight Distribution)

ComponentWeightWhat to include
Subject40%Age, skin tone, hair color/style, eye color, body type, expression
Styling25%Brand names, textures, fit, accessories, colors
Environment15%Location + time of day + context details
Camera10%Camera model + lens + focal length + shot type
Lighting10%Quality, direction, color temperature, shadows

Instagram Ad / Social Media

Pattern: [Subject with age/appearance] + [outfit with brand/texture] + [action verb] + [setting] + [camera spec] + [lighting] + [platform aesthetic]

Example (Product Placement):

Hyper-realistic gym selfie of athletic 24yo influencer with glowing olive
skin, wearing crinkle-textured athleisure set in mauve. iPhone 16 Pro Max
front-facing portrait mode capturing sweat droplets on collarbones, hazel
eyes enhanced by gym LED lighting. Mirror reflection shows perfect form,
golden morning light through floor-to-ceiling windows. Frayed chestnut
ponytail with baby hairs, ultra-detailed skin texture, trending aesthetic.

Example (Lifestyle Ad):

A 24-year-old blonde fitness model in a high-energy sports drink
advertisement. Mid-run on a beach, wearing a vibrant orange sports bra
and black shorts, playful smile and sparkling blue eyes exuding vitality.
Bottle of the drink held in hand, waves crashing in background. Shot on
Nikon D850 with 70-200mm f/2.8 lens, natural light, fast shutter speed
capturing motion. Ultra-realistic skin texture, water droplets, product
label clearly visible.

Example (Luxury Lifestyle):

Gorgeous Instagram model wearing a designer silk gown, luxury rooftop
restaurant, golden hour lighting, champagne in hand, luxurious aspirational
lifestyle. Captured with Sony A7R IV, 85mm f/1.4 lens, shallow depth of
field, warm color grading.

Product / Commercial Photography

Pattern: [Product with brand/detail] + [dynamic elements] + [surface/setting] + "commercial photography for advertising campaign" + [lighting] + "high resolution"

Example (Beverage):

Gatorade bottle with condensation dripping down the sides, surrounded by
lightning bolts and a burst of vibrant blue and orange light rays. The
Gatorade logo is prominently displayed on the bottle, with splashes of
water frozen in mid-air. Commercial food photography for an advertising
campaign, high resolution, high level of detail, vibrant complementary
colors.

Example (Food):

In and Out burger with layers of fresh lettuce, melted cheese, and pretzel
bun, placed on a white surface with the In and Out logo subtly glowing in
the background. Falling french fries and golden light, warm scene.
Commercial food photography for an advertising campaign, high resolution,
high level of detail, vibrant complementary colors.

Fashion / Editorial

Pattern: [Subject with ethnicity/age/features] + [outfit with texture/brand/cut] + [location] + [pose/action] + [camera + lens] + [lighting quality]

Example (Street Style):

A 24-year-old female AI influencer posing confidently in an urban cityscape
during golden hour. Flawless sun-kissed skin, long wavy brown hair, deep
green eyes. Wearing a chic streetwear outfit: oversized beige blazer,
white top, high-waisted jeans. Captured with Sony A7R IV at 85mm f/1.4,
shallow depth of field with warm golden bokeh.

Example (High Fashion):

Stunning 24-year-old woman, long platinum blonde hair, radiant skin,
piercing blue eyes, dressed in a chic pastel blazer with a modern
minimalist aesthetic, soft sunlight glow, high-end fashion appeal.
Shot on Canon EOS R5, 85mm f/1.2 lens.

Example (Avant-Garde):

A blonde fitness model transformed into a runway-ready fashion icon,
wearing a bold avant-garde outfit: cropped leather jacket with neon pink
accents, paired with high-waisted athletic shorts and knee-high boots.
Captured mid-stride on a minimalist white runway, playful twinkle in her
eye, dramatic studio lighting from above.

SaaS / Tech Marketing

Pattern: [UI mockup or abstract visual] + "on [dark/light] background" + [specific colors with hex] + [typography description] + "clean, premium SaaS aesthetic" + [glassmorphism/gradient/glow effects]

Example (Dashboard Hero):

A floating glassmorphism UI card on a deep charcoal background showing a
content analytics dashboard with a rising line graph in teal (#14B8A6),
bar charts in coral (#F97316), and a circular progress indicator at 94%.
Subtle grid lines, frosted glass effect with 20% opacity, teal glow
bleeding from the card edges. Clean premium SaaS aesthetic, no text
smaller than headline size.

Example (Feature Highlight):

An isometric 3D illustration of interconnected data nodes on a dark navy
background. Each node is a glowing teal sphere connected by thin luminous
lines, forming a constellation pattern. One central node pulses brighter
with radiating rings. Modern tech illustration style with subtle depth
of field, volumetric lighting from below.

Example (Comparison/Before-After):

Split-screen image: left side shows a cluttered, dim workspace with
scattered papers, red error indicators, and a frustrated expression
conveyed through a cracked coffee mug and tangled cables. Right side
shows a clean, organized dashboard interface glowing in teal and white
on a dark background, with smooth flowing lines and checkmarks. A sharp
vertical dividing line separates chaos from clarity.

Logo / Branding

Pattern: [Product/bottle/item] + "with [brand element] prominently displayed" + [dynamic visual elements] + "commercial photography" + [lighting style] + "high resolution, vibrant complementary colors"

Example:

A sleek matte black bottle with a minimal white logo mark centered on the
label, surrounded by swirling gradient ribbons of teal and coral light.
The bottle sits on a reflective dark surface, sharp studio rim lighting
separating it from the background. Product photography for luxury
branding, high resolution, dramatic contrast.

Key Tactics That Make Prompts Work

  1. Name real cameras:"Sony A7R IV", "Canon EOS R5", "iPhone 16 Pro Max" anchor realism
  2. Specify exact lens:"85mm f/1.4" gives the model precise depth-of-field information
  3. Use age + ethnicity + features:"24yo with olive skin, hazel eyes" beats "a person"
  4. Name brands for styling:"Lululemon mat", "Tom Ford suit" triggers specific visual associations
  5. Include micro-details:"sweat droplets on collarbones", "baby hairs stuck to neck"
  6. Add platform context:"Instagram aesthetic", "commercial photography for advertising"
  7. Describe textures:"crinkle-textured", "metallic silver", "frosted glass"
  8. Use action verbs:"mid-run", "posing confidently", "captured mid-stride"
  9. End with "ultra-realistic, high resolution":these two specific anchors help on Gemini. Avoid generic stacking like "8K, masterpiece, best quality" which adds no value
  10. For products, say "prominently displayed":ensures the product/logo isn't hidden

Anti-Patterns (What NOT to Do)

  • "A dark-themed Instagram ad showing...":too meta, describes the concept not the image
  • "A sleek SaaS dashboard visualization...":abstract, no visual anchors
  • "Modern, clean, professional...":vague adjectives that mean nothing to the model
  • "A bold call to action with...":describes marketing intent, not visual content
  • Describing what the viewer should feel:instead, describe what creates that feeling

Safety Filter Rephrase Strategies

Gemini's safety filters (Layer 2: server-side output filter) cannot be disabled. When a prompt is blocked, the only path forward is rephrasing.

Common Trigger Categories

CategoryTriggers onRephrase approach
Violence/weaponsCombat, blood, injuries, firearmsUse metaphor or aftermath: "battle-worn" → "weathered veteran"
Medical/goreSurgery, wounds, anatomical detailAbstract or clinical: "open wound" → "medical illustration"
Real public figuresNamed celebrities, politiciansUse archetypes: "Elon Musk" → "a tech entrepreneur in a minimalist office"
Children + riskMinors in any ambiguous contextAdd safety context: specify educational, family, or playful framing
NSFW/suggestiveRevealing clothing, intimate posesUse artistic framing: "fashion editorial, fully clothed, editorial pose"

Rephrase Patterns

  1. Abstraction:Replace specific dangerous elements with abstract concepts
  2. Artistic framing:Frame content as art, editorial, or documentary
  3. Metaphor:Use symbolic language instead of literal descriptions
  4. Positive emphasis:Describe what IS present, not what's dangerous
  5. Context shift:Move from threatening to educational/professional context

Example Rephrases

Blocked promptSuccessful rephrase
"a soldier in combat firing a rifle""a determined soldier standing guard at dawn, rifle slung over shoulder, morning mist over the outpost"
"a scary horror monster""a fantastical creature from a dark fairy tale, intricate organic textures, bioluminescent accents, concept art style"
"dog in a fight""a friendly golden retriever playing energetically in a sunny park, action shot, joyful expression"
"medical surgery scene""a clean modern operating room viewed from the observation gallery, soft blue surgical lights, professional documentary style"
"celebrity portrait of [name]""a distinguished middle-aged man in a tailored navy suit, warm studio lighting, editorial portrait style"

Key Principle

Layer 2 (output filter) analyzes the generated image, not just the prompt. Even well-phrased prompts can be blocked if the model's interpretation triggers the output filter. When this happens, try shifting the visual concept further from the trigger rather than just changing words.


Supporting file: references/seo-image-presets.md

SEO Image Presets

Pre-configured presets for common SEO image use cases. These map to banana's preset format (see references/presets.md for schema details).

Preset Templates

og-default:Standard OG/Social Preview

{
  "name": "og-default",
  "description": "Clean, professional OG image for social sharing",
  "aspect_ratio": "16:9",
  "resolution": "1K",
  "domain_mode": "Product",
  "style": {
    "colors": ["#FFFFFF", "#F5F5F5"],
    "mood": "Professional, clean, trustworthy",
    "lighting": "Bright, even studio lighting with soft shadows",
    "typography": "Modern sans-serif if text needed"
  },
  "post_processing": "magick output.png -resize 1200x630^ -gravity center -extent 1200x630 output-og.webp"
}

blog-hero:Widescreen Blog Hero Image

{
  "name": "blog-hero",
  "description": "Dramatic widescreen hero for blog posts",
  "aspect_ratio": "16:9",
  "resolution": "2K",
  "domain_mode": "Cinema",
  "style": {
    "colors": ["contextual"],
    "mood": "Dramatic, atmospheric, editorial",
    "lighting": "Golden hour or moody blue hour, directional",
    "typography": "None:image only"
  },
  "post_processing": "magick output.png -quality 85 output-hero.webp"
}

product-white:E-commerce Product Shot

{
  "name": "product-white",
  "description": "Clean white background product photography",
  "aspect_ratio": "4:3",
  "resolution": "2K",
  "domain_mode": "Product",
  "style": {
    "colors": ["#FFFFFF"],
    "mood": "Clean, professional, catalog-ready",
    "lighting": "360-degree soft studio lighting, minimal shadows",
    "typography": "None"
  },
  "prompt_suffix": "Studio product photography, clean white background, professional catalog shot, high resolution",
  "post_processing": "magick output.png -fuzz 5% -transparent white output-transparent.png"
}

social-square:Social Media Square

{
  "name": "social-square",
  "description": "1:1 square image for social media platforms",
  "aspect_ratio": "1:1",
  "resolution": "1K",
  "domain_mode": "UI/Web",
  "style": {
    "colors": ["brand-contextual"],
    "mood": "Engaging, scroll-stopping, platform-native",
    "lighting": "Bright, even, high-contrast",
    "typography": "Bold sans-serif if text needed, under 25 characters"
  }
}

infographic-vertical:Data-Heavy Infographic

{
  "name": "infographic-vertical",
  "description": "Tall vertical infographic for data visualization",
  "aspect_ratio": "2:3",
  "resolution": "4K",
  "domain_mode": "Infographic",
  "style": {
    "colors": ["brand-contextual", "data-visualization palette"],
    "mood": "Informative, structured, authoritative",
    "lighting": "Flat, even, no dramatic shadows",
    "typography": "Clear hierarchy:headline, subheads, body, captions"
  },
  "notes": "Use thinking: high for better text rendering accuracy"
}

favicon-mark:Favicon / App Icon

{
  "name": "favicon-mark",
  "description": "Minimal iconic mark for favicon or app icon",
  "aspect_ratio": "1:1",
  "resolution": "512",
  "domain_mode": "Logo",
  "style": {
    "colors": ["2-3 brand colors max"],
    "mood": "Minimal, recognizable, scalable",
    "lighting": "Flat, no shadows",
    "typography": "Single letter or symbol only"
  },
  "post_processing": "magick output.png -resize 32x32 favicon.ico && magick output.png -resize 180x180 apple-touch-icon.png"
}

Creating Custom Presets

Users can create their own presets with the installed Banana MCP preset tool. If the standalone Banana extension is not installed, configure it before using custom presets. The core claude-seo skill does not assume a local fallback script or a fixed personal configuration directory.

This creates ~/.banana/presets/my-brand.json with the full schema. Custom presets override SEO defaults when specified.

Preset Selection Logic

  1. If user specifies a use case command (og, hero, product), load the matching preset
  2. If user mentions a brand preset name, load from ~/.banana/presets/
  3. Brand presets override SEO presets for colors, mood, and typography
  4. SEO presets always provide aspect ratio and resolution defaults

How do I install SEO image gen: AI image generation for SEO assets (extension) in Cursor, Claude Code, or Codex?

Run npx skills add agricidaniel/claude-seo --skill seo-image-gen in the project where you want it, then ask your agent for the skill by name. The --skill flag installs only SEO image gen: AI image generation for SEO assets (extension), not every skill in the repository.

Where does SEO image gen: AI image generation for SEO assets (extension) come from and what license is it under?

SEO image gen: AI image generation for SEO assets (extension) comes from the agricidaniel/claude-seo repository on GitHub. That repository has 15.1K GitHub stars. The skill is published under the MIT license.

Prefer plain text? Read the SEO image gen: AI image generation for SEO assets (extension) guide as markdown.