agentleFS
hukusuke1007hukusuke1007/agent-skills/nano-banana-image-gen/SKILL.md

nano-banana-image-gen

Skill8 starsChanged 7 months agoMITView on GitHub

Nano Banana 2(Google Gemini gemini-3.1-flash-image-preview)を使って画像を生成するスキル。「画像を生成して」「〇〇のイラストを作って」「Nano Bananaで画像を作って」「グラレコ風の画像を生成して」などのリクエストで使用する。プロンプトを受け取りpythonスクリプトを実行、タイムスタンプ付きPNGを images/generated/ に出力する。

  • Reads credentials
  • Installs packages

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Files
SKILL.md

Nano Banana 画像生成

実行手順

  1. ユーザーのリクエストから画像生成プロンプトを確定する
  2. マルチモーダル指示(フレーム画像など入力画像あり)の場合は --image 引数を付ける
  3. 以下のコマンドを実行する

テキストのみ:

python .claude/skills/nano-banana-image-gen/scripts/nano_banana_gen.py "プロンプトテキスト"

画像+テキスト:

python .claude/skills/nano-banana-image-gen/scripts/nano_banana_gen.py "プロンプトテキスト" --image "画像パス"

画像複数+テキスト:

python .claude/skills/nano-banana-image-gen/scripts/nano_banana_gen.py "プロンプトテキスト" --image "画像1" --image "画像2"
  1. 出力パスを確認してユーザーに報告する

設定

プロジェクトルートの .env に以下の環境変数を設定する:

GEMINI_API_KEY=your_api_key_here
GENERATED_IMAGE_OUTPUT_PATH=images/generated

セキュリティ: .env をプロジェクトルートに置く場合は、settings.json の denyRead に .env を追加してAIが読み込めないよう設定すること。

// .claude/settings.json
{
  "permissions": {
    "deny": ["Read(.env)", "Read(.env.*)"]
  }
}
変数名説明
GEMINI_API_KEYGoogle Gemini APIキー(必須)
GENERATED_IMAGE_OUTPUT_PATH出力先ディレクトリ(デフォルト: images/generated)

出力

  • ファイル名: YYYYMMDD_HHMMSS.png
  • 保存先: プロジェクトルートの images/generated/

依存パッケージ確認

初回エラー時は以下でインストール:

pip install google-genai pillow python-dotenv

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.