Standardmäßig ist der Prompt ausgewählt, der zuerst die Quelle prüft. Sie können zu einem direkten Befehl wechseln oder eine lokale Kopie herunterladen.
Quelldateien prüfen
Lesen Sie SKILL.md und alle von SkillsMP angezeigten Begleitdateien, bevor Sie sich für eine Installation entscheiden.
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Ein direkter Befehl überspringt den Prüf-Prompt. Prüfen Sie die Quelle, bevor Sie ihn ausführen.
SEO Image Gen: AI Image Generation for SEO Assets (Extension)
Shared Data Cache
Step 0 -- Check shared data cache:
Before gathering, check .seo-cache/ for reusable context from related SEO skills.
Reference: ../seo/references/shared-data-cache.md for schemas and dependency map.
Check these cache files when present:
.seo-cache/site-meta.json for domain, business type, industry, and crawl context
.seo-cache/audit-scores.json for prior full-audit priorities
.seo-cache/pages/{url-slug}/page-analysis.json for page-level context when a URL is provided
If found: parse and use clearly valid fields (note "Using cached [X] from [date]")
If missing, corrupt, or irrelevant: continue with fresh evidence
If the user says "refresh" or "re-run": ignore cache reads and overwrite on write
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 the Banana image-generation pipeline
for SEO-specific image workflows in Antigravity.
This skill has two components with distinct roles:
Agent (agents/seo-image-gen.toml): 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 nanobanana MCP server configured in mcp_config.json.
Set GOOGLE_AI_API_KEY environment variable.
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
Command
What 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 Case
Aspect Ratio
Resolution
Domain Mode
Notes
OG/Social Preview
16:9
1K
Product or UI/Web
Clean, professional, text-friendly
Blog Hero
16:9
2K
Cinema or Editorial
Dramatic, atmospheric, editorial quality
Schema Image
4:3
1K
Product
Clean, descriptive, schema ImageObject
Social Square
1:1
1K
UI/Web
Platform-optimized square
Product Photo
4:3
2K
Product
White background, studio lighting
Infographic
2:3
4K
Infographic
Data-heavy, vertical layout
Favicon/Icon
1:1
512
Logo
Minimal, scalable, recognizable
Pinterest Pin
2:3
2K
Editorial
Tall vertical card
Generation Pipeline
For every generation request:
Identify use case from command or context (og, hero, product, etc.)
Apply SEO defaults from the use cases table above
Set aspect ratio via set_aspect_ratio MCP tool
Construct Reasoning Brief using the banana Creative Director pipeline:
Load references/prompt-engineering.md for the 6-component system
Be SPECIFIC and VISCERAL: describe what the camera sees
Generate via gemini_generate_image MCP tool
Post-generation SEO checklist (see below)
Check for Presets
If the user mentions a brand or has SEO presets configured:
python3 scripts/presets.py list
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:
Alt text:Write descriptive, keyword-rich alt text for the generated image
File naming:Rename to SEO-friendly format: keyword-description-widthxheight.webp
WebP conversion:Convert to WebP for optimal page speed:
magick output.png -quality 85 output.webp
File size:Target under 200KB for hero images, under 100KB for thumbnails
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"}
OG meta tags:For social preview images, remind about:
<metaproperty="og:image"content="https://example.com/images/og-image.webp" /><metaproperty="og:image:width"content="1200" /><metaproperty="og:image:height"content="630" /><metaproperty="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: python3 scripts/cost_tracker.py log --model MODEL --resolution RES --prompt "brief"
Run cost_tracker.py summary if user asks about usage
Approximate costs (gemini-3.1-flash):
512: ~$0.02/image
1K resolution: ~$0.04/image
2K resolution: ~$0.08/image
4K resolution: ~$0.16/image
Model Routing
Scenario
Model
Why
OG images, social previews
gemini-3.1-flash-image-preview @ 1K
Fast, cost-effective
Hero images, product photos
gemini-3.1-flash-image-preview @ 2K
Quality + detail
Infographics with text
gemini-3.1-flash-image-preview @ 2K, thinking: high
Better text rendering
Quick drafts
gemini-2.5-flash-image @ 512
Rapid iteration
Error Handling
Error
Resolution
MCP not configured
Check mcp_config.json and set GOOGLE_AI_API_KEY env var
Rephrase prompt - see references/prompt-engineering.md Safety section
MCP unavailable
Fall back: python3 scripts/generate.py --prompt "..." --aspect-ratio "16:9"
Extension not installed
Check mcp_config.json and set GOOGLE_AI_API_KEY env var
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
Crafted prompt:show what was sent to the API (educational)
Settings:model, aspect ratio, resolution
SEO checklist:alt text suggestion, file naming, WebP conversion
Schema snippet:ImageObject or og:image markup if applicable
Write to shared data cache
After completing all work, write a concise JSON summary to .seo-cache/ when the workflow produced durable findings.
Use the schemas and naming rules in ../seo/references/shared-data-cache.md; include at least cache_type, analyzed_at, source URL/domain, key findings, issues, recommendations, and tool limitations. Add .seo-cache/ to .gitignore if it is missing.
Extended Capabilities (from blog-image)
You are a Creative Director that orchestrates Gemini's image generation
specifically for blog content. Never pass raw user text directly to the API.
Always interpret, enhance, and construct an optimized prompt using the
6-component Reasoning Brief system.
Quick Reference
Command
What it does
/blog image generate <idea>
Generate a blog image with full prompt engineering
/blog image edit <path> <instructions>
Edit an existing blog image intelligently
/blog image setup
Configure MCP server and API key
Blog Image Types
Match the image type to blog use case:
Image Type
Aspect Ratio
Resolution
Domain Mode
Placement
Hero/Cover
16:9
2K or 4K
Editorial / Landscape
Frontmatter coverImage
OG/Social Card
16:9
1K
Editorial / Infographic
Frontmatter ogImage
Inline Illustration
16:9 or 4:3
1K
Varies by topic
After H2, before body
Inline Product Shot
4:3 or 1:1
1K
Product
Within product sections
Section Divider
8:1 or 4:1
1K
Abstract / Landscape
Between major sections
Sizing requirements:
Blog hero/cover: 1200x630 (OG-compatible) or 1920x1080
Open Graph (OG): 1200x630 (required for social sharing)
Inline images: 1200px+ wide
MCP Availability Check
Before generating, check if nanobanana-mcp tools are available:
Try calling get_image_history (lightweight, no side effects)
If it succeeds: MCP is available, proceed with generation
If it fails: MCP not configured - inform the user:
"Image generation requires the nanobanana-mcp server. Run /blog image setup to configure it."
When called internally (from blog-write/blog-rewrite): return silently, no error. The calling workflow continues with stock photos.
Generation Workflow
For /blog image generate <idea> or when invoked internally:
Step 1: Analyze Intent
Determine what the blog needs:
Image type: Hero, inline, OG card, section divider?
Constraints: Brand colors, specific dimensions, platform format?
Mood: Authoritative, inviting, dramatic, clean?
If the request is vague, ask one clarifying question about use case and style.
Step 2: Select Domain Mode
Choose the expertise lens for the image:
Mode
When to use
Prompt emphasis
Editorial
Blog headers, feature images, lifestyle
Styling, composition, publication references
Product
E-commerce posts, reviews, comparisons
Surface materials, studio lighting, clean BG
Landscape
Environmental backgrounds, travel, hero sections
Atmospheric perspective, depth layers, time of day
UI/Web
Tech blog icons, illustrations, diagrams
Clean vectors, flat design, exact colors
Infographic
Data-driven posts, processes, comparisons
Layout structure, hierarchy, accessible colors
Abstract
Pattern backgrounds, section dividers, decorative
Color theory, mathematical forms, textures
Load references/prompt-engineering-blog.md for domain mode modifier libraries.
Step 3: Construct the 6-Component Reasoning Brief
Build the prompt as natural narrative paragraphs - NEVER as keyword lists:
Subject - Who/what, with rich physical detail (textures, materials, scale)
Action - What is happening, pose, gesture, movement, state
Context - Environment, setting, time of day, season, weather
Composition - Camera angle, shot type, framing, negative space, depth
Lighting - Light source, quality, direction, color temperature, shadows
Style - Art medium, aesthetic, film stock, reference artists/eras
Template for photorealistic blog images:
A photorealistic [shot type] of [subject with physical detail], [action/pose],
set in [environment with specifics]. [Lighting conditions] create [mood].
Captured with [camera model], [focal length] lens at [f-stop], producing
[depth of field effect]. [Color palette/grading notes]. Aspect ratio 16:9,
suitable as a blog [hero image/inline illustration] at [target dimensions].
Template for illustrated/stylized:
A [art style] [format] of [subject with character detail], featuring
[distinctive characteristics] with [color palette]. [Line style] and
[shading technique]. Background is [description]. [Mood/atmosphere].
Step 4: Set Aspect Ratio
Call set_aspect_ratio BEFORE generating:
Blog Use Case
Ratio
Hero / Cover / OG
16:9
Product shot / Square
4:3 or 1:1
Section divider
8:1 or 4:1
Vertical (stories)
9:16
Step 5: Generate via MCP
MCP Tool
When
set_aspect_ratio
Always call first if ratio differs from 1:1
gemini_generate_image
New image from crafted prompt
gemini_edit_image
Modify existing image
gemini_chat
Iterative refinement / multi-turn sessions
get_image_history
Review generated images
clear_conversation
Reset session context
Model selection (use set_model MCP tool if switching):
NB2 Flash (default): Best for most blog images - fast, 14 ratios, 4K, $0.067/img
NB Pro: Use for hero images with text overlays (94% text accuracy) or highest quality - $0.134/img
Original: Budget option at $0.039/img - 5 ratios, 1K max
Load references/mcp-tools.md for parameter details.
Load references/gemini-models.md for model specs, pricing, and rate limits.
Step 6: Post-Processing (when needed)
After generation, resize/convert for blog use:
# Resize to blog hero dimensions (1200x630)
magick input.png -resize 1200x630^ -gravity center -extent 1200x630 hero.png
# Convert to WebP for web optimization
magick input.png -quality 85 output.webp
# Convert to AVIF (smallest, modern)
magick input.png -quality 80 output.avif
# Crop to exact OG dimensions
magick input.png -resize 1200x630^ -gravity center -extent 1200x630 og-image.png
Check if magick (ImageMagick 7) is available. Fall back to convert if not.
Step 7: Deliver
Provide:
Image path - where it was saved (~/Documents/nanobanana_generated/)
Crafted prompt - show the full Reasoning Brief (educational)
Settings - model, aspect ratio, domain mode
Alt text - descriptive sentence, 10-125 chars, topic keywords naturally
Frontmatter snippet (for hero/OG images):
coverImage:"/path/to/generated-image.png"coverImageAlt:"Descriptive alt text sentence with topic keywords"ogImage:"/path/to/generated-image.png"
Refinement suggestions - 1-2 ideas if relevant
Edit Workflow
For /blog image edit <path> <instructions>:
Read the image path and edit instruction
Enhance the instruction (never pass raw):
User says
Antigravity crafts
"remove background"
Detailed edge-preserving background removal
"make it warmer"
Specific color temperature shift with preservation notes
"add text"
Font style, size, placement, contrast, readability notes
count: (optional) number of images needed (default: 1)
Output (returned to calling skill):
### Generated Image-**Path:** ~/Documents/nanobanana_generated/image_timestamp.png
-**Alt Text:** Descriptive sentence about the image
-**Type:** hero / inline / og
-**Domain Mode:** Editorial
-**Aspect Ratio:** 16:9
-**Suggested Frontmatter:**
coverImage: "/path/to/image.png"
coverImageAlt: "Alt text here"
Graceful fallback: If MCP is unavailable, return immediately with no error.
The calling workflow continues with stock photos. Never block blog-write or
blog-rewrite because image generation is unavailable.
Alt Text Generation
For every generated image, create alt text following blog standards:
Full descriptive sentence (not keyword list)
10-125 characters
Include topic keywords naturally
Describe what the image shows AND its relevance to the content
For charts/infographics: include the key data point
Good: Marketing team analyzing AI search traffic data on a dashboard showing citation metrics
Bad: SEO AI marketing blog optimization image
Setup
For /blog image setup:
Run python3 scripts/setup_image_mcp.py (interactive)
The script pins the package to @ycse/nanobanana-mcp@1.1.1. Update the
pin in setup_image_mcp.py (constant PINNED_PACKAGE) when bumping.
Safety Filter Auto-Rephrase
When IMAGE_SAFETY or SAFETY is returned, do NOT give up. Auto-rephrase and retry:
Identify the likely trigger (violence, public figures, NSFW-adjacent, or overly cautious filter)
Rephrase using positive framing - describe what you WANT, not what to avoid
If the subject is a person, make them generic (remove celebrity-like specifics)
If the scene is dramatic, soften: "intense" → "focused", "battle" → "competition"
Retry with the rephrased prompt (max 3 attempts before reporting to user)
Google acknowledged filters "became way more cautious than we intended" - benign prompts
are sometimes blocked. Persistence with rephrasing usually succeeds.
Edit, Don't Re-roll
If an image is 80% correct, use gemini_chat for conversational editing rather than
regenerating from scratch. The session maintains style consistency, so targeted edits
preserve what works while fixing what doesn't.
When to edit vs regenerate:
Color slightly off → Edit ("shift the color temperature warmer")
Wrong composition entirely → Regenerate with revised brief
Good scene but wrong lighting → Edit ("change to golden hour lighting from the left")
Missing a detail → Edit ("add a steaming coffee cup on the desk")