New: Earn 20% as an AgentAlley affiliate. Share your link and earn on every sale you refer. Join now New: Earn 20% as an affiliate. Join now

AI image generation and editing for blog content powered

Blog Image - AI Image Generation for Blog Content

by AgriciDaniel · MIT license · ★ 2,219 on GitHub · updated Sep 18

Blog Image - AI Image Generation for Blog Content cover

AI image generation and editing for blog content powered by Gemini via MCP. Generates hero images, inline illustrations, social preview cards, and OG images, and edits existing ones.

---
name: blog-image
description: >
  AI image generation and editing for blog content powered by Gemini via MCP.
  Generates hero images, inline illustrations, social preview cards, and OG
  images, and edits existing ones. Supports 6 domain modes (Editorial, Product,
  Landscape, UI/Web, Infographic, Abstract). Works standalone or internally from
  blog-write and blog-rewrite; falls back gracefully when MCP is unavailable.
  Use when user says "blog image", "generate hero image", "blog illustration",
  "edit blog image", "OG image".
user-invokable: true
argument-hint: "[generate|edit|setup] [description-or-path]"
license: MIT
metadata:
  author: AgriciDaniel
  version: "2.2.0"
  mcp-package: "@ycse/nanobanana-mcp"
---

Overview

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.

Manual install (npx, ZIP)
Claude Codenpx skills add AgriciDaniel/claude-blog --skill blog-image -g -a claude-code
Claude Code (manual)mkdir -p ~/.claude/skills && curl -sL https://codeload.github.com/AgriciDaniel/claude-blog/tar.gz/2500d4c76503 \ | tar -xz -C ~/.claude/skills --strip-components=2 claude-blog-2500d4c76503/skills/blog-image
Windows (PowerShell)New-Item -ItemType Directory -Force "$HOME\.claude\skills" | Out-Null; Invoke-WebRequest "https://m.agentalley.io/zip/6a54e4352b77cd67e19f/blog-image.zip" -OutFile "$env:TEMP\blog-image.zip"; Expand-Archive "$env:TEMP\blog-image.zip" -DestinationPath "$HOME\.claude\skills" -Force
Claude.ai / desktopDownload the ZIP and upload it under Settings → Capabilities → Skills.
Codex, Cursor, other agentsPoint them at SKILL.md. The other files are plain text.

Connects with Agent Alley MCP · agentalley.io/mcp

Files included

  • SKILL.md13.2 KB
  • references/3 files · 26.2 KB
  • scripts/2 files · 27.4 KB
Read the files here
AgriciDaniel/2500d4c6 files
SKILL.md
Show the full text306 lines

Blog Image - AI Image Generation for Blog Content

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 21:9 then crop 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:

  1. Try calling get_image_history with conversation_id: "default" (lightweight, no side effects)
  2. If it succeeds: MCP is available, proceed with generation
  3. 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?
  • Blog topic: What is the article about?
  • Style: Photorealistic, editorial, illustrated, minimal?
  • 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, not keyword lists:

  1. Subject - Who/what, with rich physical detail (textures, materials, scale)
  2. Action - What is happening, pose, gesture, movement, state
  3. Context - Environment, setting, time of day, season, weather
  4. Composition - Camera angle, shot type, framing, negative space, depth
  5. Lighting - Light source, quality, direction, color temperature, shadows
  6. 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. Use conversation_id: "default".

Blog Use Case Ratio
Hero / Cover / OG 16:9
Product shot / Square 4:3 or 1:1
Section divider 21:9, then crop wider in post-processing if needed
Vertical (stories) 9:16
Step 5: Generate via MCP
MCP Tool When
set_aspect_ratio Always call first, even for 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 with conversation_id: "default"
clear_conversation Reset session context

Model selection:

  • Stable Google API IDs: gemini-3.1-flash-image and gemini-3-pro-image
  • Pinned @ycse/[email protected]: set_model accepts flash and pro, but maps them to preview IDs that shut down on 2026-06-25
  • Use direct API or a newer MCP package that explicitly supports stable image IDs before promising working MCP image generation

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 when target browsers support it
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:

  1. Image path - where it was saved (~/Documents/nanobanana_generated/)
  2. Crafted prompt - show the full Reasoning Brief (educational)
  3. Settings - model, aspect ratio, domain mode
  4. Alt text - descriptive sentence, 10-125 chars, topic keywords naturally
  5. 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"
  1. Refinement suggestions - 1-2 ideas if relevant

