Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Generate and edit images with Gemini API using pure Python stdlib. Zero dependencies - works on locked-down environments where pip/uv aren't available.
.claude/skills/sundial-org-gemini-image-simple/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-03 | ✗→✓ | ▲ Improved | 262% | 0% |
| case-08 | ✗→✓ | ▲ Improved | -29% | 0% |
| case-11 | ✗→✓ | ▲ Improved | -41% | 0% |
| case-14 | ✗→✓ | ▲ Improved | -18% | 0% |
| case-15 | ✗→✓ | ▲ Improved | -2% | 0% |
Generate and edit images using Google's Gemini 2.0 Flash image generation API.
| Feature | This Skill | Others (nano-banana-pro, etc.) | |---------|------------|-------------------------------| | Dependencies | None (stdlib only) | google-genai, pillow, etc. | | Requires pip/uv | ❌ No | ✅ Yes | | Works on Fly.io free | ✅ Yes | ❌ Fails | | Works in containers | ✅ Yes | ❌ Often fails | | Image generation | ✅ Full | ✅ Full | | Image editing | ✅ Yes | ✅ Yes | | Setup complexity | Just set API key | Install packages first |
Bottom line: This skill works anywhere Python 3 exists. No package managers, no virtual environments, no permission issues.
bash# Generate python3 /data/clawd/skills/gemini-image-simple/scripts/generate.py "A cat wearing a tiny hat" cat.png # Edit existing image python3 /data/clawd/skills/gemini-image-simple/scripts/generate.py "Make it sunset lighting" edited.png --input original.png
bashpython3 {baseDir}/scripts/generate.py "your prompt" output.png
bashpython3 {baseDir}/scripts/generate.py "edit instructions" output.png --input source.png
Supported input formats: PNG, JPG, JPEG, GIF, WEBP
Set GEMINI_API_KEY environment variable. Get one at https://aistudio.google.com/apikey
Uses Gemini 2.0 Flash experimental image generation:
urllib.request for HTTP (no requests library)json for parsing (stdlib)base64 for encoding (stdlib)That's it. No external packages. Works on any Python 3.10+ installation.
bash# Landscape python3 {baseDir}/scripts/generate.py "Misty mountains at sunrise, photorealistic" mountains.png # Product shot python3 {baseDir}/scripts/generate.py "Minimalist product photo of a coffee cup, white background" coffee.png # Edit: change style python3 {baseDir}/scripts/generate.py "Convert to watercolor painting style" watercolor.png --input photo.jpg # Edit: add element python3 {baseDir}/scripts/generate.py "Add a rainbow in the sky" rainbow.png --input landscape.png
Other measured skills in the registry, with their headline benchmark lift.