Back to list
MaceGrim

gemini-image

by MaceGrim

My Claude Code configuration - commands, skills, hooks, and settings

0🍴 0📅 Jan 24, 2026

SKILL.md


name: gemini-image description: Generate images using Google Gemini/Imagen API. Use when the user asks to create, generate, or make an image, picture, photo, illustration, artwork, or visual content. allowed-tools: Bash(python:*), Read, Write

Gemini Image Generation

Generate images using Google's Gemini and Imagen models.

Prerequisites

The user must have:

  1. A Google API key with Gemini access set as GEMINI_API_KEY environment variable
  2. Python packages: pip install google-genai pillow

Available Models

ModelBest ForNotes
gemini-2.5-flash-imageFast, high-volume generationSpeed optimized
gemini-3-pro-image-previewProfessional assets, complex promptsBest quality, supports 4K
imagen-4.0-generate-001Standard image generationGood balance
imagen-4.0-fast-generate-001Quick iterationsFastest
imagen-4.0-ultra-generate-001Highest qualitySupports 2K

Generating Images

Use the script at ~/.claude/skills/gemini-image/scripts/generate.py:

python ~/.claude/skills/gemini-image/scripts/generate.py \
  --prompt "A serene mountain landscape at sunset" \
  --output ~/Pictures/mountain.png \
  --model gemini-2.5-flash-image

Script Arguments

ArgumentRequiredDefaultDescription
--promptYes-Text description of the image
--outputNo./generated_image.pngOutput file path
--modelNogemini-2.5-flash-imageModel to use
--aspect-ratioNo1:1Aspect ratio (e.g., 16:9, 9:16, 4:3)
--sizeNo1KImage size (1K, 2K, or 4K for pro model)
--countNo1Number of images (1-4, Imagen models only)

Aspect Ratio Options

  • 1:1 - Square (default)
  • 16:9 - Widescreen landscape
  • 9:16 - Portrait/mobile
  • 4:3 - Standard landscape
  • 3:4 - Standard portrait
  • 3:2, 2:3 - Photo aspect ratios

Usage Workflow

  1. Ask the user what they want to generate
  2. Craft a detailed prompt (more detail = better results)
  3. Choose appropriate model and settings
  4. Run the generation script
  5. Show the user where the image was saved
  6. Offer to regenerate with different settings if needed

Prompt Tips

  • Be specific and descriptive
  • Include style keywords: "photorealistic", "watercolor", "digital art", "3D render"
  • Mention lighting: "golden hour", "studio lighting", "dramatic shadows"
  • Specify perspective: "aerial view", "close-up", "wide angle"
  • Add mood: "serene", "energetic", "mysterious"

Example Prompts

Product shot:

Professional product photography of a sleek smartphone on a marble surface,
soft studio lighting, clean white background, 8K detail

Artwork:

Digital painting of a cyberpunk city at night, neon lights reflecting on
wet streets, flying cars, towering skyscrapers, cinematic composition

Portrait:

Professional headshot of a business executive, neutral background,
soft lighting, confident expression, high resolution

Troubleshooting

  • API key error: Ensure GEMINI_API_KEY is set in your environment
  • Package not found: Run pip install google-genai pillow
  • Rate limit: Wait a few seconds and retry, or use a different model
  • Content blocked: Rephrase the prompt to avoid restricted content

Score

Total Score

50/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon