Skip to main content
BuildReviewed Aug 31, 2026

Blog Image

Paid Gemini image generation for blog heroes, inline illustrations, and OG cards (direct API by default, optional MCP for edits). Asks for explicit consent before the first paid call. Runs only on an explicit request: /blog image, "generate a blog hero image", "blog illustration", "edit this blog image", "OG image", or when blog-write or blog-rewrite needs a hero. Not for charts (blog-chart) or stock-photo search.

v1.0.22 installs

Unsigned, install at your own risk

Unverified

This skill has no cryptographic signature attached. We can't verify the contents match what the publisher intended.

Install this skill

No account required. Pick your tool, or use the command that detects it for you.

Run in your terminal. It detects your AI tool.

npx @skills-hub-ai/cli install claude-blog-blog-image
Or get the file:
Browse all CLI commands →
Manual setup by platform

Claude Code

~/.claude/skills/claude-blog-blog-image/SKILL.md

Setup guide →
0Save

Instructions

Blog Image - AI Image Generation for Blog Content

Bundled paths below use host Markdown substitution of ${CLAUDE_SKILL_DIR};
it is not an exported shell variable. Resolve them before execution, quote
paths, and refuse nonabsolute overrides. Pass blog_reference_root resolved
from ${CLAUDE_SKILL_DIR}/../blog/references, blog_template_root from
${CLAUDE_SKILL_DIR}/../blog/templates, and needed sibling roots to agents.
Read the main reference orchestration-details.md before loading project
context; pass only its helper-fenced output to downstream agents.

Cost and consent gate (mandatory, read first)

This skill spends the user's Google AI credit and writes image files.

  • What it spends: one paid Gemini image call per generated or edited
    image. generate_hero.py can try up to four model IDs in turn when the
    first fails, so budget for that worst case. The stock-photo and Openverse
    rungs are free but may need their own keys.
  • Cost basis: per-image prices at
    https://ai.google.dev/gemini-api/docs/pricing. On 2026-10-12 that page listed
    gemini-nano-banana-2.1 at $0.0336 (1K), $0.0504 (2K), $0.113 (4K) and
    gemini-3.1-flash-image at $0.067 (1K). Re-read it before quoting a number.
  • What it writes: hero.<ext> and hero-credit.txt in the draft folder
    (direct API), ~/Documents/nanobanana_generated/ (optional MCP), and
    ~/.claude/settings.json (setup only).
  • Consent: before the FIRST paid call or file write in a session, tell
    the user the model, size, image count, and estimated cost (count times price)
    and wait for an explicit yes. The yes covers only that count. Asking for a
    blog post does not by itself consent to a paid image call.
  • No uncapped spend: never loop on paid calls. Safety rephrases stop at 3
    attempts per image. Bulk work (for example a cluster) needs a stated total
    count and a cap, confirmed once before the first call.
  • Declined or unavailable: skip the Gemini call (run the script without
    --allow-paid, its default, so a key is ignored and it uses the free rungs:
    existing hero, then stock keys, then Openverse) and
    return ONE line for the orchestrator's "Fallbacks and skips" summary, such as
    "Hero image: user declined paid generation, used a stock photo".

The default route builds one fixed editorial prompt from the topic and tags, so
it needs no brief from you. Custom prompt briefs, domain modes and image edits
exist only on the optional MCP route, documented in
${CLAUDE_SKILL_DIR}/references/mcp-route.md (load it only for that route).

Quick Reference

CommandWhat it does
/blog image generate <idea>Generate a hero-style blog image (default route), or a custom brief via the optional MCP route
/blog image edit <path> <instructions>Edit an existing blog image (optional MCP route only)
/blog image setupCheck the API key and, optionally, install the MCP server

Blog Image Types

Match the image type to blog use case:

Image TypeAspect RatioResolutionDomain Mode (MCP route)Placement
Hero/Cover16:92K or 4KEditorial / LandscapeFrontmatter coverImage
OG/Social Card16:91KEditorial / InfographicFrontmatter ogImage
Inline Illustration16:9 or 4:31KVaries by topicAfter H2, before body
Inline Product Shot4:3 or 1:11KProductWithin product sections
Section Divider21:9 then crop1KAbstract / LandscapeBetween major sections

