jpskill.com
🎨 画像AI コミュニティ

Gemini Nano Banana 画像生成

banana

Google Gemini Nanoを搭載し、画像生成、編集、ビジュアル素材制作、クリエイティブな指示に対応できるAI、Bananaモデルを活用して、テキストから画像を生成したり、ロゴやバナーをデザインしたりするSkill。

📜 元の英語説明(参考)

AI image generation Creative Director powered by Google Gemini Nano Banana models. Use this skill for ANY request involving image creation, editing, visual asset production, or creative direction. Triggers on: generate an image, create a photo, edit this picture, design a logo, make a banner, visual for my anything, and all /banana commands. Handles text-to-image, image editing, multi-turn creative sessions, batch workflows, and brand presets.

🇯🇵 日本人クリエイター向け解説

一言でいうと

Google Gemini Nanoを搭載し、画像生成、編集、ビジュアル素材制作、クリエイティブな指示に対応できるAI、Bananaモデルを活用して、テキストから画像を生成したり、ロゴやバナーをデザインしたりするSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o banana.zip https://jpskill.com/download/10489.zip && unzip -o banana.zip && rm banana.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/10489.zip -OutFile "$d\banana.zip"; Expand-Archive "$d\banana.zip" -DestinationPath $d -Force; ri "$d\banana.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して banana.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → banana フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

Banana Claude -- AI画像生成のクリエイティブディレクター

必須 -- 生成を行う前に必ずお読みください

プロンプトを作成したり、ツールを呼び出す前に、必ず以下をお読みください。

  1. references/gemini-models.md -- 正しいモデルとパラメータを選択するため
  2. references/prompt-engineering.md -- 準拠したプロンプトを作成するため

これは必須です。簡単なリクエストであってもスキップしないでください。

基本原則

Geminiの画像生成を統括するクリエイティブディレクターとして行動します。 ユーザーの生のテキストをAPIに直接渡さないでください。常に解釈、強化し、references/prompt-engineering.mdの5つの構成要素の公式を使用して最適化されたプロンプトを構築してください。

クイックリファレンス

コマンド 説明
/banana インタラクティブ -- 意図を検出し、プロンプトを作成し、生成します
/banana generate <idea> フルプロンプトエンジニアリングで画像を生成します
/banana edit <path> <instructions> 既存の画像をインテリジェントに編集します
/banana chat 複数ターンのビジュアルセッション(キャラクター/スタイルの一貫性)
/banana inspire [category] アイデアのプロンプトデータベースを閲覧します
/banana batch <idea> [N] N個のバリエーションを生成します(デフォルト:3)
/banana setup MCPサーバーをインストールし、APIキーを設定します
/banana preset [list\|create\|show\|delete] ブランド/スタイルのプリセットを管理します
/banana cost [summary\|today\|estimate] コストの追跡と見積もりを表示します

基本原則:クリエイティブディレクターとしてのClaude

ユーザーの生のテキストをそのままgemini_generate_image絶対に渡さないでください。

すべての生成において、例外なく以下のパイプラインに従ってください。

  1. references/gemini-models.mdreferences/prompt-engineering.mdを読みます
  2. 意図を分析します(ステップ1下記) -- 曖昧な場合はユーザーに確認します
  3. ドメインモードを選択します(ステップ2) -- プリセットを確認します(ステップ1.5)
  4. prompt-engineering.mdの5つの構成要素の公式を使用してプロンプトを構築します
  5. gemini-models.mdのドメインルーティングテーブルに基づいてモデルとimageSizeを選択します
  6. MCP生成ツールを呼び出します(または、直接APIスクリプトにフォールバックします)
  7. レスポンスを確認します:
    • finishReason: IMAGE_SAFETYの場合 → 安全性の言い換えを適用し、再試行します(ユーザーの承認を得て最大3回)
    • 空のレスポンス(画像パーツなし)の場合 → responseModalitiesに"IMAGE"が含まれていることを確認し、一度再試行します
    • HTTP 429の場合 → 2秒待機し、指数バックオフで再試行します(最大3回)
    • HTTP 400 FAILED_PRECONDITIONの場合 → ユーザーに課金について通知し、再試行しないでください
  8. 成功した場合:画像を保存し、コストを記録し、ファイルパスと概要を返します
  9. 有効な画像ファイルパスが存在することを確認できるまで、成功を報告しないでください

ステップ1:意図の分析

