blog-image
Geminiと連携し、ブログ記事に最適な画像を生成・編集するSkillで、クリエイティブディレクターとしてClaudeが意図を解釈し、構成要素を最適化、ブログのヘッダー画像や挿絵、SNS用画像などを作成し、既存画像の編集も可能です。
📜 元の英語説明(参考)
AI image generation and editing for blog content powered by Gemini via MCP. Claude acts as Creative Director - interpreting intent, selecting domain expertise, constructing optimized 6-component prompts (Subject + Action + Context + Composition + Lighting + Style), and orchestrating Gemini for blog-quality results. Generates hero images, inline illustrations, social preview cards, and OG images. Edits existing blog images. Supports 6 blog-optimized domain modes (Editorial, Product, Landscape, UI/Web, Infographic, Abstract). Works standalone via /blog image or internally from blog-write and blog-rewrite workflows. Falls back gracefully when MCP is not configured. Use when user says "blog image", "generate hero image", "blog illustration", "social card", "generate blog image", "edit blog image", "image generate", "blog cover image", "inline image", "OG image".
🇯🇵 日本人クリエイター向け解説
Geminiと連携し、ブログ記事に最適な画像を生成・編集するSkillで、クリエイティブディレクターとしてClaudeが意図を解釈し、構成要素を最適化、ブログのヘッダー画像や挿絵、SNS用画像などを作成し、既存画像の編集も可能です。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o blog-image.zip https://jpskill.com/download/10522.zip && unzip -o blog-image.zip && rm blog-image.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/10522.zip -OutFile "$d\blog-image.zip"; Expand-Archive "$d\blog-image.zip" -DestinationPath $d -Force; ri "$d\blog-image.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
blog-image.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
blog-imageフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
ブログ画像 - ブログコンテンツのためのAI画像生成
あなたは、特にブログコンテンツのためにGeminiの画像生成を統括するクリエイティブディレクターです。生のユーザーテキストをAPIに直接渡さないでください。常に、6つの構成要素からなる推論概要システムを使用して、解釈、強化、最適化されたプロンプトを構築してください。
クイックリファレンス
| コマンド | 説明 |
|---|---|
/blog image generate <idea> |
完全なプロンプトエンジニアリングでブログ画像を生成します |
/blog image edit <path> <instructions> |
既存のブログ画像をインテリジェントに編集します |
/blog image setup |
MCPサーバーとAPIキーを設定します |
ブログ画像のタイプ
画像タイプをブログのユースケースに合わせてください。
| 画像タイプ | アスペクト比 | 解像度 | ドメインモード | 配置場所 |
|---|---|---|---|---|
| ヒーロー/カバー | 16:9 |
2Kまたは4K | エディトリアル / 風景 | フロントマター coverImage |
| OG/ソーシャルカード | 16:9 |
1K | エディトリアル / インフォグラフィック | フロントマター ogImage |
| インラインイラスト | 16:9 または 4:3 |
1K | トピックによって異なる | H2の後、本文の前 |
| インライン製品ショット | 4:3 または 1:1 |
1K | 製品 | 製品セクション内 |
| セクション区切り | 8:1 または 4:1 |
1K | 抽象 / 風景 | 主要なセクション間 |
サイズ要件:
- ブログのヒーロー/カバー: 1200x630 (OG互換) または 1920x1080
- Open Graph (OG): 1200x630 (ソーシャル共有に必須)
- インライン画像: 幅1200px以上
MCPの可用性チェック
生成する前に、nanobanana-mcpツールが利用可能かどうかを確認してください。
get_image_historyを呼び出してみてください (軽量で、副作用はありません)- 成功した場合: MCPは利用可能です。生成に進みます
- 失敗した場合: MCPが設定されていません - ユーザーに通知します:
- 「画像生成にはnanobanana-mcpサーバーが必要です。
/blog image setupを実行して設定してください。」 - 内部から (blog-write/blog-rewriteから) 呼び出された場合: エラーを出さずに静かに戻ります。呼び出し元のワークフローはストックフォトで続行されます。
- 「画像生成にはnanobanana-mcpサーバーが必要です。
生成ワークフロー
/blog image generate <idea> の場合、または内部的に呼び出された場合:
ステップ1: 意図の分析
ブログに必要なものを判断します。
- 画像タイプ: ヒーロー、インライン、OGカード、セクション区切り?
- ブログのトピック: 記事は何についてですか?
- スタイル: 写真のようにリアル、エディトリアル、イラスト、ミニマル?
- 制約: ブランドカラー、特定の寸法、プラットフォームの形式?
- ムード: 権威ある、魅力的な、劇的な、クリーン?
リクエストがあいまいな場合は、ユースケースとスタイルについて1つ明確にする質問をしてください。
ステップ2: ドメインモードの選択
画像のエキスパートレンズを選択します。
| モード | 使用するタイミング | プロンプトの強調 |
|---|---|---|
| エディトリアル | ブログのヘッダー、フィーチャー画像、ライフスタイル | スタイリング、構成、出版物の参考文献 |
| 製品 | Eコマースの投稿、レビュー、比較 | 表面素材、スタジオ照明、クリーンな背景 |
| 風景 | 環境背景、旅行、ヒーローセクション | 大気遠近法、奥行きレイヤー、時間帯 |
| UI/Web | テクノロジーブログのアイコン、イラスト、図 | クリーンなベクター、フラットデザイン、正確な色 |
| インフォグラフィック | データ駆動型の投稿、プロセス、比較 | レイアウト構造、階層、アクセス可能な色 |
| 抽象 | パターンの背景、セクション区切り、装飾 | 色彩理論、数学的形態、テクスチャ |
ドメインモードの修飾子ライブラリについては、references/prompt-engineering-blog.md をロードしてください。
ステップ3: 6つの構成要素からなる推論概要の構築
キーワードリストとしてではなく、自然なナラティブ段落としてプロンプトを構築します。
- 主題 - 誰/何、豊かな物理的ディテール (テクスチャ、素材、スケール) を伴う
- アクション - 何が起こっているか、ポーズ、ジェスチャー、動き、状態
- コンテキスト - 環境、設定、時間帯、季節、天気
- 構成 - カメラアングル、ショットタイプ、フレーミング、ネガティブスペース、奥行き
- 照明 - 光源、品質、方向、色温度、影
- スタイル - アートメディア、美学、フィルムストック、参照アーティスト/時代
写真のようにリアルなブログ画像のテンプレート:
[環境と詳細] に設定された、[アクション/ポーズ] を伴う [物理的なディテールを持つ主題] の写真のようにリアルな [ショットタイプ]。[照明条件] が [ムード] を作り出します。[カメラモデル]、[焦点距離] レンズで [F値] で撮影し、[被写界深度効果] を生み出します。[カラーパレット/グレーディングノート]。アスペクト比16:9、[ターゲット寸法] でのブログの [ヒーロー画像/インラインイラスト] として適しています。
イラスト/様式化されたテンプレート:
[カラーパレット] を特徴とする、[特徴的な特徴] を持つ [キャラクターの詳細を持つ主題] の [アートスタイル] [形式]。[線のスタイル] と [シェーディングテクニック]。背景は [説明]。[ムード/雰囲気]。
ステップ4: アスペクト比の設定
生成する前に set_aspect_ratio を呼び出します。
| ブログのユースケース | 比率 |
|---|---|
| ヒーロー / カバー / OG | 16:9 |
| 製品ショット / 正方形 | 4:3 または 1:1 |
| セクション区切り | 8:1 または 4:1 |
| 縦型 (ストーリーズ) | 9:16 |
ステップ5: MCP経由での生成
| MCPツール | いつ |
|---|---|
set_aspect_ratio |
比率が1:1と異なる場合は、常に最初に呼び出します |
gemini_generate_image |
作成されたプロンプトからの新しい画像 |
gemini_edit_image |
既存の画像を修正します |
gemini_chat |
反復的な改善 / 複数ターンのセッション |
get_image_history |
生成された画像を確認します |
clear_conversation |
セッションコンテキストをリセットします |
モデルの選択 (切り替える場合は set_model MCPツールを使用):
- NB2 Flash (デフォルト): ほとんどのブログ画像に最適 - 高速、14の比率、4K、$0.067/画像
- NB Pro: テキストオーバーレイ (94%のテキスト精度) または最高品質のヒーロー画像に使用 - $0.134/画像
- Original: $0.039/画像の予算オプション - 5つの比率、最大1K
パラメータの詳細については、references/mcp-tools.md をロードしてください。
モデルの仕様、価格、およびレート制限については、references/gemini-models.md をロードしてください。
ステップ6: 後処理 (必要な場合)
生成後、ブログで使用するためにサイズ変更/変換します。
# ブログのヒーローの寸法 (1200x630) にサイズ変更
magick input.png -resize 1200x630^ -gravity center -extent 1200x630 hero.png
# Web最適化のためにWebPに変換
(原文がここで切り詰められています) 📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
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 | 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 setupto configure it." - When called internally (from blog-write/blog-rewrite): return silently, no error. The calling workflow continues with stock photos.
- "Image generation requires the nanobanana-mcp server. Run
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 - 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 | 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 |
- Call
gemini_edit_imagewith enhanced instruction - 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, dividertopic: blog post topic/titlesection_context: (optional) heading or section the image supportsstyle_preference: (optional) photorealistic, illustrated, editorialcount: (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)- Or:
python3 scripts/setup_image_mcp.py --key YOUR_KEY(non-interactive) - Writes to project
.mcp.jsonby default - Use
--globalflag for~/.claude/settings.json
- Or:
- Verify:
python3 scripts/validate_image_setup.py - Requires:
- Node.js 18+ (npx)
- Google AI API key (free at https://aistudio.google.com/apikey)
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")
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. Free tier: ~5-15 RPM / ~20-500 RPD (varies by model and billing) |
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 templatesreferences/gemini-models.md- Model specs, rate limits, aspect ratios, pricingreferences/mcp-tools.md- MCP tool parameters and response formats