askill
google-image-gen

google-image-genSafety 95Repository

Generate images using Google's Gemini API. Use this skill when the user wants to generate, create, or edit images with AI. Keywords: image generation, create image, generate picture, AI art, edit image, Gemini, icon, render, illustration.

14 stars
1.2k downloads
Updated 2/15/2026

Package Files

Loading files...
SKILL.md

Google Image Generation Skill

Generate images from text prompts using Google's Gemini API.

First-Time Setup (Once Per Context)

Run these commands once at the start of a session:

.claude/skills/google-image-gen/scripts/check_env.sh
cd .claude/skills/google-image-gen && uv sync && cd -

If the environment check fails, the user needs to create .env in the skill directory with their API key from https://aistudio.google.com/apikey

Usage

Important: Run the script from the skill directory. Use ../../../ to save images to the project root.

cd .claude/skills/google-image-gen && uv run python main.py ../../../<output_path> "<prompt>" [options]

Project root path: ../../../ (relative to skill directory)

Note: If the user specifies a custom output path (e.g., images/photo.png), they likely mean relative to the project root. Always prepend ../../../ to such paths (e.g., ../../../images/photo.png).

Options

OptionShortDescription
--style-sStyle template (.md file with {subject} placeholder)
--ref-rReference image for style (repeatable, max 14)
--edit-eEdit existing image instead of generating
--aspect-aAspect ratio: 1:1, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9

Examples

All examples assume you run from the skill directory (cd .claude/skills/google-image-gen).

Simple Generation (saves to project root)

cd .claude/skills/google-image-gen && uv run python main.py ../../../output.png "A red apple on a wooden table"

Save to subdirectory in project root

cd .claude/skills/google-image-gen && uv run python main.py ../../../images/output.png "A red apple"

With Aspect Ratio

cd .claude/skills/google-image-gen && uv run python main.py ../../../thumb.png "Mountain landscape" --aspect 16:9

Edit Existing Image

cd .claude/skills/google-image-gen && uv run python main.py ../../../output.png "Change the sky to sunset" --edit ../../../input.png

With Reference Image

cd .claude/skills/google-image-gen && uv run python main.py ../../../output.png "Same style but with a car" --ref ../../../reference.png

Multiple Variations

Generates numbered outputs (output_1.png, output_2.png, etc.):

cd .claude/skills/google-image-gen && uv run python main.py ../../../output.png "cat" "dog" "bird"

Workflow

  1. First use in context: Run setup commands (check_env.sh + uv sync)
  2. Generate images as needed
  3. Report output paths to user

Notes

  • Paid API tier recommended (free tier has strict rate limits)
  • Output directories are created automatically
  • Default aspect ratio is 16:9

Install

Download ZIP
Requires askill CLI v1.0+

AI Quality Score

95/100Analyzed 2/20/2026

High-quality skill document for Google Gemini image generation. Provides comprehensive setup instructions, clear usage examples, option tables, and workflow guidance. Well-structured with good discoverability through tags and clear "when to use" section. Located in dedicated skills folder suggesting proper skill repository structure.

95
95
95
95
95

Metadata

Licenseunknown
Version-
Updated2/15/2026
PublisherNeverSight

Tags

apici-cdgithub-actionsllmprompting