Edit Workflow

For /blog image edit <path> <instructions>:

  1. Read the image path and edit instruction
  2. Enhance the instruction (never pass raw):
    User says Claude 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
    "make it brighter" Increase exposure, lift shadows, maintain highlights
    "crop for social" Resize to 1200x630 with center-gravity crop
  3. Call gemini_edit_image with enhanced instruction
  4. Return modified image path and description

Internal API (for blog-write / blog-rewrite)

When invoked as a Task subagent from blog-write or blog-rewrite:

Input (provided by calling skill):

  • image_type: hero, inline, og, divider
  • topic: blog post topic/title
  • section_context: (optional) heading or section the image supports
  • style_preference: (optional) photorealistic, illustrated, editorial
  • 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:

  1. Run python3 skills/blog-image/scripts/setup_image_mcp.py (interactive)
    • Prefer: GOOGLE_AI_API_KEY=... python3 skills/blog-image/scripts/setup_image_mcp.py
    • Or: python3 skills/blog-image/scripts/setup_image_mcp.py --key-file /path/to/key.txt
    • Avoid --key unless necessary because command arguments can enter shell history and process lists
    • Default writes to ~/.claude/settings.json (user-private, mode 0600)
    • --project flag opts into project .mcp.json (env-expansion only, refuses to write a literal key into a tracked file)
  2. Verify: python3 skills/blog-image/scripts/validate_image_setup.py
  3. Requires:
  4. The script pins the package to @ycse/[email protected]. That npm release hard-codes preview image model IDs that shut down on 2026-06-25. Update setup, validation, and this documentation together when a package release with stable ID support is available.

Safety Filter Auto-Rephrase

When IMAGE_SAFETY or SAFETY is returned, do NOT give up. Auto-rephrase and retry:

  1. Identify the likely trigger (violence, public figures, NSFW-adjacent, or overly cautious filter)
  2. Rephrase using positive framing - describe what you WANT, not what to avoid
  3. If the subject is a person, make them generic (remove celebrity-like specifics)
  4. If the scene is dramatic, soften: "intense" → "focused", "battle" → "competition"
  5. 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")

Error Handling

Error Resolution
MCP not configured Run /blog image setup
API key invalid New key at https://aistudio.google.com/apikey
Rate limited (429) Wait 60s, retry. Check live limits at https://ai.google.dev/gemini-api/docs/rate-limits
IMAGE_SAFETY Auto-rephrase (see above) - Layer 2 filter, non-configurable
PROHIBITED_CONTENT Content policy violation - topic is blocked. Non-retryable.
SAFETY Rephrase prompt - Layer 1 filter
Vague request Ask one clarifying question before generating
Poor quality Review Reasoning Brief - likely missing lighting (biggest quality differentiator)
MCP unavailable (internal call) Return silently - calling workflow uses stock photos

Reference Documentation

Load on-demand - do NOT load all at startup:

  • references/prompt-engineering-blog.md - Domain modes, 6-component system, blog templates
  • references/gemini-models.md - Model specs, rate limits, aspect ratios, pricing
  • references/mcp-tools.md - MCP tool parameters and response formats