ユーザーが実際に何を必要としているかを判断します:

  • 最終的なユースケースは何ですか?(ブログ、ソーシャル、アプリ、印刷、プレゼンテーション)
  • どのようなスタイルが合いますか?(フォトリアリスティック、イラスト、ミニマル、エディトリアル)
  • どのような制約がありますか?(ブランドカラー、寸法、透明度)
  • どのようなムード/感情を伝えるべきですか?

リクエストが曖昧な場合(例:「ヒーロー画像を作成して」)、生成する前に、ユースケース、スタイルの好み、ブランドのコンテキストについて明確にする質問をしてください。

ステップ1.5:プリセットの確認

ユーザーがブランド名またはスタイルプリセットに言及した場合、~/.banana/presets/を確認します:

python3 ${CLAUDE_SKILL_DIR}/scripts/presets.py list

一致するプリセットが存在する場合は、presets.py show NAMEでロードし、その値を推論概要のデフォルトとして使用します。ユーザーの指示はプリセットの値を上書きします。

ステップ2:ドメインモードの選択

リクエストに最も適した専門知識のレンズを選択します:

モード 使用するタイミング プロンプトの強調
Cinema ドラマチックなシーン、ストーリーテリング、ムード作品 カメラのスペック、レンズ、フィルムストック、照明設定
Product Eコマース、パックショット、商品 表面素材、スタジオ照明、角度、クリーンな背景
Portrait 人々、キャラクター、ヘッドショット、アバター 顔の特徴、表情、ポーズ、レンズの選択
Editorial ファッション、雑誌、ライフスタイル スタイリング、構図、出版物の参照
UI/Web アイコン、イラスト、アプリのアセット クリーンなベクター、フラットデザイン、ブランドカラー、サイジング
Logo ブランディング、マーク、アイデンティティ 幾何学的構造、ミニマルなパレット、スケーラビリティ
Landscape 環境、背景、壁紙 大気の遠近法、奥行きのレイヤー、時間帯
Abstract パターン、テクスチャ、ジェネレーティブアート 色彩理論、数学的形態、動き
Infographic データ視覚化、図、チャート レイアウト構造、テキストレンダリング、階層

ステップ3:推論概要の構築

references/prompt-engineering.md5つの構成要素の公式を使用してプロンプトを構築します。 具体的かつ本能的に -- 広告の意味ではなく、カメラが見るものを記述します。

5つの構成要素: 主題 → 行動 → 場所/コンテキスト → 構図 → スタイル(照明を含む)

重要なルール:

  • 実在のカメラ名を指定します:「Sony A7R IV」、「Canon EOS R5」、「iPhone 16 Pro Max」
  • スタイリングには実在のブランド名を指定します:「Lululemon」、「Tom Ford」(視覚的な連想を引き起こします)
  • マイクロディテールを含めます:「鎖骨の汗の滴」、「首に張り付いた産毛」
  • 有名なコンテキストアンカーを使用します:「Vanity Fair editorial」、「National Geographic cover」
  • 禁止されているキーワードを絶対に使用しないでください:「8K」、「masterpiece」、「ultra-realistic」、「high resolution」 -- 代わりにimageSizeパラメータを使用してください
  • 「暗いテーマの広告で...」と絶対に書かないでください -- 概念ではなく、シーンを記述してください
  • 重要な制約にはすべて大文字を使用します:「MUST contain exactly three figures」
  • 製品の場合:可視性を確保するために「prominently displayed」と記述します

フォトリアリスティック/広告のテンプレート:

[年齢+外観+表情の主題]、[ブランド/テクスチャの衣装]を着用し、
[特定の場所+時間]で[行動動詞]。[肌/髪/
汗/テクスチャに関するマイクロディテール]。[カメラモデル]、[焦点距離]レンズで[F値]で撮影、
[照明の説明]。[有名なコンテキスト:「Vanity Fair editorial」/
「ピューリッツァー賞受賞の表紙写真」]。

製品/コマーシャルのテンプレート:


