
Ce Gemini Imagegen
Generate and edit images via the Gemini API (Nano Banana Pro) for logos, mockups, stickers, and multi-turn visual iteration.
Overview
CE Gemini Imagegen is an agent skill for the Build phase that generates and edits images through the Gemini API using gemini-3-pro-image-preview and documented resolution and aspect-ratio defaults.
Install
npx skills add https://github.com/everyinc/compound-engineering-plugin --skill ce-gemini-imagegenWhat is this skill?
- Default model gemini-3-pro-image-preview at 1K–4K with 11 aspect ratios
- Text-to-image, image editing, style transfer, and multi-reference composition
- Product mockups, logos with text, stickers, and multi-turn refinement flows
- Python google.genai client pattern with types configuration
- Requires GEMINI_API_KEY environment variable
- 3 resolutions: 1K, 2K, 4K
Adoption & trust: 1.5k installs on skills.sh; 20.5k GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
You need production-ready images and edits for your product or marketing but only have text prompts and an API key, not a design suite workflow in the repo.
Who is it for?
Builders automating creative assets inside Claude Code or Cursor with GEMINI_API_KEY already configured.
Skip if: Teams that need local SDXL/ComfyUI pipelines with no Google API billing or offline-only generation.
When should I use this skill?
Generating or editing images with the Gemini API: text-to-image, edits, style transfer, logos, stickers, mockups, or multi-turn refinement.
What do I get? / Deliverables
You get runnable Gemini generate_content patterns and settings that return 1K–4K images for logos, mockups, stickers, and iterative edits.
- Generated or edited image assets
- Documented API call snippets with model and aspect settings
Recommended Skills
Journey fit
Image generation is a Build-time integration task wired into product assets, marketing creatives, and agent workflows—not a launch-only SEO activity. Integrations fits because the skill centers on GEMINI_API_KEY, client SDK calls, models, resolutions, and aspect ratios.
How it compares
Agent skill for Gemini REST/SDK image calls—not an MCP server wrapper or a Figma handoff checklist.
Common Questions / FAQ
Who is ce-gemini-imagegen for?
Solo developers and indie teams generating or editing images programmatically while building SaaS, content sites, or agent features.
When should I use ce-gemini-imagegen?
Use during Build when creating images from prompts, editing existing assets, running style transfer, or composing from multiple references for launch creatives.
Is ce-gemini-imagegen safe to install?
It expects a Gemini API key and network calls to Google; review the Security Audits panel on this page and rotate keys if the skill runs in shared environments.
SKILL.md
READMESKILL.md - Ce Gemini Imagegen
# Gemini Image Generation (Nano Banana Pro) Generate and edit images using Google's Gemini API. The environment variable `GEMINI_API_KEY` must be set. ## Default Model | Model | Resolution | Best For | |-------|------------|----------| | `gemini-3-pro-image-preview` | 1K-4K | All image generation (default) | **Note:** Always use this Pro model. Only use a different model if explicitly requested. ## Quick Reference ### Default Settings - **Model:** `gemini-3-pro-image-preview` - **Resolution:** 1K (default, options: 1K, 2K, 4K) - **Aspect Ratio:** 1:1 (default) ### Available Aspect Ratios `1:1`, `2:3`, `3:2`, `3:4`, `4:3`, `4:5`, `5:4`, `9:16`, `16:9`, `21:9` ### Available Resolutions `1K` (default), `2K`, `4K` ## Core API Pattern ```python import os from google import genai from google.genai import types client = genai.Client(api_key=os.environ["GEMINI_API_KEY"]) # Basic generation (1K, 1:1 - defaults) response = client.models.generate_content( model="gemini-3-pro-image-preview", contents=["Your prompt here"], config=types.GenerateContentConfig( response_modalities=['TEXT', 'IMAGE'], ), ) for part in response.parts: if part.text: print(part.text) elif part.inline_data: image = part.as_image() image.save("output.png") ``` ## Custom Resolution & Aspect Ratio ```python from google.genai import types response = client.models.generate_content( model="gemini-3-pro-image-preview", contents=[prompt], config=types.GenerateContentConfig( response_modalities=['TEXT', 'IMAGE'], image_config=types.ImageConfig( aspect_ratio="16:9", # Wide format image_size="2K" # Higher resolution ), ) ) ``` ### Resolution Examples ```python # 1K (default) - Fast, good for previews image_config=types.ImageConfig(image_size="1K") # 2K - Balanced quality/speed image_config=types.ImageConfig(image_size="2K") # 4K - Maximum quality, slower image_config=types.ImageConfig(image_size="4K") ``` ### Aspect Ratio Examples ```python # Square (default) image_config=types.ImageConfig(aspect_ratio="1:1") # Landscape wide image_config=types.ImageConfig(aspect_ratio="16:9") # Ultra-wide panoramic image_config=types.ImageConfig(aspect_ratio="21:9") # Portrait image_config=types.ImageConfig(aspect_ratio="9:16") # Photo standard image_config=types.ImageConfig(aspect_ratio="4:3") ``` ## Editing Images Pass existing images with text prompts: ```python from PIL import Image img = Image.open("input.png") response = client.models.generate_content( model="gemini-3-pro-image-preview", contents=["Add a sunset to this scene", img], config=types.GenerateContentConfig( response_modalities=['TEXT', 'IMAGE'], ), ) ``` ## Multi-Turn Refinement Use chat for iterative editing: ```python from google.genai import types chat = client.chats.create( model="gemini-3-pro-image-preview", config=types.GenerateContentConfig(response_modalities=['TEXT', 'IMAGE']) ) response = chat.send_message("Create a logo for 'Acme Corp'") # Save first image... response = chat.send_message("Make the text bolder and add a blue gradient") # Save refined image... ``` ## Prompting Best Practices ### Photorealistic Scenes Include camera details: lens type, lighting, angle, mood. > "A photorealistic close-up portrait, 85mm lens, soft golden hour light, shallow depth of field" ### Stylized Art Specify style explicitly: > "A kawaii-style sticker of a happy red panda, bold