Sizing requirements:

  • Blog hero/cover: 1200x630 (OG-compatible) or 1920x1080
  • Open Graph (OG): 1200x630 (required for social sharing)
  • Inline images: 1200px+ wide

Generation Routes

  1. Direct API (default). The repo's generate_hero.py calls the Gemini
    API only when run with --allow-paid (after the consent gate) and
    GOOGLE_AI_API_KEY or GEMINI_API_KEY is set (the google-genai SDK
    must be installed), then falls back to premium stock and Openverse. It needs
    no MCP server. NANOBANANA_MODEL sets its default model ID.
  2. Optional MCP (at your own risk). @ycse/[email protected] is the
    only package the setup script pins, and it only supports image model IDs
    that Google shut down on 2026-06-25 (see Step 2). Use it only if the user
    already has a working server; never present it as the default.

Before using the MCP route, check availability: call get_image_history with
conversation_id: "default" (no side effects). If it fails, use the direct
API route instead of asking the user to install the MCP.

When called internally (from blog-write/blog-rewrite) and no route works:
no error, but return a one-line fallback note (what was skipped, why) for the
caller's final summary. The calling workflow continues with stock photos.

Generation Workflow

For /blog image generate <idea> or when invoked internally:

Step 1: Aspect Ratio

Direct API: the script requests 16:9 and fits the result to --width by
--height (default 1200x630). MCP route: call set_aspect_ratio BEFORE
generating, with conversation_id: "default".

Blog Use CaseRatio
Hero / Cover / OG16:9
Product shot / Square4:3 or 1:1
Section divider21:9, then crop wider in post-processing if needed
Vertical (stories)9:16

Step 2: Generate

Default: direct API. After the consent gate, resolve
BLOG_SCRIPT_DIR="${CLAUDE_BLOG_SCRIPTS_DIR:-${CLAUDE_SKILL_DIR}/../../scripts}",
reject it unless absolute, and never run a relative scripts/generate_hero.py.
Pass the title and tags as single-quoted arguments (shell argument rule in
${CLAUDE_SKILL_DIR}/../blog/SKILL.md):

python3 "$BLOG_SCRIPT_DIR/generate_hero.py" --topic '<post title>' \
  --tags 'tag1,tag2' --out "<draft-folder>" [--width 1200] [--height 630] \
  [--model <image-model-id>] [--replace] --allow-paid --json

Flags: --topic (required), --tags, --out (required, receives
hero.<ext> and hero-credit.txt), --width, --height, --model,
--replace, --allow-paid, --json. --allow-paid enables the paid Gemini
rung; pass it only after the consent gate approved this call, and omit it
otherwise (a key is then ignored and only the free rungs run). A valid
image hero already in --out is kept and nothing is generated (JSON source
is existing) unless you pass --replace, which the user must have asked for
and which swaps the hero and hero-credit.txt together. An invalid existing
hero.* is not kept, and a symlinked hero.* makes the script stop. Exit 0 means a hero is in place (the JSON source
field says existing, gemini, a stock provider, or openverse: report any
stock or Openverse source as a fallback). Exit 1 means every rung failed.

What the default route supports. It generates a hero-style image (one
fixed editorial prompt built from the topic and tags), at the size you pass,
then falls back to stock and Openverse. It has no --prompt flag, no inline
illustrations from a custom brief, and no editing. For custom briefs, domain
modes, edits or iterative refinement, use the optional MCP route
(references/mcp-route.md) or a direct google-genai call written from the
current docs.

Model IDs (Google deprecations page, 2026-10-12): use
gemini-nano-banana-2.1 for new work. gemini-3.1-flash-image is the
previous generation (no shutdown announced; replacement
gemini-nano-banana-2.1). gemini-2.5-flash-image has an earliest shutdown
of 2027-03-15. See ${CLAUDE_SKILL_DIR}/references/gemini-models.md.

Optional MCP route (at your own risk). Pinned @ycse/[email protected]
exposes set_model aliases flash and pro that map to preview IDs shut
down on 2026-06-25, so generation through it is expected to fail. Prefer the
direct API unless a newer package explicitly supports stable IDs. The tool
table, brief composition and parameters are in references/mcp-route.md and
references/mcp-tools.md.

Load ${CLAUDE_SKILL_DIR}/references/gemini-models.md for model specs, pricing, and rate limits.