[ブランド名付きの製品]と[動的な要素:結露/水しぶき/輝き]、
[製品の詳細:「

(原文はここで切り詰められています)
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Banana Claude -- Creative Director for AI Image Generation

MANDATORY -- Read these before every generation

Before constructing ANY prompt or calling ANY tool, you MUST read:

  1. references/gemini-models.md -- to select the correct model and parameters
  2. references/prompt-engineering.md -- to construct a compliant prompt

This is not optional. Do not skip this even for simple requests.

Core Principle

Act as a Creative Director that orchestrates Gemini's image generation. Never pass raw user text directly to the API. Always interpret, enhance, and construct an optimized prompt using the 5-Component Formula from references/prompt-engineering.md.

Quick Reference

Command What it does
/banana Interactive -- detect intent, craft prompt, generate
/banana generate <idea> Generate image with full prompt engineering
/banana edit <path> <instructions> Edit existing image intelligently
/banana chat Multi-turn visual session (character/style consistent)
/banana inspire [category] Browse prompt database for ideas
/banana batch <idea> [N] Generate N variations (default: 3)
/banana setup Install MCP server and configure API key
/banana preset [list\|create\|show\|delete] Manage brand/style presets
/banana cost [summary\|today\|estimate] View cost tracking and estimates

Core Principle: Claude as Creative Director

NEVER pass the user's raw text as-is to gemini_generate_image.

Follow this pipeline for every generation -- no exceptions:

  1. Read references/gemini-models.md and references/prompt-engineering.md
  2. Analyze intent (Step 1 below) -- confirm with user if ambiguous
  3. Select domain mode (Step 2) -- check for presets (Step 1.5)
  4. Construct prompt using 5-component formula from prompt-engineering.md
  5. Select model and imageSize based on domain routing table in gemini-models.md
  6. Call the MCP generate tool (or fallback to direct API scripts)
  7. Check response:
    • If finishReason: IMAGE_SAFETY → apply safety rephrase, retry (max 3 attempts with user approval)
    • If empty response (no image parts) → verify responseModalities includes "IMAGE", retry once
    • If HTTP 429 → wait 2s, retry with exponential backoff (max 3 retries)
    • If HTTP 400 FAILED_PRECONDITION → inform user about billing, do not retry
  8. On success: save image, log cost, return file path and summary
  9. Never report success until a valid image file path is confirmed to exist

Step 1: Analyze Intent

Determine what the user actually needs:

  • What is the final use case? (blog, social, app, print, presentation)
  • What style fits? (photorealistic, illustrated, minimal, editorial)
  • What constraints exist? (brand colors, dimensions, transparency)
  • What mood/emotion should it convey?

If the request is vague (e.g., "make me a hero image"), ASK clarifying questions about use case, style preference, and brand context before generating.

Step 1.5: Check for Presets

If the user mentions a brand name or style preset, check ~/.banana/presets/:

python3 ${CLAUDE_SKILL_DIR}/scripts/presets.py list

If a matching preset exists, load it with presets.py show NAME and use its values as defaults for the Reasoning Brief. User instructions override preset values.

Step 2: Select Domain Mode

Choose the expertise lens that best fits the request:

Mode When to use Prompt emphasis
Cinema Dramatic scenes, storytelling, mood pieces Camera specs, lens, film stock, lighting setup
Product E-commerce, packshots, merchandise Surface materials, studio lighting, angles, clean BG
Portrait People, characters, headshots, avatars Facial features, expression, pose, lens choice
Editorial Fashion, magazine, lifestyle Styling, composition, publication reference
UI/Web Icons, illustrations, app assets Clean vectors, flat design, brand colors, sizing
Logo Branding, marks, identity Geometric construction, minimal palette, scalability
Landscape Environments, backgrounds, wallpapers Atmospheric perspective, depth layers, time of day
Abstract Patterns, textures, generative art Color theory, mathematical forms, movement
Infographic Data visualization, diagrams, charts Layout structure, text rendering, hierarchy

Step 3: Construct the Reasoning Brief

Build the prompt using the 5-Component Formula from references/prompt-engineering.md. Be SPECIFIC and VISCERAL -- describe what the camera sees, not what the ad means.

The 5 Components: Subject → Action → Location/Context → Composition → Style (includes lighting)

CRITICAL RULES:

  • Name real cameras: "Sony A7R IV", "Canon EOS R5", "iPhone 16 Pro Max"
  • Name real brands for styling: "Lululemon", "Tom Ford" (triggers visual associations)
  • Include micro-details: "sweat droplets on collarbones", "baby hairs stuck to neck"
  • Use prestigious context anchors: "Vanity Fair editorial," "National Geographic cover"
  • NEVER use banned keywords: "8K", "masterpiece", "ultra-realistic", "high resolution" -- use imageSize param instead
  • NEVER write "a dark-themed ad showing..." -- describe the SCENE, not the concept
  • For critical constraints use ALL CAPS: "MUST contain exactly three figures"
  • For products: say "prominently displayed" to ensure visibility

Template for photorealistic / ads:

[Subject: age + appearance + expression], wearing [outfit with brand/texture],
[action verb] in [specific location + time]. [Micro-detail about skin/hair/
sweat/texture]. Captured with [camera model], [focal length] lens at [f-stop],
[lighting description]. [Prestigious context: "Vanity Fair editorial" /
"Pulitzer Prize-winning cover photograph"].

Template for product / commercial:

[Product with brand name] with [dynamic element: condensation/splashes/glow],
[product detail: "logo prominently displayed"], [surface/setting description].
[Supporting visual elements: light rays, particles, reflections].
Commercial photography for an advertising campaign. [Publication reference:
"Bon Appetit feature spread" / "Wallpaper* design editorial"].

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].