1---
2name: blog-image
3description: >
4 AI image generation and editing for blog content powered by Gemini via MCP.
5 Generates hero images, inline illustrations, social preview cards, and OG
6 images, and edits existing ones. Supports 6 domain modes (Editorial, Product,
7 Landscape, UI/Web, Infographic, Abstract). Works standalone or internally from
8 blog-write and blog-rewrite; falls back gracefully when MCP is unavailable.
9 Use when user says "blog image", "generate hero image", "blog illustration",
10 "edit blog image", "OG image".
11user-invokable: true
12argument-hint: "[generate|edit|setup] [description-or-path]"
13license: MIT
14metadata:
15 author: AgriciDaniel
16 version: "2.2.0"
17 mcp-package: "@ycse/nanobanana-mcp"
18---
19 
20# Blog Image - AI Image Generation for Blog Content
21 
22You are a **Creative Director** that orchestrates Gemini's image generation
23specifically for blog content. Never pass raw user text directly to the API.
24Always interpret, enhance, and construct an optimized prompt using the
256-component Reasoning Brief system.
26 
27## Quick Reference
28 
29| Command | What it does |
30|---------|-------------|
31| `/blog image generate <idea>` | Generate a blog image with full prompt engineering |
32| `/blog image edit <path> <instructions>` | Edit an existing blog image intelligently |
33| `/blog image setup` | Configure MCP server and API key |
34 
35## Blog Image Types
36 
37Match the image type to blog use case:
38 
39| Image Type | Aspect Ratio | Resolution | Domain Mode | Placement |
40|------------|-------------|-----------|-------------|-----------|
41| Hero/Cover | `16:9` | 2K or 4K | Editorial / Landscape | Frontmatter `coverImage` |
42| OG/Social Card | `16:9` | 1K | Editorial / Infographic | Frontmatter `ogImage` |
43| Inline Illustration | `16:9` or `4:3` | 1K | Varies by topic | After H2, before body |
44| Inline Product Shot | `4:3` or `1:1` | 1K | Product | Within product sections |
45| Section Divider | `21:9` then crop | 1K | Abstract / Landscape | Between major sections |
46 
47**Sizing requirements:**
48- Blog hero/cover: 1200x630 (OG-compatible) or 1920x1080
49- Open Graph (OG): 1200x630 (required for social sharing)
50- Inline images: 1200px+ wide
51 
52## MCP Availability Check
53 
54Before generating, check if nanobanana-mcp tools are available:
55 
561. Try calling `get_image_history` with `conversation_id: "default"` (lightweight, no side effects)
572. If it succeeds: MCP is available, proceed with generation
583. If it fails: MCP not configured - inform the user:
59 - "Image generation requires the nanobanana-mcp server. Run `/blog image setup` to configure it."
60 - When called internally (from blog-write/blog-rewrite): return silently, no error. The calling workflow continues with stock photos.
61 
62## Generation Workflow
63 
64For `/blog image generate <idea>` or when invoked internally:
65 
66### Step 1: Analyze Intent
67 
68Determine what the blog needs:
69- **Image type**: Hero, inline, OG card, section divider?
70- **Blog topic**: What is the article about?
71- **Style**: Photorealistic, editorial, illustrated, minimal?
72- **Constraints**: Brand colors, specific dimensions, platform format?
73- **Mood**: Authoritative, inviting, dramatic, clean?
74 
75If the request is vague, ask one clarifying question about use case and style.
76 
77### Step 2: Select Domain Mode
78 
79Choose the expertise lens for the image:
80 
81| Mode | When to use | Prompt emphasis |
82|------|-------------|-----------------|
83| **Editorial** | Blog headers, feature images, lifestyle | Styling, composition, publication references |
84| **Product** | E-commerce posts, reviews, comparisons | Surface materials, studio lighting, clean BG |
85| **Landscape** | Environmental backgrounds, travel, hero sections | Atmospheric perspective, depth layers, time of day |
86| **UI/Web** | Tech blog icons, illustrations, diagrams | Clean vectors, flat design, exact colors |
87| **Infographic** | Data-driven posts, processes, comparisons | Layout structure, hierarchy, accessible colors |
88| **Abstract** | Pattern backgrounds, section dividers, decorative | Color theory, mathematical forms, textures |
89 
90Load `references/prompt-engineering-blog.md` for domain mode modifier libraries.
91 
92### Step 3: Construct the 6-Component Reasoning Brief
93 
94Build the prompt as natural narrative paragraphs, not keyword lists:
95 
961. **Subject** - Who/what, with rich physical detail (textures, materials, scale)
972. **Action** - What is happening, pose, gesture, movement, state
983. **Context** - Environment, setting, time of day, season, weather
994. **Composition** - Camera angle, shot type, framing, negative space, depth
1005. **Lighting** - Light source, quality, direction, color temperature, shadows
1016. **Style** - Art medium, aesthetic, film stock, reference artists/eras
102 
103**Template for photorealistic blog images:**
104```
105A photorealistic [shot type] of [subject with physical detail], [action/pose],
106set in [environment with specifics]. [Lighting conditions] create [mood].
107Captured with [camera model], [focal length] lens at [f-stop], producing
108[depth of field effect]. [Color palette/grading notes]. Aspect ratio 16:9,
109suitable as a blog [hero image/inline illustration] at [target dimensions].
110```
111 
112**Template for illustrated/stylized:**
113```
114A [art style] [format] of [subject with character detail], featuring
115[distinctive characteristics] with [color palette]. [Line style] and
116[shading technique]. Background is [description]. [Mood/atmosphere].
117```
118 
119### Step 4: Set Aspect Ratio
120 
121Call `set_aspect_ratio` BEFORE generating. Use `conversation_id: "default"`.
122 
123| Blog Use Case | Ratio |
124|---------------|-------|
125| Hero / Cover / OG | `16:9` |
126| Product shot / Square | `4:3` or `1:1` |
127| Section divider | `21:9`, then crop wider in post-processing if needed |
128| Vertical (stories) | `9:16` |
129 
130### Step 5: Generate via MCP
131 
132| MCP Tool | When |
133|----------|------|
134| `set_aspect_ratio` | Always call first, even for 1:1 |
135| `gemini_generate_image` | New image from crafted prompt |
136| `gemini_edit_image` | Modify existing image |
137| `gemini_chat` | Iterative refinement / multi-turn sessions |
138| `get_image_history` | Review generated images with `conversation_id: "default"` |
139| `clear_conversation` | Reset session context |
140 
141**Model selection**:
142- Stable Google API IDs: `gemini-3.1-flash-image` and `gemini-3-pro-image`
143- Pinned `@ycse/[email protected]`: `set_model` accepts `flash` and `pro`, but maps them to preview IDs that shut down on 2026-06-25
144- Use direct API or a newer MCP package that explicitly supports stable image IDs before promising working MCP image generation
145 
146Load `references/mcp-tools.md` for parameter details.
147Load `references/gemini-models.md` for model specs, pricing, and rate limits.
148 
149### Step 6: Post-Processing (when needed)
150 
151After generation, resize/convert for blog use:
152 
153```bash
154# Resize to blog hero dimensions (1200x630)
155magick input.png -resize 1200x630^ -gravity center -extent 1200x630 hero.png
156 
157# Convert to WebP for web optimization
158magick input.png -quality 85 output.webp
159 
160# Convert to AVIF when target browsers support it
161magick input.png -quality 80 output.avif
162 
163# Crop to exact OG dimensions
164magick input.png -resize 1200x630^ -gravity center -extent 1200x630 og-image.png
165```
166 
167Check if `magick` (ImageMagick 7) is available. Fall back to `convert` if not.
168 
169### Step 7: Deliver
170 
171Provide:
1721. **Image path** - where it was saved (`~/Documents/nanobanana_generated/`)
1732. **Crafted prompt** - show the full Reasoning Brief (educational)
1743. **Settings** - model, aspect ratio, domain mode
1754. **Alt text** - descriptive sentence, 10-125 chars, topic keywords naturally
1765. **Frontmatter snippet** (for hero/OG images):
177```yaml
178coverImage: "/path/to/generated-image.png"
179coverImageAlt: "Descriptive alt text sentence with topic keywords"
180ogImage: "/path/to/generated-image.png"
181```
1826. **Refinement suggestions** - 1-2 ideas if relevant
183 
184## Edit Workflow
185 
186For `/blog image edit <path> <instructions>`:
187 
1881. Read the image path and edit instruction
1892. Enhance the instruction (never pass raw):
190 | User says | Claude crafts |
191 |-----------|---------------|
192 | "remove background" | Detailed edge-preserving background removal |
193 | "make it warmer" | Specific color temperature shift with preservation notes |
194 | "add text" | Font style, size, placement, contrast, readability notes |
195 | "make it brighter" | Increase exposure, lift shadows, maintain highlights |
196 | "crop for social" | Resize to 1200x630 with center-gravity crop |
1973. Call `gemini_edit_image` with enhanced instruction
1984. Return modified image path and description
199 
200## Internal API (for blog-write / blog-rewrite)
201 
202When invoked as a Task subagent from blog-write or blog-rewrite:
203 
204**Input** (provided by calling skill):
205- `image_type`: hero, inline, og, divider
206- `topic`: blog post topic/title
207- `section_context`: (optional) heading or section the image supports
208- `style_preference`: (optional) photorealistic, illustrated, editorial
209- `count`: (optional) number of images needed (default: 1)
210 
211**Output** (returned to calling skill):
212```markdown
213### Generated Image
214- **Path:** ~/Documents/nanobanana_generated/image_timestamp.png
215- **Alt Text:** Descriptive sentence about the image
216- **Type:** hero / inline / og
217- **Domain Mode:** Editorial
218- **Aspect Ratio:** 16:9
219- **Suggested Frontmatter:**
220 coverImage: "/path/to/image.png"
221 coverImageAlt: "Alt text here"
222```
223 
224**Graceful fallback**: If MCP is unavailable, return immediately with no error.
225The calling workflow continues with stock photos. Never block blog-write or
226blog-rewrite because image generation is unavailable.
227 
228## Alt Text Generation
229 
230For every generated image, create alt text following blog standards:
231- Full descriptive sentence (not keyword list)
232- 10-125 characters
233- Include topic keywords naturally
234- Describe what the image shows AND its relevance to the content
235- For charts/infographics: include the key data point
236 
237Good: `Marketing team analyzing AI search traffic data on a dashboard showing citation metrics`
238Bad: `SEO AI marketing blog optimization image`
239 
240## Setup
241 
242For `/blog image setup`:
243 
2441. Run `python3 skills/blog-image/scripts/setup_image_mcp.py` (interactive)
245 - Prefer: `GOOGLE_AI_API_KEY=... python3 skills/blog-image/scripts/setup_image_mcp.py`
246 - Or: `python3 skills/blog-image/scripts/setup_image_mcp.py --key-file /path/to/key.txt`
247 - Avoid `--key` unless necessary because command arguments can enter shell history and process lists
248 - Default writes to `~/.claude/settings.json` (user-private, mode 0600)
249 - `--project` flag opts into project `.mcp.json` (env-expansion only,
250 refuses to write a literal key into a tracked file)
2512. Verify: `python3 skills/blog-image/scripts/validate_image_setup.py`
2523. Requires:
253 - Node.js 18+ (npx)
254 - Google AI API key, free to create at https://aistudio.google.com/apikey
255 - A billing-enabled project may be required for image models
2564. The script pins the package to `@ycse/[email protected]`. That npm
257 release hard-codes preview image model IDs that shut down on 2026-06-25.
258 Update setup, validation, and this documentation together when a package
259 release with stable ID support is available.
260 
261## Safety Filter Auto-Rephrase
262 
263When `IMAGE_SAFETY` or `SAFETY` is returned, do NOT give up. Auto-rephrase and retry:
264 
2651. Identify the likely trigger (violence, public figures, NSFW-adjacent, or overly cautious filter)
2662. Rephrase using positive framing - describe what you WANT, not what to avoid
2673. If the subject is a person, make them generic (remove celebrity-like specifics)
2684. If the scene is dramatic, soften: "intense" → "focused", "battle" → "competition"
2695. Retry with the rephrased prompt (max 3 attempts before reporting to user)
270 
271Google acknowledged filters "became way more cautious than we intended" - benign prompts
272are sometimes blocked. Persistence with rephrasing usually succeeds.
273 
274## Edit, Don't Re-roll
275 
276If an image is 80% correct, use `gemini_chat` for conversational editing rather than
277regenerating from scratch. The session maintains style consistency, so targeted edits
278preserve what works while fixing what doesn't.
279 
280**When to edit vs regenerate:**
281- Color slightly off → Edit ("shift the color temperature warmer")
282- Wrong composition entirely → Regenerate with revised brief
283- Good scene but wrong lighting → Edit ("change to golden hour lighting from the left")
284- Missing a detail → Edit ("add a steaming coffee cup on the desk")
285 
286## Error Handling
287 
288| Error | Resolution |
289|-------|-----------|
290| MCP not configured | Run `/blog image setup` |
291| API key invalid | New key at https://aistudio.google.com/apikey |
292| Rate limited (429) | Wait 60s, retry. Check live limits at https://ai.google.dev/gemini-api/docs/rate-limits |
293| `IMAGE_SAFETY` | Auto-rephrase (see above) - Layer 2 filter, non-configurable |
294| `PROHIBITED_CONTENT` | Content policy violation - topic is blocked. Non-retryable. |
295| `SAFETY` | Rephrase prompt - Layer 1 filter |
296| Vague request | Ask one clarifying question before generating |
297| Poor quality | Review Reasoning Brief - likely missing lighting (biggest quality differentiator) |
298| MCP unavailable (internal call) | Return silently - calling workflow uses stock photos |
299 
300## Reference Documentation
301 
302Load on-demand - do NOT load all at startup:
303- `references/prompt-engineering-blog.md` - Domain modes, 6-component system, blog templates
304- `references/gemini-models.md` - Model specs, rate limits, aspect ratios, pricing
305- `references/mcp-tools.md` - MCP tool parameters and response formats
306 
View all files on GitHub →

