Skip to content
Back to skills

Gemini Image Simple

ASecurity

Generate and edit images with Gemini API using pure Python stdlib. Zero dependencies - works on locked-down environments where pip/uv aren't available.

  • 651 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added February 10, 2026
developmentpythongobashapi

Works with

  • api

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned February 10, 2026

npx -y skills add sundial-org/awesome-openclaw-skills --skill gemini-image-simple --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Gemini Image Simple?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Gemini Image Simple
[![Security: A β€” Skills Directory](https://www.skillsdirectory.com/api/skills/sundial-org-gemini-image-simple/badge)](https://www.skillsdirectory.com/skills/sundial-org-gemini-image-simple)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: gemini-image-simple
version: 1.0.0
description: Generate and edit images with Gemini API using pure Python stdlib. Zero dependencies - works on locked-down environments where pip/uv aren't available.
metadata:
  openclaw:
    emoji: "🎨"
    requires:
      env: ["GEMINI_API_KEY"]
---

# Gemini Image Simple

Generate and edit images using Google's Gemini 2.0 Flash image generation API.

## Why This Skill

| 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.

## Quick Start

```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
```

## Usage

### Generate new image

```bash
python3 {baseDir}/scripts/generate.py "your prompt" output.png
```

### Edit existing image

```bash
python3 {baseDir}/scripts/generate.py "edit instructions" output.png --input source.png
```

Supported input formats: PNG, JPG, JPEG, GIF, WEBP

## Environment

Set `GEMINI_API_KEY` environment variable. Get one at https://aistudio.google.com/apikey

## How It Works

Uses Gemini 2.0 Flash experimental image generation:
- Pure `urllib.request` for HTTP (no requests library)
- Pure `json` for parsing (stdlib)
- Pure `base64` for encoding (stdlib)

That's it. No external packages. Works on any Python 3.10+ installation.

## Examples

```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
```

Files in this skill

  • SKILL.md2.5 KB
  • scripts/generate.py4.5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…