nano-banana-use
Original:🇺🇸 English
Translated
3 scriptsChecked / no sensitive code detected
Generate, edit, and compose images using Gemini Nano Banana models via portable Python scripts. Handles authentication via API Key or Vertex AI environment variables. Available parameters: prompt, model, aspect-ratio, safety-filter-level. Always confirm parameters with the user or explicitly state defaults before running.
3installs
Added on
NPX Install
npx skill4agent add cnemri/google-genai-skills nano-banana-useTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Nano Banana Use
Use this skill to generate, edit, and compose images using Gemini's Nano Banana models ( and ).
gemini-2.5-flash-imagegemini-3-pro-image-previewThis skill uses portable Python scripts managed by .
uvPrerequisites
Ensure you have one of the following authentication methods configured in your environment:
-
API Key:
- or
GOOGLE_API_KEYGEMINI_API_KEY
-
Vertex AI:
GOOGLE_CLOUD_PROJECTGOOGLE_CLOUD_LOCATIONGOOGLE_GENAI_USE_VERTEXAI=1
Usage
Generate an Image
Step 1: Confirm Parameters
Before running the script, confirm the following parameters with the user or state the defaults you will use:
- Prompt: The image description.
- Model: Default is .
gemini-3-pro-image-preview - Aspect Ratio: Default is .
1:1 - Safety Filter: Default is .
BLOCK_MEDIUM_AND_ABOVE
Step 2: Run the Script
Run the python script using :
uvbash
uv run skills/nano-banana-use/scripts/generate_image.py "A futuristic banana city" --output city.pngEdit an Image
Modify an existing image based on a text prompt.
bash
uv run skills/nano-banana-use/scripts/edit_image.py original.png "Make the sky purple" --output edited.pngCompose Images
Generate a new image based on multiple input images and a prompt.
bash
uv run skills/nano-banana-use/scripts/compose_image.py --image style.png --image subject.jpg "A painting of the subject in the style of the first image" --output composition.pngOptions
- : The text description of the image.
prompt - : The model to use. Defaults to
--model.gemini-3-pro-image-preview - : The filename for the saved image. Defaults to
--output.generated_image.png - : The aspect ratio of the generated image. Defaults to
--aspect-ratio. Supported:1:1,1:1,16:9,4:3,3:4.9:16 - : Safety filter threshold. Defaults to
--safety-filter-level.BLOCK_MEDIUM_AND_ABOVE