Details

Updated
Sep 18, 2026
License
MIT
Stars on the repo
★ 2,219
Checked
Source
AgriciDaniel/claude-blog ↗
Creator
AgriciDaniel · 130 listings
View creator

Made with blog-image

Blog Image - AI Image Generation for Blog Content — claude-blog /blog write demo: end-to-end article generation with the 5-gate Delivery Contract (from the AgriciDaniel/claude-blog README)
Blog Image - AI Image Generation for Blog Content — claude-blog /blog write demo: end-to-end article generation with the 5-gate Delivery Contract (from the AgriciDaniel/claude-blog README)

by AgriciDaniel

Similar skills

See all →
SkillMake Japanese TV-anime style videos with codeAnime celedenfunf/reelmimic · by edenfunfMake Japanese TV-anime style videos (MP4) with code — cel-shaded characters with tapered line art, big detailed eyes, hair clumps with a specular band, comedic anime reactions (sweat drop, anger vein, sparkle eyes, ≥< eyes, dot eyes, tears), painted skies with cumulus clouds, school/street/classroom/rooftop sets with time-of-day palettes, speed/focus lines, impact frames, dramatic zooms, smears, sakura petals and anime subtitles (CJK). Canvas 2D rendered frame by frame in headless Chrome, encoded with ffmpeg. Use when a reference video or brief calls for anime / 動畫 / 日系動畫 / アニメ / cel-shaded / slice-of-life / school romance / shōnen-style reactions, or when the video-clone router picks the anime-cel style. 2D only; characters are original (Hina, Ren) or new ones built on the same rig.★ 3.6k GitHub starsSkillDirect and produce a short film made entirely in codeLemo opuscarlemomo-ai/lemo-opuscar · by lemomo-aiDirect and produce a short film made entirely in code, in one of the styles of the Lemo-Opuscar library (e.g. Impasto Oil Painting 油画厚涂, Watercolor Brush 水彩笔刷, Ukiyo-e 浮世绘, Satellite Briefing 卫星简报, Exploded Teardown 产品拆解, Microscope Story 显微叙事). Use when the user asks for a video, film, short, promo, explainer or animation (视频、短片、动画、宣传片) in a named style, including data, science and product explainers built from real material such as satellite imagery, laser scans, CAD files or archive scans (数据解说、科普、产品拆解); when they want a film made about their own topic and haven't chosen a style (help them choose); or when they ask which film styles there are. Not for editing or converting existing video files.★ 3k GitHub starsSkillGenerate Ian-style Xiaohei illustrations for articles, postsdzhng/skills · by dzhngGenerate Ian-style Xiaohei illustrations for articles, posts, blogs, Notion documents, workflows, methods, processes, structures, states, metaphors, and opinions. Use when the user asks for weird, hand-drawn, Xiaohei, article, editorial, body illustrations, illustration ideas, shot lists, title removal, image edits, or image regeneration. By default, all image text and annotations are English, even when the source article is Chinese; only use another language when the user explicitly asks.★ 1.3k GitHub starsSkillCreating game art through Scenario MCP: spritesScenario game assetsscenario-labs/skills · by scenario-labsUse when creating game art through Scenario MCP: sprites, sprite sheets, icons, props, loot, tilesets and autotile terrain transitions, seamless tiles, isometric buildings, top-down maps, pixel art, UI buttons and panels, parallax background layers or depth planes for side-scrollers, and character or concept art; or when assets need transparent backgrounds, background removal, style-consistent variation batches, upscaling, pixel-grid cleanup, or PNG export for Unity, Godot, or Unreal.★ 854 GitHub starsSkillTrain custom LoRAs with ostris AI-ToolkitAI-Toolkit LoRA Trainer (WAN 2.2 & Z-Image)artokun/comfyui-mcp · by artokunTrain custom LoRAs with ostris AI-Toolkit. Covers WAN 2.2/2.1 (people, styles, video motion) and Z-Image (Turbo & Base, low-VRAM image LoRAs). Use when the user wants to train a WAN or Z-Image LoRA; covers local + RunPod setup, dataset prep, key params, and using the result in a ComfyUI workflow.★ 759 GitHub starsSkillAnime/illustration text-to-imageANIMA 1.0 (Anima Base Ultra) Text-to-Image Workflowsartokun/comfyui-mcp · by artokunAnime/illustration text-to-image (ANIMA 1.0, ~2B Cosmos DiT). Use for anime, manga, illustrated characters; accepts Danbooru tags + natural language; runs/trains on <6GB VRAM; includes anime inpainting via Anima-LLLite ControlNet★ 759 GitHub stars