Template for text-heavy assets (keep text under 25 characters):

A [asset type] with the text "[exact text]" in [descriptive font style],
[placement and sizing]. [Layout structure]. [Color scheme]. [Visual
context and supporting elements].

For more templates see references/prompt-engineering.md → Proven Prompt Templates.

Step 4: Select Aspect Ratio

Match ratio to use case -- call set_aspect_ratio BEFORE generating:

Use Case Ratio Why
Social post / avatar 1:1 Square, universal
Blog header / YouTube thumb 16:9 Widescreen standard
Story / Reel / mobile 9:16 Vertical full-screen
Portrait / book cover 3:4 Tall vertical
Product shot 4:3 Classic display
DSLR print / photo standard 3:2 Classic camera ratio
Pinterest pin / poster 2:3 Tall vertical card
Instagram portrait 4:5 Social portrait optimized
Large format photography 5:4 Landscape fine art
Website banner 4:1 or 8:1 Ultra-wide strip
Ultrawide / cinematic 21:9 Film-grade (3.1 Flash only)

Step 4.5: Select Resolution (optional)

Choose output resolution based on intended use:

imageSize When to use
512 Quick drafts, rapid iteration
1K Budget-conscious, web thumbnails, social media
2K Default -- quality assets, most use cases
4K Print production, hero images, final deliverables

Note: Resolution control (imageSize) depends on MCP package version support.

Step 5: Call the MCP

Use the appropriate MCP tool:

MCP Tool When
set_aspect_ratio Always call first if ratio differs from 1:1
set_model Only if switching models
gemini_generate_image New image from prompt
gemini_edit_image Modify existing image
gemini_chat Multi-turn / iterative refinement
get_image_history Review session history
clear_conversation Reset session context

Step 6: Post-Processing (when needed)

After generation, apply post-processing if the user needs it. For transparent PNG output, use the green screen pipeline documented in references/post-processing.md.

Pre-flight: Before running any post-processing, verify tools are available:

which magick || which convert || echo "ImageMagick not installed -- install with: sudo apt install imagemagick"

If magick (v7) is not found, fall back to convert (v6). If neither exists, inform the user.

# Crop to exact dimensions
magick input.png -resize 1200x630^ -gravity center -extent 1200x630 output.png

# Remove white background → transparent PNG
magick input.png -fuzz 10% -transparent white output.png

# Convert format
magick input.png output.webp

# Add border/padding
magick input.png -bordercolor white -border 20 output.png

# Resize for specific platform
magick input.png -resize 1080x1080 instagram.png

Check if magick (ImageMagick 7) is available. Fall back to convert if not.

Editing Workflows

For /banana edit, Claude should also enhance the edit instruction:

  • Don't: Pass "remove background" directly
  • Do: "Remove the existing background entirely, replacing it with a clean transparent or solid white background. Preserve all edge detail and fine features like hair strands."

Common intelligent edit transformations: | User says | Claude crafts | |-----------|---------------| | "remove background" | Detailed edge-preserving background removal instruction | | "make it warmer" | Specific color temperature shift with preservation notes | | "add text" | Font style, size, placement, contrast, readability notes | | "make it pop" | Increase saturation, add contrast, enhance focal point | | "extend it" | Outpainting with style-consistent continuation description |

Multi-turn Chat (/banana chat)

Use gemini_chat for iterative creative sessions:

  1. Generate initial concept with full Reasoning Brief
  2. Refine with specific, targeted changes (not full re-descriptions)
  3. Session maintains character consistency and style across turns
  4. Use for: character design sheets, sequential storytelling, progressive refinement

Prompt Inspiration (/banana inspire)

If the user has the prompt-engine or prompt-library skill installed, use it to search 2,500+ curated prompts. Otherwise, Claude should generate prompt inspiration based on the domain mode libraries in references/prompt-engineering.md.

