Generates and edits images using Google Gemini, OpenAI GPT Image, and xAI Grok Image APIs via shell scripts. This skill should be used when the user asks to "generate an image", "create an image", "edit an image", "modify an image", "make a picture", "draw me a", "text to image", "generate with gemini", "generate with openai", "generate with xai", "generate with grok", "gpt image", "gemini image", or "grok image".
From claude-image-generationnpx claudepluginhub hex/claude-marketplace --plugin claude-image-generationThis skill uses the workspace's default tool permissions.
references/api-details.mdGenerate and edit images using Google Gemini, OpenAI GPT Image 1.5, and xAI Grok Image APIs via shell scripts.
gemini-2.5-flash-image (default)GEMINI_API_KEYgpt-image-1.5OPENAI_API_KEYgrok-imagine-image (default), grok-2-image (basic generation only)XAI_API_KEY or GROK_API_KEYUse the scripts at ${CLAUDE_PLUGIN_ROOT}/scripts/:
# Gemini
bash "${CLAUDE_PLUGIN_ROOT}/scripts/gemini.sh" \
--mode generate \
--prompt "a serene mountain landscape at sunset" \
--output ./generated.png
# OpenAI
bash "${CLAUDE_PLUGIN_ROOT}/scripts/openai.sh" \
--mode generate \
--prompt "a serene mountain landscape at sunset" \
--output ./generated.png
# xAI
bash "${CLAUDE_PLUGIN_ROOT}/scripts/xai.sh" \
--mode generate \
--prompt "a serene mountain landscape at sunset" \
--output ./generated.png
# Gemini
bash "${CLAUDE_PLUGIN_ROOT}/scripts/gemini.sh" \
--mode edit \
--prompt "change the sky to a starry night" \
--input-image ./original.png \
--output ./edited.png
# OpenAI
bash "${CLAUDE_PLUGIN_ROOT}/scripts/openai.sh" \
--mode edit \
--prompt "change the sky to a starry night" \
--input-image ./original.png \
--output ./edited.png
# xAI
bash "${CLAUDE_PLUGIN_ROOT}/scripts/xai.sh" \
--mode edit \
--prompt "change the sky to a starry night" \
--input-image ./original.png \
--output ./edited.png
To generate with multiple providers simultaneously using the streaming display pane:
activeForm for spinner text:
source "${CLAUDE_PLUGIN_ROOT}/scripts/display.sh" && display_pane_open
# outputs: /tmp/display_pane.XXXXXX
DISPLAY_PANE_DIR so images appear in the shared pane as each provider finishes:
DISPLAY_PANE_DIR=/tmp/display_pane.XXXXXX bash "${CLAUDE_PLUGIN_ROOT}/scripts/gemini.sh" \
--mode generate --prompt "<prompt>" --output hero-gemini.png
DISPLAY_PANE_DIR=/tmp/display_pane.XXXXXX bash -c \
'source "${CLAUDE_PLUGIN_ROOT}/scripts/display.sh" && display_pane_close'
a sign that reads "OPEN 24 HOURS"| Flag | Values | Default |
|---|---|---|
--mode | generate, edit | (required) |
--prompt | text | (required) |
--output | file path | (required) |
--input-image | file path | (edit only) |
--aspect-ratio | 1:1, 16:9, etc. | 1:1 |
--model | gemini model name | gemini-2.5-flash-image |
| Flag | Values | Default |
|---|---|---|
--mode | generate, edit | (required) |
--prompt | text | (required) |
--output | file path | (required) |
--input-image | file path | (edit only) |
--size | 1024x1024, 1536x1024, 1024x1536 | 1024x1024 |
--quality | low, medium, high | high |
--background | transparent, opaque, auto | auto |
--model | OpenAI model name | gpt-image-1.5 |
| Flag | Values | Default |
|---|---|---|
--mode | generate, edit | (required) |
--prompt | text | (required) |
--output | file path | (required) |
--input-image | file path | (edit only) |
--aspect-ratio | 1:1, 16:9, 9:16, 4:3, 3:4, etc. | (none) |
--model | xAI model name | grok-imagine-image |