google-image-gen

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.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "google-image-gen" with this command: npx skills add ypfaff/google-image-gen-skill/ypfaff-google-image-gen-skill-google-image-gen

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_PLUGIN_ROOT}/scripts/check_env.sh
cd ${CLAUDE_PLUGIN_ROOT} && uv sync && cd -

If the environment check fails, the user needs to configure their API key. Recommended: Create ~/.config/google-image-gen/.env with:

GOOGLE_AI_API_KEY=your_key_here

Get an API key from https://aistudio.google.com/apikey

Alternative: Export as environment variable: export GOOGLE_AI_API_KEY=your_key

Usage

Important: The plugin runs from its own directory. Use --cwd to ensure output files land in the user's project, not the plugin cache.

ORIG_CWD="$(pwd)" && cd ${CLAUDE_PLUGIN_ROOT} && uv run python main.py --cwd "$ORIG_CWD" <output_path> "<prompt>" [options]

Note: When the user specifies a path like output.png or images/photo.png, pass it as-is — the --cwd parameter ensures it resolves relative to the user's project root.

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

Simple Generation

ORIG_CWD="$(pwd)" && cd ${CLAUDE_PLUGIN_ROOT} && uv run python main.py --cwd "$ORIG_CWD" output.png "A red apple on a wooden table"

Save to subdirectory

ORIG_CWD="$(pwd)" && cd ${CLAUDE_PLUGIN_ROOT} && uv run python main.py --cwd "$ORIG_CWD" images/output.png "A red apple"

With Aspect Ratio

ORIG_CWD="$(pwd)" && cd ${CLAUDE_PLUGIN_ROOT} && uv run python main.py --cwd "$ORIG_CWD" thumb.png "Mountain landscape" --aspect 16:9

Edit Existing Image

ORIG_CWD="$(pwd)" && cd ${CLAUDE_PLUGIN_ROOT} && uv run python main.py --cwd "$ORIG_CWD" output.png "Change the sky to sunset" --edit input.png

With Reference Image

ORIG_CWD="$(pwd)" && cd ${CLAUDE_PLUGIN_ROOT} && uv run python main.py --cwd "$ORIG_CWD" output.png "Same style but with a car" --ref reference.png

Multiple Variations

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

ORIG_CWD="$(pwd)" && cd ${CLAUDE_PLUGIN_ROOT} && uv run python main.py --cwd "$ORIG_CWD" 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

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

image-gen

Generate AI images from text prompts. Triggers on: "生成图片", "画一张", "AI图", "generate image", "配图", "create picture", "draw", "visualize", "generate an image".

Archived SourceRecently Updated
General

explainer

Create explainer videos with narration and AI-generated visuals. Triggers on: "解说视频", "explainer video", "explain this as a video", "tutorial video", "introduce X (video)", "解释一下XX(视频形式)".

Archived SourceRecently Updated
General

asr

Transcribe audio files to text using local speech recognition. Triggers on: "转录", "transcribe", "语音转文字", "ASR", "识别音频", "把这段音频转成文字".

Archived SourceRecently Updated