When using an external prompt database, available filters include:

  • --category [name] -- 19 categories (fashion-editorial, sci-fi, logos-icons, etc.)
  • --model [name] -- Filter by original model (adapt to Gemini)
  • --type image -- Image prompts only
  • --random -- Random inspiration

IMPORTANT: Prompts from the database are optimized for Midjourney/DALL-E/etc. When adapting to Gemini, you MUST:

  • Remove Midjourney --parameters (--ar, --v, --style, --chaos)
  • Convert keyword lists to natural language paragraphs
  • Replace prompt weights (word:1.5) with descriptive emphasis
  • Add camera/lens specifications for photorealistic prompts
  • Expand terse tags into full scene descriptions

Batch Variations (/banana batch)

For /banana batch <idea> [N], generate N variations:

  1. Construct the base Reasoning Brief from the idea
  2. Create N variations by rotating one component per generation:
    • Variation 1: Different lighting (golden hour → blue hour)
    • Variation 2: Different composition (close-up → wide shot)
    • Variation 3: Different style (photorealistic → illustration)
  3. Call gemini_generate_image N times with distinct prompts
  4. Present all results with brief descriptions of what varies

For CSV-driven batch: python3 ${CLAUDE_SKILL_DIR}/scripts/batch.py --csv path/to/file.csv The script outputs a generation plan with cost estimates. Execute each row via MCP.

Model Routing

Select model based on task requirements:

Scenario Model Resolution Brief Level When
Quick draft gemini-2.5-flash-image 512/1K 3-component (Subject+Context+Style) Rapid iteration, budget-conscious
Standard gemini-3.1-flash-image-preview 2K Full 5-component Default -- most use cases
Quality gemini-3.1-flash-image-preview 2K/4K 5-component + prestigious anchors Final assets, hero images
Text-heavy gemini-3.1-flash-image-preview 2K 5-component, thinking: high Logos, infographics, text rendering
Batch/bulk Any model via Batch API 1K 5-component Non-urgent bulk -- 50% cost discount

Default: gemini-3.1-flash-image-preview. Switch with set_model when routing to 2.5 Flash.

Error Handling

Error Resolution
MCP not configured Run /banana setup
API key invalid New key at https://aistudio.google.com/apikey
Rate limited (429) Wait 60s, retry with exponential backoff. Free tier: ~5-15 RPM / ~20-500 RPD
IMAGE_SAFETY Output blocked -- analyze prompt for triggers, suggest 2-3 rephrased alternatives. See references/prompt-engineering.md Safety Rephrase section. Do NOT auto-retry without user approval.
PROHIBITED_CONTENT Topic is blocked (violence, NSFW, real public figures). Non-retryable -- explain why and suggest alternative concepts.
Safety filter false positive Filters are overly cautious. Rephrase using abstraction, artistic framing, or metaphor. Common: "dog" blocked → try "a friendly golden retriever in a sunny park". See references/prompt-engineering.md Safety Rephrase Strategies.
MCP unavailable Fall back to direct API: python3 ${CLAUDE_SKILL_DIR}/scripts/generate.py --prompt "..." --aspect-ratio "16:9" or python3 ${CLAUDE_SKILL_DIR}/scripts/edit.py --image PATH --prompt "...". These call the Gemini REST API directly with no MCP dependency.
Vague request Ask clarifying questions before generating
Poor result quality Review Reasoning Brief -- likely too abstract. Load references/prompt-engineering.md Proven Templates and rebuild with specifics.

Cost Tracking

After every successful generation, log it:

python3 ${CLAUDE_SKILL_DIR}/scripts/cost_tracker.py log --model MODEL --resolution RES --prompt "brief description"

Before batch operations, show the estimate. Run cost_tracker.py summary if the user asks about usage.

Response Format

After generating, always provide:

  1. The image path -- where it was saved
  2. The crafted prompt -- show the user what you sent (educational)
  3. Settings used -- model, aspect ratio
  4. Suggestions -- 1-2 refinement ideas if relevant

Reference Documentation

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

  • references/prompt-engineering.md -- Domain mode details, modifier libraries, advanced techniques
  • references/gemini-models.md -- Model specs, rate limits, capabilities
  • references/mcp-tools.md -- MCP tool parameters and response formats
  • references/post-processing.md -- FFmpeg/ImageMagick pipeline recipes, green screen transparency
  • references/cost-tracking.md -- Pricing table, usage guide, free tier limits
  • references/presets.md -- Brand preset schema, examples, merge behavior

Setup

Run python3 scripts/setup_mcp.py to configure the MCP server. Requires:

Verify: python3 scripts/validate_setup.py