nano-banana/SKILL.md
Generate and edit images using Google's Gemini image generation models (Nano Banana family). Supports style presets, platform-specific sizing (YouTube/slides/blog), variants, image editing via inlineData, reference images for style transfer, and organized output with metadata. Default model is Nano Banana 2 (gemini-3.1-flash-image-preview). Key is auto-decrypted via SOPS.
npx skillsauth add glebis/claude-skills nano-bananaInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Generate and edit images from text prompts via Google's Gemini image generation API.
scripts/nano_banana.py init
Wizard checks dependencies (sops, age, magick), verifies the API key, and saves defaults to ~/.config/nano-banana/config.yaml.
# Simple generation
scripts/nano_banana.py "a minimalist illustration of a rocket" ./rocket.png
# With style preset
scripts/nano_banana.py --preset editorial "interconnected nodes" ./nodes.png
# YouTube thumbnail (auto-cropped to 1280x720)
scripts/nano_banana.py --preset grain --platform youtube "coffee on desk" ./thumb.png
# Generate 4 variants + contact sheet
scripts/nano_banana.py --preset wireframe "a crystal" ./crystal.png --n 4
# Edit existing image
scripts/nano_banana.py --edit ./old.png "make the background deep teal" ./new.png
# Style reference (match aesthetic of existing image)
scripts/nano_banana.py --reference ./style.png "a new mountain landscape" ./mountain.png
# Re-roll last prompt
scripts/nano_banana.py again
# View history
scripts/nano_banana.py history -n 10
GEMINI_API_KEY — auto-decrypted from secrets.enc.yaml via SOPS + age. Fallback: export GEMINI_API_KEY=...sops, age — for key decryptionmagick (ImageMagick) — for platform fit + contact sheetspython3 with pyyaml| Model | Alias | Nano Banana Name | Use When |
|-------|-------|-----------------|----------|
| gemini-3.1-flash-image-preview (default) | flash | Nano Banana 2 | Best instruction following, fast |
| gemini-3-pro-image-preview | pro | Nano Banana Pro | Highest quality, text in images |
| gemini-2.5-flash-image | flash-2.5 | Nano Banana (original) | Legacy |
Use via --model flash|pro|flash-2.5 or full ID.
scripts/nano_banana.py list-presets
scripts/nano_banana.py --preset editorial "your subject" out.png
| Preset | Style |
|--------|-------|
| editorial | Thin lines on black, muted palette, technical diagram feel |
| blueprint | White/cyan lines on dark navy, engineering drawing |
| ink | Japanese sumi-e ink wash, organic brushstrokes, monochrome |
| risograph | Flat colors, grain, terracotta + sage, zine aesthetic |
| wireframe | 3D wireframe mesh, glowing edges on black |
| constellation | Star map dots connected by faint lines, celestial |
| brutalist | Bold shapes, thick borders, hard shadows, flat colors |
| grain | Film grain photo, high ISO, warm cinematic tones |
Defined in presets.yaml — edit to add your own.
scripts/nano_banana.py list-platforms
scripts/nano_banana.py --platform youtube "your subject" out.png
Generated image is automatically resized + center-cropped to target dimensions.
| Platform | Size |
|----------|------|
| youtube | 1280×720 |
| youtube-short | 1080×1920 |
| slides | 1920×1080 |
| blog | 1200×630 |
| x | 1600×900 |
| square | 1080×1080 |
| story | 1080×1920 |
| pinterest | 1000×1500 |
--n N generates N variants in parallel and assembles them into a contact sheet:
scripts/nano_banana.py --preset ink "mountain" ./mt.png --n 6
# Creates mt-01.png ... mt-06.png + mt-contact.png
When each output needs different text or a different prompt (e.g. a set of ads sharing one style), loop over a list. --n won't help here — it re-rolls the same prompt. Use a shared $STYLE string + a per-item array.
cd /abs/output/dir
REF="_reference.png" # optional style anchor
STYLE="<shared visual-style description, written once>"
# Each entry: pipe-delimited fields + output filename. NAME the array — see gotchas.
ADS=(
"CALL NOW|FOR TOTAL|CONFIDENTIALITY|ad-callnow.png"
"REDACT|BEFORE|YOU SEND|ad-redact.png"
)
for entry in "${ADS[@]}"; do
IFS='|' read -r L1 L2 L3 OUT <<< "$entry"
python3 scripts/nano_banana.py \
"$STYLE The exact text reads, on three centered lines: '$L1' / '$L2' / '$L3'. Spell every word correctly." \
"$OUT" --reference "$REF" --platform youtube --model pro --no-metadata --project NAME
done
Shell gotchas (this is zsh on macOS — these bite every time):
LINES, COLUMNS, PATH, path, status, argv, etc. — zsh reserves them. LINES=(...) fails with can't assign array value to non-array special. Use ADS, ITEMS, JOBS.CMD="magick montage"; $CMD ... looks for a single command literally named "magick montage". Don't stuff multi-word commands in a var — call the command directly, or use an array (cmd=(magick montage); "${cmd[@]}")."$OUT", "${ADS[@]}" — paths and prompts contain spaces.'single quotes' for the exact text you want rendered, inside the double-quoted prompt, so the model reproduces it verbatim.& per iteration and wait at the end — but cap concurrency (the API rate-limits); sequential is safest for >6 items.After a batch, assemble a review sheet by calling the tool directly (no var indirection): magick montage ad-*.png -tile 2x3 -geometry 480x270+6+6 -background black _contact.png.
Pass an existing image and the prompt becomes the edit instruction:
scripts/nano_banana.py --edit ./thumb.png "remove the watermark, warmer colors" ./clean.png
Use one or more reference images to guide the aesthetic without editing them:
scripts/nano_banana.py --reference ./episode1.png --reference ./episode2.png \
"episode 3: data drift" ./ep3.png
Organize outputs by project:
scripts/nano_banana.py --project lab-04/meeting-02 --preset editorial "MCP loops" ./overlay.png
# Saves to ~/nano-banana/outputs/lab-04/meeting-02/20260414-<subject>.png + .json sidecar
scripts/nano_banana.py again # rerun last prompt
scripts/nano_banana.py history -n 20 # show last 20 generations
scripts/nano_banana.py history --project lab-04
Preview the composed prompt without calling the API:
scripts/nano_banana.py --preset editorial --platform youtube "subject" --dry-run
The API occasionally returns 500/INTERNAL or empty candidates. The script retries up to 4 times with exponential backoff (2s, 4s, 8s, 16s). Permanent errors (4xx, safety violations) fail fast without retry.
--model pro and quote exact text: 'with the text "Hello"'See references/api_reference.md for full API documentation.
scripts/nano_banana.py — main CLI (Python)scripts/generate_image.sh — thin bash wrapper (back-compat)presets.yaml — style presetsplatforms.yaml — platform sizing presetssecrets.enc.yaml — encrypted API key (SOPS + age)~/.config/nano-banana/config.yaml — user defaults (from init)~/.config/nano-banana/history.jsonl — generation log~/.config/nano-banana/last.json — last run (for again)development
--- name: agency-docs-updater description: End-to-end pipeline for publishing Claude Code lab meetings. Accepts optional args: date (YYYYMMDD, "yesterday", "today") and lab number (e.g. "04"). Examples: "yesterday 04", "20260420 05", "04" (today, lab 04), "" (today, auto-detect lab). --- # Agency Docs Updater Execute ALL steps automatically in sequence. Only pause if a step fails and cannot be recovered. Read `references/learnings.md` before starting for known pitfalls. **Configuration**: pat
tools
This skill should be used when applying proper typography to prose text or files in Russian, English, German, or French — smart quotes per locale («ёлочки», “curly”, „Gänsefüßchen“, « guillemets »), correct dashes (тире, em/en dash, Gedankenstrich, tiret), non-breaking spaces, ranges, ellipsis, and French espaces insécables before ! ? ; :. Fully deterministic via a pinned typograf-based CLI; never apply these rules by hand. Triggers on "типографика", "typograf", "оттипографь", "smart quotes", "fix typography", "неразрывные пробелы".
development
This skill should be used when inspecting or applying advanced OpenType features of a font (woff2/otf/ttf) — ligatures, stylistic sets (ss01–ss20), character variants (cvXX), texture healing, slashed zero, tabular/oldstyle figures, fractions, small caps, case-sensitive forms — and generating the CSS to enable them. Interviews the user via cenno to pick features. Triggers on "OpenType features", "font features", "stylistic sets", "ligatures", "texture healing", "tabular figures", "what can this font do".
tools
--- name: pre-session-portrait description: Build a compressed, visualizable "portrait" of a consulting/coaching client before a session, so the paid hour is spent solving, not scoping. Runs a 7-lens JTBD-inspired interview (where / how / what / problem / ideal / tension / jobs-to-be-done) that takes rich open answers in and compresses them to an 11-field YAML portrait out. Delivers three ways: raw paste-into-a-clean-chat prompt, a secret GitHub gist link, or a Codex CLI one-liner. Use when prep