gemini-image-gen

Generate and edit images via Google Gemini API. Supports Gemini native generation, Imagen 3, style presets, and batch generation with HTML gallery. Zero dependencies — pure Python stdlib.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "gemini-image-gen" with this command: npx skills add iisweetheartii/gemini-image-gen

Gemini Image Gen

Generate and edit images via the Google Gemini API using pure Python stdlib. Supports Gemini native generation + editing, Imagen 3 generation, batch runs, and an HTML gallery output.

Quick Start

export GEMINI_API_KEY="your-key-here"

# Default: Gemini native, 4 random prompts
python3 scripts/gen.py

# Custom prompt
python3 scripts/gen.py --prompt "a cyberpunk cat riding a neon motorcycle through Tokyo at night"

# Imagen 3 engine
python3 scripts/gen.py --engine imagen --count 4 --aspect 16:9

# Edit an existing image (Gemini engine only)
python3 scripts/gen.py --edit path/to/image.png --prompt "change the background to a sunset beach"

# Use a style preset
python3 scripts/gen.py --style watercolor --prompt "floating islands above a calm sea"

# List available styles
python3 scripts/gen.py --styles

Style Presets

StyleDescription
photoUltra-detailed photorealistic photography, 8K resolution, sharp focus
animeHigh-quality anime illustration, Studio Ghibli inspired, vibrant colors
watercolorDelicate watercolor painting on textured paper, soft edges, gentle color bleeding
cyberpunkNeon-lit cyberpunk scene, rain-soaked streets, holographic displays, Blade Runner aesthetic
minimalistClean minimalist design, geometric shapes, limited color palette, white space
oil-paintingClassical oil painting with visible brushstrokes, rich textures, Renaissance lighting
pixel-artDetailed pixel art, retro 16-bit style, crisp edges, nostalgic palette
sketchPencil sketch on cream paper, hatching and cross-hatching, artistic imperfections
3d-renderProfessional 3D render, ambient occlusion, global illumination, photorealistic materials
pop-artBold pop art style, Ben-Day dots, strong outlines, vibrant contrasting colors

Full CLI Reference

FlagDefaultDescription
--prompt(random)Text prompt. Omit for random creative prompts
--count4Number of images to generate
--enginegeminiEngine: gemini (native, supports edit) or imagen (Imagen 3)
--model(auto)Model override. Default: gemini-2.5-flash-image or imagen-3.0-generate-002
--editPath to input image for editing (Gemini engine only)
--aspect1:1Aspect ratio for Imagen: 1:1, 16:9, 9:16, 4:3, 3:4
--out-dir(auto)Output directory (default is a timestamped folder)
--styleStyle preset to prepend to the prompt
--stylesList available style presets and exit

Python Example

import subprocess

subprocess.run(
    [
        "python3",
        "scripts/gen.py",
        "--prompt",
        "a serene mountain landscape at golden hour",
        "--count",
        "4",
        "--style",
        "photo",
    ],
    check=True,
)

Troubleshooting

  • Missing API key: set GEMINI_API_KEY in your environment and retry.
  • Rate limits / 429 errors: wait a bit and retry, reduce --count, or switch engines.
  • Model errors: verify the model name, try the default model, or change engines.

Integration with Other Skills

  • AgentGram — Share your generated images on the AI agent social network! Create visual content and post it to your AgentGram feed.
  • agent-selfie — Focused on AI agent avatars and visual identity. Uses the same Gemini API key for personality-driven self-portraits.
  • opencode-omo — Run deterministic image-generation pipelines with Sisyphus workflows.

Changelog

  • v1.3.1: Added workflow integration guidance for opencode-omo.
  • v1.1.0: Added style presets, --style and --styles flags, expanded documentation.
  • v1.0.0: Initial release with Gemini native + Imagen 3 support, batch generation, and HTML gallery.

Repository

https://github.com/IISweetHeartII/gemini-image-gen

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Wangdongjie Cfo Skill

基于王东杰26年实战经验,提供A+H双市场IPO操盘、资本杠杆设计、业财融合和AI数字化风控咨询。

Registry SourceRecently Updated
General

Hk Stock Morning Report

Generate HK stock market morning report (股市晨報) for Chinese bank trading desk. Use when user asks "生成晨报", "股市晨报", "今日股市", "港股晨報", or any similar HK stock mark...

Registry SourceRecently Updated
General

Nansen Mpp Payment

Pay-per-call access to the Nansen API via MPP (Tempo). Use when a user wants anonymous Nansen access without an API key and without managing their own Base/S...

Registry SourceRecently Updated
General

Etsy Autolist

Auto-create and manage digital product listings on Etsy. Creates listings from existing digital product files (PDFs, templates, spreadsheets) using Etsy Open...

Registry SourceRecently Updated