mcpField
T
text-to-image-prompt-optimizer

text-to-image-prompt-optimizer

github.com/manzxiaoクリエイティブ・メディア2521 回インストール38 週間前に更新
リポジトリ

text-to-image-prompt-optimizer について

生成AI画像ツール向けのプロンプト作成スキルです。Google Gemini(Nano Banana)を既定とし、各プラットフォームに合わせた形式や複数案を提示し、選んだ要素の理由も説明します。

主な機能

  1. 01Google Gemini(Nano Banana)を既定に設定
  2. 02プロンプトの案を2~3件作成
  3. 03Midjourney、Stable Diffusionなどに対応
  4. 04英語プロンプトと中国語訳を提示
  5. 05プロンプトの構成要素と選択理由を説明
  6. 06プラットフォーム別のパラメーターを提案

活用シーン

  1. 01画像の簡単な構想からプロンプトを作成
  2. 02既存の画像プロンプトを改善
  3. 03指定した画像プラットフォーム向けに調整
  4. 04スタイルや構図の異なる案を試す

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/manzxiao/text-to-image-prompt-optimizer --skill text-to-image-prompt-optimizer

インストール後、Claude Code で/text-to-image-prompt-optimizerを入力して読み込まれたか確認します。

同梱ファイル

SKILL.md と一緒にインストールされる参考資料やスクリプト。

LICENSE
.gitignore
README.md
references/
platform-specific.md
prompt-library.md
keywords-reference.md

詳細

AI 画像プロンプトオプティマイザー

Google Gemini(Nano Banana)を主にサポートし、Midjourney、Stable Diffusion、DALL-E、Leonardo.ai などの AI 画像生成ツール向けに、プロ品質の最適化されたプロンプトを生成します。

基本的なワークフロー

ユーザーがプロンプトの生成または最適化を依頼した場合:

  1. 意図を理解する

    • 中心となる被写体と、求める結果を特定します
    • 依頼が非常に曖昧な場合に限り、確認の質問をします
    • 質問しすぎず、妥当な想定に基づいて進めます
  2. 包括的なプロンプトを生成する

    • 基本形式:Google Gemini(Nano Banana) - 写真や映画の用語を用いた、会話調の自然な言葉で記述します
    • スタイルやアプローチを変えた複数のバリエーション(2~3 個)を提示します
    • 英語(主)と中国語の訳を両方含めます
    • Gemini 向けには、キーワードの羅列ではなく、明確で説明的な文章を使います
    • その他のプラットフォーム向けには、[Subject] + [Environment] + [Style] + [Lighting] + [Composition] + [Quality] の形式で構成します
  3. プラットフォームに応じた最適化を含める

    • Gemini(Nano Banana)― 主な対象:写真や映画の表現を使った、明確で会話調のプロンプトと、意味が伝わる肯定的な描写
    • Midjourney(副次的な対象):必要に応じて --ar、--s、--q などを追加します
    • Stable Diffusion(副次的な対象):サンプリングステップ数、CFG スケール、ネガティブプロンプトを提案します
    • ユーザーが指定したプラットフォームに合わせますが、指定がない場合は Gemini をデフォルトにします
  4. 説明し、理解を深める

    • プロンプトの各要素を分解して説明します
    • 特定のキーワードを選んだ理由を説明します
    • さまざまな効果を得るための変更案を提案します
  5. すぐに試せる次のステップを提示する

    • プロンプトの使い方を案内します
    • 調整のためのパラメーター変更を提案します
    • 生成結果をもとに、繰り返し改善できることを伝えます

出力形式

以下のように回答を構成します(Gemini 向けの形式を優先):

## 🎨 Generated Prompts

### ⭐ Variation 1: Google Gemini (Nano Banana) - RECOMMENDED
**English (Conversational):**
[Natural language prompt with clear, descriptive sentences using photographic/cinematic terminology]

**中文版本:**
[Chinese translation in conversational style]

**适用平台:** Google Gemini (Nano Banana / Nano Banana Pro)
**推荐模型:** [Nano Banana for testing / Nano Banana Pro for professional output]

---

### Variation 2: [Alternative Style/Platform]
**English:**
[Platform-specific format - keywords for Midjourney, structured for SD, etc.]

**中文版本:**
[Chinese translation]

**适用平台:** [Midjourney / Stable Diffusion / DALL-E / Leonardo.ai]

---

### Variation 3: [Another Alternative]
[Optional third variation if helpful]

---

## 📝 Prompt Breakdown

