gemini-imagegen

Generate and edit images via the Gemini API from text prompts.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/sidsarasvati/dotfiles --skill gemini-imagegen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gemini-imagegen
Source: https://github.com/sidsarasvati/dotfiles/tree/main/claude/skills/gemini-imagegen
Command: npx skills add https://github.com/sidsarasvati/dotfiles --skill gemini-imagegen

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires google-genai, pillow, and includes scripts (resource) components.

What problem does it solve?

This skill provides a powerful, flexible interface to Google's Gemini API for all image generation and manipulation needs. It simplifies complex tasks like creating images from text, editing existing visuals, applying style transfers, or composing multiple images, saving designers and content creators significant time and effort.

Core Features & Use Cases

  • Text-to-Image Generation: Create high-quality images from simple text prompts, supporting various styles and resolutions up to 4K.
  • Image Editing & Refinement: Modify existing images with conversational instructions or through iterative multi-turn chat for precise adjustments.
  • Advanced Composition: Combine up to 14 reference images into a single, coherent output, ideal for product mockups, group photos, or complex scenes.
  • Use Case: You need a logo for "Acme Corp" with a coffee bean motif. This skill can generate the initial logo, then refine it through chat to make the text bolder and add a blue gradient, saving you multiple design iterations.

Quick Start

Generate an image of "A cat wearing a wizard hat" and save it as output.png.

Frequently Asked Questions about gemini-imagegen

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate images from text prompts using the Gemini API?

Text-to-image generation with Gemini API converts written descriptions into high-quality images by calling the gemini-2.5-flash-image or gemini-3-pro-image-preview models with your prompt. Set response_modalities to TEXT and IMAGE, configure aspect_ratio and image_size in image_config, and the API returns both visual output and descriptive text in a single response.

Can I edit and refine images through multi-turn conversation?

Yes, this skill supports iterative image editing through multi-turn chat. After generating an initial image, send follow-up prompts describing refinements—such as style changes, color adjustments, or composition tweaks—and the Gemini API modifies the image based on your conversational instructions across multiple turns.

What image formats and resolutions does Gemini image generation support?

Gemini image generation supports resolutions up to 4K and customizable aspect ratios configured through image_config parameters. The skill uses the Pillow library to handle image processing and composition, supporting standard image formats for both input reference images and output visuals.

How do I combine multiple reference images into a single composite output?

Advanced composition merges up to 14 reference images into one coherent visual by passing them as inputs to the Gemini API alongside a composition prompt. This is ideal for product mockups, group scenes, or complex layouts where you want to blend multiple source images into a unified result.

Do I need a Gemini API key to use this skill?

Yes, you must provide a GEMINI_API_KEY environment variable to authenticate with Google's Gemini API. The skill passes this key when calling gemini-2.5-flash-image or gemini-3-pro-image-preview models, so valid credentials are a prerequisite for all image generation and editing operations.

What are the limitations when generating logos and product mockups with AI?

While Gemini excels at creating logos and mockups from text prompts, results depend on prompt clarity and model interpretation. Complex brand requirements, precise text rendering, or highly specific design constraints may require iterative refinement through multi-turn chat rather than single-pass generation.