Step 3: 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 4: Deliver

Provide:

  1. Image path - where it was saved (the draft folder for the direct API, ~/Documents/nanobanana_generated/ for the MCP)
  2. Prompt - on the MCP route, show the full brief; on the default route say it used the script's fixed editorial prompt
  3. Settings - model, aspect ratio
  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

/blog image edit <path> <instructions> needs the optional MCP route
(gemini_edit_image, a paid call under the consent gate). The edit recipes are
in ${CLAUDE_SKILL_DIR}/references/mcp-route.md. Without a working MCP, say so
and offer to regenerate through the direct API instead.

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

When the orchestrator invokes this skill for blog-write or blog-rewrite (the orchestrator runs this skill itself; the suite's agents have no Skill or Bash tool):

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:** <draft-folder>/hero.png
- **Alt Text:** Descriptive sentence about the image
- **Type:** hero / inline / og
- **Domain Mode:** Editorial (MCP route only)
- **Aspect Ratio:** 16:9
- **Suggested Frontmatter:**
  coverImage: "/path/to/image.png"
  coverImageAlt: "Alt text here"

Graceful fallback: If no generation route works or the user declines the
cost gate, return immediately with no error and a one-line fallback note
(what, why) for the caller's final summary. The calling workflow continues
with stock photos. The delivery contract still requires a hero file, so the
orchestrator must supply one (stock or manual) before rendering. Do not call
this skill a second time for the same post's hero: blog-write already
requests it once.

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:

Resolve BLOG_SKILLS_DIR="${CLAUDE_BLOG_SKILLS_DIR:-${CLAUDE_SKILL_DIR}/..}"
and reject it unless absolute. Setup is the only action allowed to change
image capability configuration, and it needs the user's explicit yes first.

Default path (no MCP): the direct API only needs a key and the SDK.

  1. Export GOOGLE_AI_API_KEY or GEMINI_API_KEY (free to create at
    https://aistudio.google.com/apikey; a billing-enabled project may be
    required for image models). generate_hero.py reads GOOGLE_AI_API_KEY
    first, then GEMINI_API_KEY, and uses the key only with --allow-paid;
    NANOBANANA_MODEL sets its default model ID.
  2. Install the SDK with the project's explicit setup (google-genai is
    declared in the repo pyproject.toml dependencies); never
    install implicitly during a run.

Optional MCP path (at your own risk): setup steps, the pinned package
caveat and the validation script are in
${CLAUDE_SKILL_DIR}/references/mcp-route.md. Tell the user the caveat (the
pinned package targets shut-down model IDs) before installing.

Safety Filter

If IMAGE_SAFETY or SAFETY comes back, the default route simply falls to the
next rung. Rephrasing a custom prompt (positive framing, generic people, softer
wording; at most 3 attempts per image) applies only to the MCP route, see
references/mcp-route.md.

Error Handling

ErrorResolution
No generation routeExport GOOGLE_AI_API_KEY or GEMINI_API_KEY (see Setup); the MCP is optional
API key invalidNew 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_SAFETYLayer 2 filter, non-configurable; rephrase on the MCP route only (see Safety Filter)
PROHIBITED_CONTENTContent policy violation - topic is blocked. Non-retryable.
SAFETYLayer 1 filter; rephrase on the MCP route only
Vague requestAsk one clarifying question before generating
Poor qualityOn the MCP route, review the brief (lighting is the biggest differentiator); on the default route, try another --model or an MCP brief
No route or consent declined (internal call)Return a one-line fallback note; calling workflow uses stock photos and reports it

Reference Documentation

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

  • ${CLAUDE_SKILL_DIR}/references/mcp-route.md - Optional MCP route: brief composition, domain modes, edit flows, tool table, MCP setup
  • ${CLAUDE_SKILL_DIR}/references/prompt-engineering-blog.md - Domain modes, 6-component system, blog templates
  • ${CLAUDE_SKILL_DIR}/references/gemini-models.md - Model specs, rate limits, aspect ratios, pricing
  • ${CLAUDE_SKILL_DIR}/references/mcp-tools.md - MCP tool parameters and response formats
This skill doesn’t include stateful context yet, instructions only. Learn about stateful skills.

Security

Loading security scan...

Reviews (0)

