Skip to content

Commit 36aac5c

Browse files
AgriciDanielclaude
andcommitted
feat: add banana image generation extension (seo-image-gen)
Integrate claude-banana AI image generation as a Claude SEO extension, following the established DataForSEO extension pattern. Enables SEO-specific image generation (OG previews, hero banners, product photos, infographics) via Gemini nanobanana-mcp. New extension at extensions/banana/ with: - SEO-focused adapter SKILL.md mapping use cases to optimized defaults - Audit agent for OG/social image analysis during /seo audit - 7 Python scripts (stdlib only) for generation, editing, cost tracking - 7 reference files including SEO-specific presets - install.sh / uninstall.sh following DataForSEO pattern - Full documentation (README, setup guide) Updated: seo/SKILL.md routing, plugin.json v1.5.0, COMMANDS.md, ARCHITECTURE.md Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent be67bee commit 36aac5c

25 files changed

Lines changed: 2888 additions & 14 deletions

.claude-plugin/plugin.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "claude-seo",
3-
"version": "1.4.0",
3+
"version": "1.5.0",
44
"description": "Comprehensive SEO analysis skill for Claude Code. Covers technical SEO, content quality (E-E-A-T), schema markup, image optimization, sitemap architecture, AI search optimization (GEO), and strategic planning across all industries.",
55
"author": "AgriciDaniel",
66
"license": "MIT",
@@ -19,7 +19,9 @@
1919
"skills/seo-plan/SKILL.md",
2020
"skills/seo-programmatic/SKILL.md",
2121
"skills/seo-competitor-pages/SKILL.md",
22-
"skills/seo-hreflang/SKILL.md"
22+
"skills/seo-hreflang/SKILL.md",
23+
"extensions/dataforseo/skills/seo-dataforseo/SKILL.md",
24+
"extensions/banana/skills/seo-image-gen/SKILL.md"
2325
],
2426
"agents": [
2527
"agents/seo-technical.md",
@@ -28,6 +30,8 @@
2830
"agents/seo-sitemap.md",
2931
"agents/seo-performance.md",
3032
"agents/seo-visual.md",
31-
"agents/seo-geo.md"
33+
"agents/seo-geo.md",
34+
"extensions/dataforseo/agents/seo-dataforseo.md",
35+
"extensions/banana/agents/seo-image-gen.md"
3236
]
3337
}

