Generate AI images with various themes, styles, and aspect ratios. Use when asked to generate images, create artwork, make graphics, generate backgrounds, or create visual assets.
Generate AI-powered images using Google's Gemini image generation model. This skill is fully portable - just copy the entire folder to any project's .claude/skills/ directory.
Before first use, install the skill's dependencies:
cd .claude/skills/image-generation && npm install && cd -
# Generate a single preset
node .claude/skills/image-generation/scripts/generate.mjs --preset hero
# Generate with specific theme combination
node .claude/skills/image-generation/scripts/generate.mjs --preset hero --theme blue --style tech
# Generate with custom prompt
node .claude/skills/image-generation/scripts/generate.mjs --prompt "Abstract flowing waves" --ratio 16:9 --output custom.png
# Generate all presets for a theme
node .claude/skills/image-generation/scripts/generate.mjs --theme teal --style fintech
# List available options
node .claude/skills/image-generation/scripts/generate.mjs --list-themes
node .claude/skills/image-generation/scripts/generate.mjs --list-styles
node .claude/skills/image-generation/scripts/generate.mjs --list-backgrounds
node .claude/skills/image-generation/scripts/generate.mjs --list-models
node .claude/skills/image-generation/scripts/generate.mjs --list
# Use higher quality model (costs more)
node .claude/skills/image-generation/scripts/generate.mjs --prompt "Detailed artwork" --model pro
# With reference images (for style consistency)
node .claude/skills/image-generation/scripts/generate.mjs --prompt "Character waving" --ref ./samples/character.png
node .claude/skills/image-generation/scripts/generate.mjs --prompt "Same style" --ref ./samples/ # scans directory
# With background modes
node .claude/skills/image-generation/scripts/generate.mjs --prompt "Otter at desk" --bg fade
node .claude/skills/image-generation/scripts/generate.mjs --prompt "Otter with props" --bg transparent -o mascot.png
| Ratio | Use Case |
|---|---|
16:9 |
Hero backgrounds, banners, headers |
4:3 |
Card backgrounds, content sections |
1:1 |
Accent patterns, icons, social media |
3:4 |
Portrait backgrounds, testimonials |
21:9 |
Ultra-wide banners |
| Mode | Description |
|---|---|
solid |
Pure white background (default) |
fade |
Environment fades to white at edges (mascot-with-context style) |
transparent |
Generates image then auto-removes background (keeps character + props) |
scene |
Full environmental background, no transparency |
Note: The transparent mode uses @huggingface/transformers with the RMBG-1.4 model to automatically remove the background while preserving the character and environmental props.
| Model | Price | Description |
|---|---|---|
flash |
~$0.039/image | Fast, cost-effective, good quality (default) |
pro |
~$0.134/image | Highest quality, preview model |
| Theme | Description | Primary Color |
|---|---|---|
teal |
Cool teal/cyan palette | #3a9a8c |
maroon |
Bold crimson/red palette | #A61D1D |
blue |
Professional ocean blue | #2563eb |
purple |
Elegant royal purple | #7c3aed |
green |
Natural forest green | #059669 |
orange |
Warm energetic orange | #ea580c |
neutral |
Clean neutral gray | #525252 |
| Style | Description | Visual Elements |
|---|---|---|
fintech |
Fintech/Insurance | Flowing waves, halftone patterns |
biotech |
Biotech/Research | Molecular structures, DNA helixes |
tech |
Tech/SaaS | Geometric grids, circuit patterns |
nature |
Nature/Organic | Leaf patterns, natural textures |
minimal |
Minimal/Clean | Simple shapes, clean lines |
abstract |
Abstract/Artistic | Bold shapes, artistic compositions |
| Preset | Ratio | Purpose |
|---|---|---|
hero |
16:9 | Main hero section backgrounds |
card |
4:3 | Card and content backgrounds |
accent |
1:1 | Decorative accent patterns |
testimonial |
3:4 | Portrait-oriented backgrounds |
stats |
1:1 | Statistics section backgrounds |
banner |
21:9 | Ultra-wide banners |
icon |
1:1 | Small icon-style patterns |
When asked to generate website graphics:
cd .claude/skills/image-generation && npm install && cd -scripts/generate.mjsFor custom prompts, include:
Example:
node .claude/skills/image-generation/scripts/generate.mjs \
--prompt "Abstract geometric pattern with flowing teal gradients. Minimalist aesthetic. No text or logos." \
--ratio 16:9 \
--output my-image.png
Generate all presets for a specific theme combination:
node .claude/skills/image-generation/scripts/generate.mjs --theme purple --style tech
Override the default output location:
node .claude/skills/image-generation/scripts/generate.mjs --preset hero --output-dir ./assets/backgrounds
The script automatically detects common image directories in this order:
public/images/public/assets/images/assets/images/static/images/static/Falls back to creating public/images/ if none exist.
.env fileflash (default, pro (This skill is designed to be copy-pasted across projects:
.claude/skills/image-generation/ folder to new projectAI_API_KEY is set in the project's root .env filecd .claude/skills/image-generation && npm install && cd -The script automatically:
.env or package.jsonIf generation fails:
AI_API_KEY is set in project root .envcd .claude/skills/image-generation && npm installFor detailed reference, see reference.md.