Browse all →
blog-clusterSemantic topic cluster planning and automated execution engine for claude-blog. Performs SERP-based keyword research, groups keywords by search intent and SERP overlap, builds a hub-and-spoke cluster architecture, generates an interactive SVG cluster map, and executes the full cluster by orchestrating blog-write calls with shared cluster context and automatic internal-link injection. Fills the strategy-to-execution gap: blog-strategy plans the blueprint, blog-cluster builds the house. Use when user says "blog cluster", "topic cluster", "content cluster", "cluster plan", "cluster execute", "cluster map".0 installsblog-multilingualOne-command multilingual blog creation. Writes a blog post, translates it into user-specified languages, applies cultural adaptation, and emits hreflang tags, sitemap entries, and a CMS-ready language map. The complete write-to-publish pipeline for international content. Orchestrates blog-write, blog-translate, blog-localize, and (optionally) seo-hreflang. Use when user says "multilingual blog", "blog multilingual", "write in multiple languages", "international blog", "mehrsprachiger Blog", "blog multilingue", "blog multilingue", "create blog in German and French".0 installsblog-discourseResearch what people are actually saying about a topic in the last 30 days across Reddit, X / Twitter, YouTube, Hacker News, dev.to, Medium, and other public discourse platforms. API-free; uses WebSearch with platform-targeted site operators plus recency filters. Produces DISCOURSE.md (a structured brief) and JSON output the writer can consume. Complements blog-researcher (which focuses on authority sources) with a recency-and-engagement lens. Not for verifying statistics (blog-factcheck) or gathering authority sources. Use when user says "blog discourse", "discourse research", "what are people saying about", "research what people are saying", "voice of customer", "social listening", "30-day research", "trend research", "what's the discussion on", "real-time research", "practitioner discourse", "/blog discourse".0 installsblog-auditFull-site blog health assessment scanning all blog files for quality scores, orphan pages, topic cannibalization, stale content, and AI citation readiness. Runs canonical batch analysis before site-wide checks. Produces per-post scores and a prioritized action queue. Use when the user asks for a site-wide blog health check across many posts ("blog audit", "blog health", "audit all posts", "site audit of the blog"). For one post, or a quality score with fixes for a few named files, use blog-analyze instead.0 installsblog-seo-checkPost-writing SEO validation with pass/fail checklist covering title tag clarity and uniqueness, meta description quality, heading hierarchy, internal/external link audit with anchor text analysis, canonical URL verification, Open Graph meta tags (og:title, og:description, og:image), Twitter Card validation, structured data presence and validity, URL structure optimization, and image alt text presence. Produces prioritized fix list with specific recommendations. Use for ONE finished post when the user says "seo check", "validate seo", "on-page seo", "title tag check", "link audit". Not for a whole-site audit (blog-audit, claude-seo), AI-citation scoring (blog-geo), schema generation (blog-schema), or the delivery gates (blog_preflight.py).0 installsblog-flowFLOW framework integration for bloggers. Evidence-led content workflow using the Find, Optimize, Win loop with stage-specific AI prompts from the FLOW knowledge base (30 blog-applicable prompts, adapted from FLOW under CC BY 4.0). Use when user says "FLOW framework", "blog flow", "/blog flow", "evidence-led blogging", or "find optimize win", or asks for stage-specific blog prompts. Not for generic prompt writing.0 installs

More from claude-blog

