build-until-pass
Use when a build, typecheck, lint, or test command is failing and you want the agent to drive it to green on its own — run the…
Generate or edit images with Google's Nano Banana 2 (`gemini-3.1-flash-image-preview`). Use when the user asks to generate an image, edit an image, or create a picture. Supports 512 / 1K / 2K / 4K resolutions.
$ npx -y skills add lichamnesia/lich-skills --skill nano-banana --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/nano-bananaContext preview
The summary Claude sees to decide when to auto-load this skill.
Generate or edit images with Google's Nano Banana 2 (`gemini-3.1-flash-image-preview`). Use when the user asks to generate an image, edit an image, or create a picture. Supports 512 / 1K / 2K / 4K resolutions.
name: nano-banana description: Generate or edit images with Google's Nano Banana 2 (`gemini-3.1-flash-image-preview`). Use when the user asks to generate an image, edit an image, or create a picture. Supports 512 / 1K / 2K / 4K resolutions.
Text-to-image and image edit via Google's **Nano Banana 2** model, aka `gemini-3.1-flash-image-preview`. Fast, cheap, high-quality. Returns PNG.
1. Get a Gemini API key: https://aistudio.google.com/app/apikey 2. Export it:
export GEMINI_API_KEY="YOUR_KEY_HERE" # or export GOOGLE_API_KEY="YOUR_KEY_HERE"
3. Install `uv` if missing:
command -v uv || curl -LsSf https://astral.sh/uv/install.sh | sh
First run auto-installs `google-genai` and `pillow` via `uv`'s inline script deps.
uv run ~/.claude/skills/lich-skills/skills/nano-banana/scripts/generate_image.py \
--prompt "A cinematic rainy Tokyo alley, neon reflections, 35mm, low angle" \
--filename "tokyo-alley.png" \
--resolution 1KOutput is saved to `tokyo-alley.png` in the current directory unless the filename is absolute.
Pass an input image with `--input-image`. The model sees the image + your instruction.
uv run .../generate_image.py \
--prompt "Remove the crowd behind the subject. Keep framing and grading unchanged." \
--filename "cleaned.png" \
--input-image "./portrait.png" \
--resolution 2KWhen editing, the script auto-matches output resolution to the input's dimensions unless you explicitly pass `--resolution`.
| Flag | Default | Purpose | |------|---------|---------| | `--prompt`, `-p` | required | Image description or edit instruction | | `--filename`, `-f` | required | Output path (PNG) | | `--input-image`, `-i` | — | Source image for editing | | `--resolution`, `-r` | `1K` | One of `512`, `1K`, `2K`, `4K` | | `--api-key`, `-k` | env | Overrides `GEMINI_API_KEY` / `GOOGLE_API_KEY` | | `--model`, `-m` | `gemini-3.1-flash-image-preview` | Rarely needed |
Map loose user language to a resolution flag:
| User says | Use | |-----------|-----| | (nothing) | `1K` | | "small", "thumbnail", "quick draft" | `512` | | "normal", "medium" | `1K` | | "high quality", "large" | `2K` | | "4k", "print", "wallpaper" | `4K` |
Subject: <subject>. Style: <photo | illustration | 3D | painting | pixel art | ...>. Composition: <shot type, angle>. Lighting: <lighting description>. Background: <background>. Avoid: <what should NOT be in the image>.
Change only: <the specific edit>. Keep subject, framing, lighting, palette, text, and overall style unchanged.
Being explicit about what to keep is the difference between a clean edit and a total re-render.
command -v uv test -n "$GEMINI_API_KEY" || test -n "$GOOGLE_API_KEY" # If editing: test -f ./input.png
| Error | Fix | |------|-----| | `Error: No API key provided.` | Export `GEMINI_API_KEY` or pass `--api-key` | | `Error loading input image:` | Bad path or unreadable file | | `Error: No image was generated in the response.` | Prompt too vague or unsafe — rewrite | | `403` / `quota` | Wrong key, region-locked, or over quota |
Personal skill collection for Claude Code, Gemini CLI, and OpenAI Codex — by @LichAmnesia. Telegraph-style, opinionated, no filler. Engineering judgment skills plus high-leverage utility tools. 中文版:README-zh.md
Use when a build, typecheck, lint, or test command is failing and you want the agent to drive it to green on its own — run the…
Use when debugging any non-trivial bug — wrong output, crash, flaky test, performance regression, or "it works locally but not in…
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web…
Use BEFORE any spec, plan, or code exists — the Stage 0 gate that decides whether a project should start at all. NO-GO is the…
Analyze Google Analytics 4 data — review website performance, identify traffic patterns, diagnose high-bounce pages, compare time…
Use at the START of any task, or whenever you are unsure which lich-skill applies. The router for this collection — it maps every…