- **Subject:** [Explanation]
- **Composition:** [How elements are arranged - important for Gemini]
- **Lighting:** [Photography/cinematography terms used]
- **Style:** [Visual aesthetic description]
- **Technical:** [Camera terms, angles, etc. for Gemini]

## ⚙️ Platform Guide

**🌟 Gemini (Primary):**
- Model choice: [When to use Nano Banana vs Pro]
- Editing tips: [How to iterate conversationally]
- Special features: [Character consistency, multi-image, etc.]

**Other Platforms (Secondary):**
[Brief notes on Midjourney/SD/etc. parameters if relevant]

## 💡 Optimization Tips

[Gemini-focused suggestions first, then others]

## 🎯 Next Steps

**For Gemini:**
1. [How to use in Gemini app/AI Studio]
2. [How to iterate with conversational edits]
3. [How to leverage character consistency / multi-image features]

**For Other Platforms:**
[Platform-specific usage notes if requested]

主な原則

簡潔さ
  • 前置きを長くせず、プロンプトを直接生成します
  • 「プロンプトの作成をお手伝いします」のような表現は避けます
  • 確認がどうしても必要な場合を除き、すぐにプロンプトを提示します
冗長さより品質を重視
  • 一般的な説明より、具体的で効果的なキーワードを使います
  • 「良い照明」より「映画のような照明、ドラマチックな影、ゴールデンアワー」を優先します
  • 適切な場合は、確立された芸術スタイルを参照します
プラットフォームへの配慮
  • プラットフォームが指定されていない場合は、Google Gemini(Nano Banana)向けの形式をデフォルトにします ― 会話調で自然な文章を使います
  • 常に Gemini 版を最初に、主なおすすめとして提示します
  • 代替プラットフォーム向けの形式(Midjourney、SD など)も、次点のバリエーションとして含めます
  • 対象プラットフォームに適したパラメーターを自動的に含めます
  • Gemini 独自の機能(キャラクターの一貫性、会話による編集など)が関連する場合は、その特長を強調します
学習につながる内容
  • 特定のキーワードが効果的な理由を説明します
  • ユーザーが自分でプロンプトを作成するスキルを徐々に身につけられるよう支援します
  • さらに詳しく学べるよう、プロンプトライブラリを参照します

よくあるパターン

初心者向け
  • よりシンプルで直接的なプロンプトを使います
  • 各要素を丁寧に説明します
  • ユーザーが変更できるテンプレートを提示します
経験者向け
  • 重み付け、ネガティブプロンプト、複数コンセプトの融合など、高度なテクニックに焦点を当てます
  • アーティストの参考例やスタイルの組み合わせを提案します
  • 求められない限り、説明は最小限にします

参考資料

包括的なプロンプトテンプレートとキーワードライブラリについては、以下を参照してください:

以下の場合は、これらの参考資料を読み込みます:

  • ユーザーが特定のカテゴリー(ポートレート、風景など)を依頼した場合
  • ユーザーがキーワードの提案を求めた場合
  • プラットフォーム固有のガイダンスが必要な場合
  • 複雑なプロンプトや専門的なプロンプトが必要な場合

高度なテクニック

🌟 Gemini(Nano Banana)のテクニック - 最優先
キャラクターの一貫性
First prompt: "Generate a character: [detailed description]"
Follow-up: "Show the same character [in new scenario/pose/style]"
# Gemini will maintain character likeness across images
会話形式の編集
Initial: "Create [image description]"
Edits:
- "Make the background darker"
- "Add [element] to the scene"
- "Change [attribute] to [new value]"
# Each edit builds on the previous image
写真表現のコントロール
Use technical terms:
- "85mm portrait lens at f/1.8" (lens + aperture)
- "wide-angle shot from low angle" (lens + perspective)
- "shallow depth of field with bokeh" (focus effect)
- "golden hour lighting from left" (lighting direction)
意味を明確にした肯定的な描写
Instead of: "no cars, no people"
Use: "an empty, peaceful street with no signs of activity"

Instead of: "not blurry"
Use: "sharp focus, crystal clear, professional quality"

その他のプラットフォームのテクニック(次点)
重みのコントロール(Midjourney)
(red flower)::2 (blue flower)::1
# Red flower weighted 2x more than blue
ネガティブプロンプト(Stable Diffusion)
Negative prompt: ugly, blurry, low quality, distorted,
bad anatomy, watermark, text
スタイルのミックス(複数のプラットフォーム)
in the style of [Artist A] combined with [Artist B]
複数のコンセプトの融合(複数のプラットフォーム)
a fusion of [concept 1] and [concept 2]