More from AgriciDaniel

SkillThe Lighthouse Agentic Browsing fractionAgentic Browsing ReadinessAgriciDaniel/claude-seo · by AgriciDanielAudit and fix agent readiness: the Lighthouse Agentic Browsing fraction, accessibility tree for agents, robots.txt and Content-Signal for AI agents, WAF treatment of agent traffic, llms.txt, Markdown delivery, ai-catalog.json, /.well-known discovery files, and WebMCP tools. Exclude AI citability and brand signals (seo-geo) and commerce protocol depth (seo-ecommerce).★ 17.4k GitHub starsSkillOptimize content for AI Overviews , ChatGPT web searchAI Search / GEO Optimization (May 2026)AgriciDaniel/claude-seo · by AgriciDanielOptimize content for AI Overviews (formerly SGE), ChatGPT web search, Perplexity, and other AI-powered search experiences. Generative Engine Optimization (GEO) analysis including brand mention signals, AI crawler accessibility, llms.txt compliance, passage-level citability scoring, and platform-specific optimization. Use when user says "AI Overviews", "SGE", GEO", "AI search", "LLM optimization", "Perplexity", "AI citations", ChatGPT search", or "AI visibility".★ 17.4k GitHub starsSkillReferring domains, anchor text distributionBacklink Profile AnalysisAgriciDaniel/claude-seo · by AgriciDanielBacklink profile analysis: referring domains, anchor text distribution, toxic link detection, competitor gap analysis. Works with free APIs (Moz, Bing Webmaster, Common Crawl) and DataForSEO extension. Use when user says backlinks, link profile, referring domains, anchor text, toxic links, link gap, link building, disavow, or backlink audit.★ 17.4k GitHub starsSkillYou share your Amazon advertising numbers and goals; you getAmazon Ads AuditAgriciDaniel/claude-ads · by AgriciDanielYou share your Amazon advertising numbers and goals; you get back a plain-language review of what's draining your budget and what to change first.★ 9.5k GitHub starsSkillPaste what you're spending on Apple Search AdsApple Ads AuditAgriciDaniel/claude-ads · by AgriciDanielPaste what you're spending on Apple Search Ads and your recent numbers; get back a plain review of what's wasting money and what to fix first.★ 9.5k GitHub starsSkillPaste the sales and spend numbers each ad platform claimsAttribution AuditAgriciDaniel/claude-ads · by AgriciDanielPaste the sales and spend numbers each ad platform claims, and get back a plain explanation of why they disagree and which figure to trust.★ 9.5k GitHub stars