Procedure
- Finalize the image generation prompt from the user's request
- For multimodal instructions (when there is an input image such as a frame image),
--imageadd the argument - Run the following command
Text only:
python .claude/skills/nano-banana-image-gen/scripts/nano_banana_gen.py "プロンプトテキスト"
Image + text:
python .claude/skills/nano-banana-image-gen/scripts/nano_banana_gen.py "プロンプトテキスト" --image "画像パス"
Multiple images + text:
python .claude/skills/nano-banana-image-gen/scripts/nano_banana_gen.py "プロンプトテキスト" --image "画像1" --image "画像2"
- Check the output path and report it to the user
Settings
Project root's .env Set the following environment variables in:
GEMINI_API_KEY=your_api_key_here
GENERATED_IMAGE_OUTPUT_PATH=images/generated
Security: .env If placing in the project root,settings.json の denyRead に .env add and configure so that AI cannot read it.
// .claude/settings.json
{
"permissions": {
"deny": ["Read(.env)", "Read(.env.*)"]
}
}
| Variable name | Description |
|---|---|
GEMINI_API_KEY |
Google Gemini API key (required) |
GENERATED_IMAGE_OUTPUT_PATH |
Output directory (default: images/generated) |
Output
- File name:
YYYYMMDD_HHMMSS.png - Save location: Project root's
images/generated/
Dependency package check
For initial errors, install with the following:
pip install google-genai pillow python-dotenv