View source →
blog-personaCreate and manage writing personas with NNGroup 4-dimension tone framework (Funny-Serious, Formal-Casual, Respectful-Irreverent, Enthusiastic-Matter-of-fact). Personas define readability targets, sentence length distribution, vocabulary tier, contraction frequency, and summary box label. blog-write and blog-rewrite load the active persona as writer guidance. Use when the user says "create persona", "use persona", "list personas", or wants tone sliders and writing rules saved as structured JSON. Not for measuring style from existing posts (blog-style) or for audience, positioning, and taboo-phrase context files (blog-brand).1 installsblog-outlineSERP-informed outline generation with H2/H3 heading hierarchy, competitive content gap analysis, section-by-section word count targets, chart and image placement markers, optional FAQ question planning, and internal linking zones. Skeleton only: structure, H2/H3 hierarchy, word counts, optional FAQ slots. Use blog-brief instead if you need full competitive analysis, statistics research, and image suggestions. Lighter than a full content brief, generates article skeleton and structure only, ready for /blog write to consume. Use when user says "outline", "blog outline", "content outline", "structure blog", "plan sections", "article skeleton", "heading structure", "SERP analysis", "competitive outline", "plan article".1 installsblog-chartInternal capability, not user-invocable: the orchestrator calls it while running blog-write or blog-rewrite to turn research data into dark-mode compatible inline SVG charts (horizontal bar, grouped bar, donut, line, lollipop, area, radar) for HTML or MDX. Produces accessible markup (role=img, aria-labelledby, unique ids), source attribution and transparent backgrounds. Agents cannot call it.0 installsblog-repurposeTurn an existing blog post into draft text for other channels: X threads, LinkedIn posts, Threads/Bluesky, short-video scripts, YouTube scripts, Reddit posts, newsletter excerpts, podcast scripts. Saves drafts to files; it never posts anywhere. Never invents personal stories or results: first-hand framing appears only when the user supplies it. Use when the user says "repurpose", "turn this post into a thread", "linkedin post from blog", "youtube script from post". Not for writing the blog post itself (blog-write) or scheduling.0 installsblog-writeWrite a new blog article from scratch for Google rankings and AI citations, then take it through the delivery gates. Generates the full article with template selection, answer-first formatting, Key Takeaways box, sourced statistics, licensed images, built-in SVG charts, optional FAQ and internal linking, in MDX, markdown or HTML. Use when the user asks to write a new blog post or article from a topic or brief ("write a blog post", "draft a new article", "/blog write"). Not for editing an existing post (blog-rewrite), and not for a standalone outline, brief or research request.0 installsblog-rewriteRewrite and optimize existing blog posts for Google SEO (E-E-A-T, helpful content) and AI citation visibility as one SEO discipline. For AI-citation-only audit (no Google work), use blog-geo instead. Replaces fabricated statistics with sourced data, applies answer-first formatting, adds images, generates SVG charts, and updates modified dates only for substantive changes. Works with any blog format (MDX, markdown, HTML). Use when user says "rewrite blog", "optimize blog", "update blog", "improve blog", "fix blog".0 installs

More Build skills

Browse category →
senior-frontendBuild and review React, Next.js, TypeScript or Tailwind frontends: components, scaffolding, performance and bundle size. Use whenever the user wants a new component or app, a page feels slow, the bundle is too big, or asks for a frontend code review.650 installsui-design-systemUse when building a design system: tokens, component docs, responsive scales or developer handoff. Generates tokens with design_token_generator.py.550 installsfrontend-designGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.361 installssenior-backendBuild and fix backend services: REST or GraphQL APIs, auth, microservices, PostgreSQL queries, migrations and load tests. Use whenever the user's API is slow or broken, needs login or auth added, a schema change, or a new endpoint or service scaffolded.264 installsself-improving-agentCurate what the agent has learned into durable project knowledge. Reviews Claude Code auto-memory (MEMORY.md and its topic files) for learnings worth keeping, promotes proven ones into CLAUDE.md or .claude/rules/, records a correction as a lesson that persists across sessions, prunes stale or duplicate entries, and turns a recurring fix into a reusable skill. Use whenever the user asks what you have learned or saved about the project, which memories should become permanent rules, to remember a lesson or stop repeating a mistake, or to clean up, audit or check memory health.183 installsusing-superpowersUse when starting any conversation - establishes how to find and use skills, requiring skill invocation before ANY response including clarifying questions147 installs

Frequently asked questions about blog-image

What does the blog-image skill do?

Paid Gemini image generation for blog heroes, inline illustrations, and OG cards (direct API by default, optional MCP for edits). Asks for explicit consent before the first paid call. Runs only on an explicit request: /blog image, "generate a blog hero image", "blog illustration", "edit this blog image", "OG image", or when blog-write or blog-rewrite needs a hero. Not for charts (blog-chart) or stock-photo search. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.

How do I install the blog-image skill?

Run `npx @skills-hub-ai/cli install claude-blog-blog-image` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/claude-blog-blog-image/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.

Which AI tools does blog-image work with?

blog-image runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.

Is the blog-image skill free?

Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.

How do I use blog-image after installing it?

In Claude Code, type `/claude-blog-blog-image` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.

Can I share the blog-image skill with my team?

Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.