gemini-image-gen
Guide for implementing Google Gemini API image generation - create high-quality images from text prompts using gemini-2.5-flash-image model. Use when generating images, creating visual content, or implementing text-to-image features. Supports text-to-image, image editing, multi-image composition, and iterative refinement.
npx skills add majiayu000/claude-skill-registry --skill gemini-image-gen-alex-tgk-saasquatch --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Gemini Image Generation Skill Generate high-quality images using Google's Gemini 2.5 Flash Image model with text prompts, image editing, and multi-image composition capabilities. ## When to Use This Skill Use this skill when you need to: - Generate images from text descriptions - Edit existing images by adding/removing elements or changing styles - Combine multiple source images into new compositions - Iteratively refine images through conversational editing - Create visual content for documentation, design, or creative projects ## Prerequisites ### API Key Setup The skill automatically detects your `GEMINI_API_KEY` in this order: 1. **Process environment**: `export GEMINI_API_KEY="your-key"` 2. **Skill directory**: `.claude/skills/gemini-image-gen/.env` 3. **Project directory**: `./.env` (project root) **Get your API key**: Visit [Google AI Studio](https://aistudio.google.com/apikey) Create `.env` file with: ```bash GEMINI_API_KEY=your_api_key_here ``` ### Python Setup Install required package: ```bash pip install google-genai ``` ## Quick Start ### Basic Text-to-Image Generation ```python from google import genai from google.genai import types import os # API key detection hand
- When to Use This Skill
- Prerequisites
- API Key Setup
- Python Setup
- Quick Start
- Basic Text-to-Image Generation
- Using the Helper Script
- Key Features
- Aspect Ratios
- Response Modalities
- Image Editing
- Multi-Image Composition
- Prompt Engineering Tips
- Safety Settings
pip install google-genai Generate single image python .claude/skills/gemini-image-gen/scripts/generate.py \ Generate with specific modalities Create directory if needed mkdir -p ./docs/assets Check environment variables echo $GEMINI_API_KEY Verify .env file exists cat .claude/skills/gemini-image-gen/.env
What does the gemini-image-gen skill do?
Guide for implementing Google Gemini API image generation - create high-quality images from text prompts using gemini-2.5-flash-image model. Use when generating images, creating visual content, or implementing text-to-image features. Supports text-to-image, image editing, multi-image composition, and iterative refinement.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill gemini-image-gen-alex-tgk-saasquatch --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