クイックテンプレート

🌟 Gemini(Nano Banana)のテンプレート - 最優先
会話形式の定型文(推奨)
Create/Generate [subject description] [action/state].
The scene should show [environment details] with [composition description].
Use [lighting description] to create [mood/atmosphere].
The style should be [visual style] with [quality description].
ポートレート(Gemini)
Generate a professional portrait of [age/gender], [appearance details],
wearing [clothing]. The subject should have [expression/mood].
Use [lens/angle] perspective with [lighting description].
The background should be [background details]. The style should be
[photographic/artistic style] with [quality expectations].
風景(Gemini)
Create a [location/scene type] during [time/season]. The scene should
feature [key elements] with [weather/atmosphere]. Use [angle/perspective]
to capture [compositional focus]. The lighting should be [lighting type]
creating [mood]. Style: [photographic/artistic approach].
プロダクト(Gemini)
Generate a product photograph of [product] made of [material].
Position it on/against [background/surface] with [arrangement details].
Use [lighting setup] from [direction] creating [shadow/highlight effect].
Shot with [camera/lens details] at [angle]. The aesthetic should be
[style] suitable for [purpose].
キャラクターデザイン(Gemini)
Create a character: [description of person/creature] with [physical features].
They should be wearing [clothing/armor/accessories] and have [expression/pose].
The setting is [environment]. Use [art style] with [detail level].

その他のプラットフォームのテンプレート(次点)
基本的なキーワードの定型文(Midjourney/SD)
[subject], [environment], [style], [lighting], [composition], [quality]
ポートレート(キーワード形式)
[age/gender], [appearance], [clothing], [expression], [background],
[style], portrait photography, [quality]
風景(キーワード形式)
[location], [time/season], [weather], [color mood],
landscape photography, [angle], [quality]
プロダクト(キーワード形式)
[product], [material], [background], product photography,
[lighting], [angle], commercial, [quality]
コンセプトアート(キーワード形式)
[subject], [details], [genre] art, [atmosphere],
concept art, highly detailed, trending on ArtStation, [quality]

カテゴリー別の一般的なキーワード

品質:

  • 4k、8k、超高精細、高解像度
  • 非常に精細、シャープなフォーカス
  • 傑作、プロフェッショナル
  • 写実的、超写実的

ライティング:

  • 自然光、ゴールデンアワー、柔らかな光
  • ドラマチックなライティング、ボリュメトリックライティング
  • スタジオライティング、リムライト

構図:

  • クローズアップ、広角、俯瞰
  • 被写界深度の浅い表現、ボケ
  • 三分割法、中央配置

スタイル:

  • シネマティック、芸術的、ミニマリスト
  • サイバーパンク、ファンタジーアート、アニメ風
  • 写実的、油絵、水彩画

雰囲気:

  • 穏やか、ドラマチック、ミステリアス
  • 居心地のよい、壮大、幻想的
  • 鮮やか、憂うつ

ユーザーのリクエストへの対応

「[シンプルなアイデア]のプロンプトを生成して」

妥当な前提を加えてアイデアを膨らませ、2~3種類のバリエーションを提示し、それぞれの選択理由を説明します。

「このプロンプトを最適化して:[既存のプロンプト]」

既存のプロンプトを分析し、弱点を特定して、説明を添えて改善版を提示します。

「[特定のスタイル]にしたい」

スタイルに合わせたキーワードやアーティストの参照を使い、例を提示します。

「もっとよく/詳しくして」

品質を示すキーワードを加え、構図を洗練させ、具体性を高めます。

「バリエーションを作って」

スタイル、雰囲気、構図を変えた3~4種類のバリエーションを生成します。

効果的なプロンプトを作るためのヒント

  1. 具体的にする - 「犬」よりも「ゴールデンレトリバーの子犬」のほうが効果的です
  2. アーティストやスタイルを参照する - 「スタジオジブリのスタイルで」
  3. 品質を示すキーワードが重要 - 品質を表す語句を必ず含めます
  4. 順序が重要 - 前にあるキーワードほど影響力が強くなります
  5. テストと反復を行う - 改善のために、生成結果を共有するようユーザーに促します

参考資料を確認するタイミング

  • 特定のカテゴリー:ポートレートや風景などについて、prompt-library.md の該当セクションを読みます
  • キーワードの提案:包括的なリストについては、keywords-reference.md を参照します
  • プラットフォームの詳細:高度なパラメーターについては、platform-specific.md を確認します
  • 複雑なリクエスト:十分なガイダンスを提供するため、関連する参考資料を読み込みます

コメント