Gemini Image
tyrchen/geektime-bootcamp-ai
Reference guide for using google-genai Python library to generate images with gemini-3-pro-image-preview model.
This skill should be used for Python scripting and Gemini image generation.
$ npx skills add NikiforovAll/claude-code-rules --skill nano-banana -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install NikiforovAll/claude-code-rules nano-banana --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/NikiforovAll/claude-code-rules.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/handbook-nano-banana/skills/nano-banana .claude/skills/nano-banana && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "nano-banana" agent skill from https://github.com/NikiforovAll/claude-code-rules/tree/main/plugins/handbook-nano-banana/skills/nano-banana into .claude/skills/nano-banana/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "nano-banana", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/NikiforovAll/claude-code-rules/tree/main/plugins/handbook-nano-banana/skills/nano-bananaType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add NikiforovAll/claude-code-rules --skill nano-banana -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install NikiforovAll/claude-code-rules nano-banana --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/NikiforovAll/claude-code-rules.git skills-src && mkdir -p .agents/skills && cp -r skills-src/plugins/handbook-nano-banana/skills/nano-banana .agents/skills/nano-banana && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "nano-banana" agent skill from https://github.com/NikiforovAll/claude-code-rules/tree/main/plugins/handbook-nano-banana/skills/nano-banana into .agents/skills/nano-banana/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "nano-banana", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add NikiforovAll/claude-code-rules --skill nano-banana -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install NikiforovAll/claude-code-rules nano-banana --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/NikiforovAll/claude-code-rules.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/plugins/handbook-nano-banana/skills/nano-banana .cursor/skills/nano-banana && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "nano-banana" agent skill from https://github.com/NikiforovAll/claude-code-rules/tree/main/plugins/handbook-nano-banana/skills/nano-banana into .cursor/skills/nano-banana/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "nano-banana", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/NikiforovAll/claude-code-rules.git --path plugins/handbook-nano-banana/skills/nano-banana--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add NikiforovAll/claude-code-rules --skill nano-banana -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install NikiforovAll/claude-code-rules nano-banana --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/NikiforovAll/claude-code-rules.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/plugins/handbook-nano-banana/skills/nano-banana .gemini/skills/nano-banana && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "nano-banana" agent skill from https://github.com/NikiforovAll/claude-code-rules/tree/main/plugins/handbook-nano-banana/skills/nano-banana into .gemini/skills/nano-banana/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "nano-banana", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install NikiforovAll/claude-code-rules nano-bananaInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add NikiforovAll/claude-code-rules --skill nano-banana -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/NikiforovAll/claude-code-rules.git skills-src && mkdir -p .github/skills && cp -r skills-src/plugins/handbook-nano-banana/skills/nano-banana .github/skills/nano-banana && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "nano-banana" agent skill from https://github.com/NikiforovAll/claude-code-rules/tree/main/plugins/handbook-nano-banana/skills/nano-banana into .github/skills/nano-banana/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "nano-banana", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add NikiforovAll/claude-code-rules --skill nano-banana -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install NikiforovAll/claude-code-rules nano-banana --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/NikiforovAll/claude-code-rules.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/plugins/handbook-nano-banana/skills/nano-banana .opencode/skills/nano-banana && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "nano-banana" agent skill from https://github.com/NikiforovAll/claude-code-rules/tree/main/plugins/handbook-nano-banana/skills/nano-banana into .opencode/skills/nano-banana/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "nano-banana", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
nano-bananaThis skill should be used for Python scripting and Gemini image generation.
Nano Banana is an agent skill from NikiforovAll/claude-code-rules. This skill should be used for Python scripting and Gemini image generation. Use when users ask to generate images, create AI art, edit images with AI, or run Python scripts with uv. Trigger phrases include "generate an image", "create a picture", "draw", "make an image of", "nano banana", or any image generation request.
Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/guide.md`).
It sits in Media & Creative, covering Image generation. It works with Google Gemini and Python. The repository describes itself as: Learn practical techniques to enhance your AI-assisted development workflow with Claude Code. The licence is Apache-2.0.
4 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 281c063. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
uvFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use uv, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names these keys or tokens, usually read from environment variables:
GOOGLE_API_KEYFrom names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Nano Banana loads about 1.4k tokens when it runs, and up to ~3.1k if it reads all its reference files. Until then it costs about 84 tokens; SKILL.md has 417 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from NikiforovAll/claude-code-rules at commit 281c063, republished under its Apache-2.0 licence (© NikiforovAll). 417 words, ~1,417 tokens.
.claude/skills/nano-banana/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.Python scripting with Gemini image generation using uv. Write small, focused scripts using heredocs for quick tasks—no files needed for one-off operations.
Quick image generation: Use heredoc with inline Python for one-off image requests.
Complex workflows: When multiple steps are needed (generate -> refine -> save), break into separate scripts and iterate.
Scripting tasks: For non-image Python tasks, use the same heredoc pattern with uv run.
Execute Python inline using heredocs with inline script metadata for dependencies:
uv run - << 'EOF'
# /// script
# dependencies = ["google-genai", "pillow"]
# ///
from google import genai
from google.genai import types
client = genai.Client()
response = client.models.generate_content(
model="gemini-3-pro-image-preview",
contents=["A cute banana character with sunglasses"],
config=types.GenerateContentConfig(
response_modalities=['IMAGE']
)
)
for part in response.parts:
if part.inline_data is not None:
image = part.as_image()
image.save("tmp/generated.png")
print("Image saved to tmp/generated.png")
EOFThe # /// script block declares dependencies inline using TOML syntax. This makes scripts self-contained and reproducible.
Why these dependencies:
google-genai - Gemini API clientpillow - Required for .as_image() method (converts base64 to PIL Image) and saving imagesOnly write to files when:
uv run - << 'EOF'
# /// script
# dependencies = ["google-genai", "pillow"]
# ///
from google import genai
from google.genai import types
client = genai.Client()
# Generate image
response = client.models.generate_content(
model="gemini-3-pro-image-preview",
contents=["YOUR PROMPT HERE"],
config=types.GenerateContentConfig(
response_modalities=['IMAGE']
)
)
# Save result
for part in response.parts:
if part.text is not None:
print(part.text)
elif part.inline_data is not None:
image = part.as_image()
image.save("tmp/output.png")
print("Saved: tmp/output.png")
EOFFollow this pattern for complex tasks:
Configure aspect ratio and resolution:
config=types.GenerateContentConfig(
response_modalities=['IMAGE'],
image_config=types.ImageConfig(
aspect_ratio="16:9", # "1:1", "16:9", "9:16", "4:3", "3:4"
image_size="2K" # "1K", "2K", "4K" (uppercase required)
)
)gemini-3-pro-image-preview - Fast, general purpose image generationgemini-3-pro-image-preview - Advanced, professional asset production (Nano Banana Pro)Default to gemini-3-pro-image-preview (Nano Banana Pro) for all image generation unless:
Nano Banana Pro provides higher quality results and should be the recommended choice.
To receive both text explanation and image:
config=types.GenerateContentConfig(
response_modalities=['TEXT', 'IMAGE']
)Edit existing images by including them in the request:
uv run - << 'EOF'
# /// script
# dependencies = ["google-genai", "pillow"]
# ///
from google import genai
from google.genai import types
from PIL import Image
client = genai.Client()
# Load existing image
img = Image.open("input.png")
response = client.models.generate_content(
model="gemini-3-pro-image-preview",
contents=[
"Add a party hat to this character",
img
],
config=types.GenerateContentConfig(
response_modalities=['IMAGE']
)
)
for part in response.parts:
if part.inline_data is not None:
part.as_image().save("tmp/edited.png")
print("Saved: tmp/edited.png")
EOFIf a script fails:
For complex workflows including thinking process, Google Search grounding, multi-turn conversations, and professional asset production, load references/guide.md.
© NikiforovAll, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 1 other file (references) in plugins/handbook-nano-banana/skills/nano-banana of NikiforovAll/claude-code-rules.
Open the folder on GitHubat commit 281c063
Nano Banana next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Nano Banana this skillNikiforovAll/claude-code-rules | 141 | — | ~1.4k | Automated safety check: Pass | Apache-2.0 | |
| Gemini Imagetyrchen/geektime-bootcamp-ai | 236 | — | ~1.1k | Automated safety check: Pass | None | |
| Gemini Interactions APIAyuilos/Miffan | 225 | — | ~4.6k | Automated safety check: Pass | AGPL-3.0 | |
| Gflow CLIffroliva/gflow-cli | 278 | — | ~4.8k | Automated safety check: Notes | MIT | |
| Nanobananakenneth-liao/ai-launchpad-marketplace | 126 | — | ~4k | Automated safety check: Notes | None | |
| Nano Banana Usecnemri/google-genai-skills | 127 | — | ~587 | Automated safety check: Pass | MIT |
tyrchen/geektime-bootcamp-ai
Reference guide for using google-genai Python library to generate images with gemini-3-pro-image-preview model.
Ayuilos/Miffan
A skill your agent uses when writing code that calls the Gemini API for text generation, multi-turn chat, multimodal understanding, image generation, video generation, streaming responses…
ffroliva/gflow-cli
A skill your agent uses when the user wants to drive Google Flow (Veo image-to-video, Veo text-to-video, Imagen / Nano Banana image generation) from the terminal or a script — including…
kenneth-liao/ai-launchpad-marketplace
AI image generation and editing using Google Gemini models. An agent skill from kenneth-liao/ai-launchpad-marketplace.
cnemri/google-genai-skills
Generate, edit, and compose images using Gemini Nano Banana models via portable Python scripts.
feiskyer/claude-code-settings
Generate or edit images via Google Gemini (nanobanana). An agent skill from feiskyer/claude-code-settings.
NikiforovAll/claude-code-rules
Summarize WHAT WAS SHIPPED in a Claude Code session as a self-contained HTML slide deck — the elevator pitch (problem, solution, decisions, artifacts, verification, gaps), not a play-by-play of tool…
NikiforovAll/claude-code-rules
Run dotnet format to fix code style and analyzer diagnostics (IDE0005, CA, SA).
NikiforovAll/claude-code-rules
Understand implementation details of .NET code by decompiling assemblies.
NikiforovAll/claude-code-rules
Visualize a Claude Code session as a quest/skill tree — a navigable SVG graph where nodes are turns and edges show flow, with distinct visual encoding for normal flow, dead-ends, corrections…
NikiforovAll/claude-code-rules
This skill should be used when planning and tracking complex feature implementations that require systematic task decomposition.
NikiforovAll/claude-code-rules
Expert guidance for using the GitLab CLI (glab) to manage GitLab issues, merge requests, CI/CD pipelines, repositories, and other GitLab operations from the command line.
Works with
Categories
This skill should be used for Python scripting and Gemini image generation. Nano Banana is an agent skill from NikiforovAll/claude-code-rules. This skill should be used for Python scripting and Gemini image generation.
Nano Banana fits situations like: users ask to generate images; edit images with AI; run Python scripts with uv; phrases include generate an image.
Run `npx skills add NikiforovAll/claude-code-rules --skill nano-banana -a claude-code`. Or copy the skill folder (plugins/handbook-nano-banana/skills/nano-banana in NikiforovAll/claude-code-rules) into .claude/skills/nano-banana in your project. Claude Code loads it when a task matches its description.
Run `npx skills add NikiforovAll/claude-code-rules --skill nano-banana -a codex`. Or copy the skill folder (plugins/handbook-nano-banana/skills/nano-banana in NikiforovAll/claude-code-rules) into .agents/skills/nano-banana in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add NikiforovAll/claude-code-rules --skill nano-banana -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/nano-banana, .gemini/skills/nano-banana, .github/skills/nano-banana and .opencode/skills/nano-banana in your project.
Going by SKILL.md and its folder, Nano Banana needs the command-line tools its instructions call (uv) and credentials named GOOGLE_API_KEY. Our summary lists: Python 3; A credential in GOOGLE_API_KEY.
SKILL.md contains no URLs. Its commands use uv, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Nano Banana is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.4k tokens (SKILL.md is roughly 5.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.7k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Nano Banana: Gemini Image (tyrchen/geektime-bootcamp-ai, 236 stars), Gemini Interactions API (Ayuilos/Miffan, 225 stars), Gflow CLI (ffroliva/gflow-cli, 278 stars) and Nanobanana (kenneth-liao/ai-launchpad-marketplace, 126 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
NikiforovAll (a GitHub user) maintains it in NikiforovAll/claude-code-rules, which has 141 GitHub stars. The repository holds 26 skills in this directory. The repository was last updated on October 2, 2026.
Source: NikiforovAll/claude-code-rules on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.