CLAUDE.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ schema markup, image optimization, sitemap architecture, and AI search optimizat
1313
```
1414
claude-seo/
1515
CLAUDE.md # Project instructions (this file)
16-
.claude-plugin/plugin.json # Plugin manifest (v1.3.2)
16+
.claude-plugin/plugin.json # Plugin manifest v1.5.0
1717
seo/ # Main orchestrator skill
1818
SKILL.md # Entry point, routing table, core rules
1919
references/ # On-demand knowledge files
@@ -41,6 +41,9 @@ claude-seo/
4141
seo-performance.md # Core Web Vitals, page speed
4242
seo-visual.md # Screenshots, mobile rendering
4343
seo-geo.md # AI crawler access, GEO, citability
44+
extensions/ # Optional add-on capabilities
45+
dataforseo/ # Live SEO data via DataForSEO MCP
46+
banana/ # AI image generation via Gemini MCP
4447
docs/ # Extended documentation
4548
ARCHITECTURE.md # System design overview
4649
COMMANDS.md # Full command reference
@@ -65,6 +68,7 @@ claude-seo/
6568
| `/seo programmatic` | Programmatic SEO analysis and planning |
6669
| `/seo competitor-pages` | Competitor comparison page generation |
6770
| `/seo hreflang <url>` | International SEO / hreflang audit |
71+
| `/seo image-gen [use-case] <desc>` | AI image generation for SEO assets (extension) |
6872

6973
## Development Rules
7074

@@ -81,4 +85,4 @@ claude-seo/
8185
1. **Progressive Disclosure**: Metadata always loaded, instructions on activation, resources on demand
8286
2. **Industry Detection**: Auto-detect SaaS, e-commerce, local, publisher, agency
8387
3. **Parallel Execution**: Full audits spawn 7 subagents simultaneously
84-
4. **Extension System**: DataForSEO MCP integration for live data
88+
4. **Extension System**: DataForSEO MCP for live data, Banana MCP for AI image generation

docs/ARCHITECTURE.md

Lines changed: 37 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -198,27 +198,56 @@ Extensions are opt-in add-ons that integrate external data sources via MCP serve
198198

199199
```
200200
extensions/
201-
└── dataforseo/ # DataForSEO MCP integration
201+
├── dataforseo/ # DataForSEO MCP integration
202+
│ ├── README.md # Extension documentation
203+
│ ├── install.sh # Unix installer
204+
│ ├── install.ps1 # Windows installer
205+
│ ├── uninstall.sh # Unix uninstaller
206+
│ ├── uninstall.ps1 # Windows uninstaller
207+
│ ├── field-config.json # API response field filtering
208+
│ ├── skills/
209+
│ │ └── seo-dataforseo/
210+
│ │ └── SKILL.md # Sub-skill (22 commands)
211+
│ ├── agents/
212+
│ │ └── seo-dataforseo.md # Subagent
213+
│ └── docs/
214+
│ └── DATAFORSEO-SETUP.md # Account setup guide
215+
216+
└── banana/ # Banana Image Generation (Gemini AI)
202217
├── README.md # Extension documentation
203218
├── install.sh # Unix installer
204-
├── install.ps1 # Windows installer
205219
├── uninstall.sh # Unix uninstaller
206-
├── uninstall.ps1 # Windows uninstaller
207-
├── field-config.json # API response field filtering
208220
├── skills/
209-
│ └── seo-dataforseo/
210-
│ └── SKILL.md # Sub-skill (22 commands)
221+
│ └── seo-image-gen/
222+
│ └── SKILL.md # Sub-skill (6 commands)
211223
├── agents/
212-
│ └── seo-dataforseo.md # Subagent
224+
│ └── seo-image-gen.md # Image audit subagent
225+
├── scripts/ # Python scripts (stdlib only)
226+
│ ├── generate.py # Direct API fallback
227+
│ ├── edit.py # Image editing fallback
228+
│ ├── batch.py # CSV batch workflow
229+
│ ├── cost_tracker.py # Usage and cost tracking
230+
│ ├── presets.py # Brand preset management
231+
│ ├── setup_mcp.py # MCP configuration
232+
│ └── validate_setup.py # Installation verification
233+
├── references/ # On-demand knowledge
234+
│ ├── prompt-engineering.md # 6-component Reasoning Brief
235+
│ ├── gemini-models.md # Model specs and pricing
236+
│ ├── mcp-tools.md # MCP tool reference
237+
│ ├── post-processing.md # ImageMagick recipes
238+
│ ├── cost-tracking.md # Cost tracking guide
239+
│ ├── presets.md # Preset schema
240+
│ └── seo-image-presets.md # SEO-specific presets
213241
└── docs/
214-
└── DATAFORSEO-SETUP.md # Account setup guide
242+
└── BANANA-SETUP.md # API key and MCP setup
215243
```
216244

217245
### Available Extensions
218246

219247
| Extension | Package | What it Adds |
220248
|-----------|---------|-------------|
221249
| **DataForSEO** | `dataforseo-mcp-server` | 22 commands: live SERP, keywords, backlinks, on-page analysis, content analysis, business listings, AI visibility, LLM mentions |
250+
| **Banana Image Gen** | `@ycse/nanobanana-mcp` | 6 commands: OG image, hero image, product photo, infographic, custom, and batch generation via Gemini AI |
222251

223252
### Extension Convention
224253

docs/COMMANDS.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,37 @@ Live SEO data via DataForSEO MCP server (extension). 22 commands across 9 API mo
314314

315315
---
316316

317+
### `/seo image-gen [use-case] <description>`
318+
319+
AI image generation for SEO assets (extension). Powered by Gemini via nanobanana-mcp.
320+
321+
**Prerequisites:** Banana extension installed (`./extensions/banana/install.sh`)
322+
323+
**Use Cases:**
324+
```
325+
/seo image-gen og <description> # OG/social preview image (16:9, 1K)
326+
/seo image-gen hero <description> # Blog hero image (16:9, 2K)
327+
/seo image-gen product <description> # Product photography (4:3, 2K)
328+
/seo image-gen infographic <description> # Infographic visual (2:3, 4K)
329+
/seo image-gen custom <description> # Custom with full Creative Director pipeline
330+
/seo image-gen batch <description> [N] # Generate N variations (default: 3)
331+
```
332+
333+
**Example:**
334+
```
335+
/seo image-gen og "Professional SaaS analytics dashboard with clean UI"
336+
/seo image-gen hero "Dramatic sunset over modern city skyline"
337+
/seo image-gen product "Wireless noise-canceling headphones on marble surface"
338+
```
339+
340+
**What it does:**
341+
1. Maps SEO use case to optimized domain mode, aspect ratio, and resolution
342+
2. Constructs 6-component Reasoning Brief (Creative Director pipeline)
343+
3. Generates image via Gemini API
344+
4. Provides SEO checklist (alt text, file naming, WebP, schema markup)
345+
346+
---
347+
317348
## Quick Reference
318349

319350
| Command | Use Case |
@@ -324,6 +355,7 @@ Live SEO data via DataForSEO MCP server (extension). 22 commands across 9 API mo
324355
| `/seo geo <url>` | AI search optimization |
325356
| `/seo hreflang [url]` | Hreflang/i18n SEO audit |
326357
| `/seo images <url>` | Image optimization |
358+
| `/seo image-gen [use-case] <desc>` | AI image generation (extension) |
327359
| `/seo page <url>` | Single page analysis |
328360
| `/seo plan <type>` | Strategic planning |
329361
| `/seo programmatic [url\|plan]` | Programmatic SEO analysis |

extensions/banana/README.md

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# Banana Image Generation Extension for Claude SEO
2+
3+
Generate production-ready SEO images using AI — OG/social previews, blog heroes,
4+
product photography, infographics, and more. Powered by Google Gemini via the
5+
banana Creative Director pipeline.
6+
7+
## Prerequisites
8+
9+
- **Claude SEO** installed (`~/.claude/skills/seo/`)
10+
- **Node.js 18+** with npx
11+
- **Google AI API key** (free at [aistudio.google.com/apikey](https://aistudio.google.com/apikey))
12+
- **ImageMagick** (optional, for post-processing)
13+
14+
## Installation
15+
16+
```bash
17+
./extensions/banana/install.sh
18+
```
19+
20+
The installer will:
21+
1. Verify Claude SEO is installed
22+
2. Prompt for your Google AI API key (if nanobanana-mcp not already configured)
23+
3. Install the `seo-image-gen` skill and agent
24+
4. Configure the MCP server in `~/.claude/settings.json`
25+
26+
## Commands
27+
28+
| Command | What it does |
29+
|---------|-------------|
30+
| `/seo image-gen og <description>` | OG/social preview image (1200x630 feel) |
31+
| `/seo image-gen hero <description>` | Blog hero image (widescreen, dramatic) |
32+
| `/seo image-gen product <description>` | Product photography (clean, white BG) |
33+
| `/seo image-gen infographic <description>` | Infographic visual (vertical, data-heavy) |
34+
| `/seo image-gen custom <description>` | Custom with full Creative Director pipeline |
35+
| `/seo image-gen batch <description> [N]` | Generate N variations (default: 3) |
36+
37+
## Use Case Defaults
38+
39+
| Use Case | Aspect Ratio | Resolution | Domain Mode | Cost |
40+
|----------|-------------|------------|-------------|------|
41+
| OG/Social Preview | 16:9 | 1K | Product/UI | ~$0.04 |
42+
| Blog Hero | 16:9 | 2K | Cinema/Editorial | ~$0.08 |
43+
| Product Photo | 4:3 | 2K | Product | ~$0.08 |
44+
| Infographic | 2:3 | 4K | Infographic | ~$0.16 |
45+
| Social Square | 1:1 | 1K | UI/Web | ~$0.04 |
46+
| Favicon/Icon | 1:1 | 512 | Logo | ~$0.02 |
47+
48+
## How It Works
49+
50+
Claude acts as a **Creative Director** — it never passes raw text to the API.
51+
Instead, it analyzes your intent, selects the optimal domain mode, and constructs
52+
an optimized prompt using a proven 6-component Reasoning Brief system:
53+
54+
1. **Subject** (30%) — Physical specificity and micro-details
55+
2. **Style** (25%) — Camera specs, film stock, brand references
56+
3. **Context** (15%) — Location, time, weather, supporting elements
57+
4. **Action** (10%) — Pose, gesture, movement, state
58+
5. **Composition** (10%) — Shot type, framing, focal length
59+
6. **Lighting** (10%) — Direction, quality, color temperature
60+
61+
## Post-Generation SEO Checklist
62+
63+
After every generation, Claude provides:
64+
- Alt text suggestion (keyword-rich, descriptive)
65+
- SEO-friendly file naming convention
66+
- WebP conversion command
67+
- ImageObject schema snippet
68+
- OG meta tag markup (for social previews)
69+
70+
## Audit Integration
71+
72+
During `/seo audit`, the extension optionally spawns an image analysis agent that:
73+
- Audits existing OG/social images across the site
74+
- Identifies missing or low-quality images
75+
- Creates a prioritized generation plan with prompt suggestions
76+
- Estimates total cost for the generation plan
77+
78+
The agent never auto-generates images — it produces a plan for your review.
79+
80+
## Uninstallation
81+
82+
```bash
83+
./extensions/banana/uninstall.sh
84+
```
85+
86+
This removes the skill and agent. If you also use the standalone banana skill,
87+
the MCP server config is preserved.
88+
89+
## Troubleshooting
90+
91+
See [docs/BANANA-SETUP.md](docs/BANANA-SETUP.md) for detailed setup instructions
92+
and common issues.
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
name: seo-image-gen
3+
description: SEO image analyst. Audits existing OG/social preview images, identifies missing or low-quality images, and creates an image generation plan with prompts for key pages. Does NOT auto-generate images.
4+
tools: Read, Bash, Glob, Grep
5+
---
6+
7+
You are an SEO image analyst. When delegated tasks during an SEO audit:
8+
9+
1. Check that nanobanana-mcp tools are available before including generation recommendations
10+
2. Analyze the site's existing image strategy for SEO impact
11+
3. Output a structured generation plan — never auto-generate (cost control)
12+
13+
## Analysis Scope
14+
15+
For each audited page, evaluate:
16+
- **OG image presence** — Does `og:image` meta tag exist? Is it valid?
17+
- **OG image quality** — Correct dimensions (1200x630 minimum), professional appearance?
18+
- **Schema images** — Are `ImageObject` properties populated in structured data?
19+
- **Alt text quality** — Descriptive, keyword-rich, not stuffed?
20+
- **Image format** — Using modern formats (WebP, AVIF) vs legacy (PNG, JPEG)?
21+
- **Image file size** — Under 200KB for hero, under 100KB for thumbnails?
22+
23+
## Output Format
24+
25+
Match existing claude-seo patterns:
26+
27+
### Image Audit Summary
28+
29+
| Metric | Value | Status |
30+
|--------|-------|--------|
31+
| Pages with OG images | X/Y | Pass/Fail |
32+
| OG images correct size | X/Y | Pass/Fail |
33+
| Schema ImageObject usage | X/Y | Pass/Fail |
34+
| WebP/AVIF adoption | X% | Pass/Fail |
35+
| Average image file size | XKB | Pass/Fail |
36+
37+
### Image Generation Plan
38+
39+
For each page missing or having low-quality images:
40+
41+
| Page | Issue | Suggested Use Case | Prompt Idea | Priority |
42+
|------|-------|-------------------|-------------|----------|
43+
| /homepage | Missing OG image | og | Professional SaaS dashboard overview | Critical |
44+
| /blog/post-1 | Low-res hero | hero | [contextual suggestion] | High |
45+
46+
Priority levels: Critical > High > Medium > Low
47+
48+
### Recommendations
49+
50+
- Prioritize pages by traffic volume (highest traffic = fix first)
51+
- Note estimated cost for full generation plan
52+
- Suggest batch generation for efficiency
53+
- Recommend WebP conversion pipeline for all generated assets
54+
55+
## Error Handling
56+
57+
- If nanobanana-mcp is not available, still audit existing images but note that generation requires the banana extension
58+
- Report errors clearly with actionable next steps
59+
- Note data source as "Image Audit (static analysis)" to distinguish from live checks

0 commit comments

Comments
 (0)