Add this skill
npx mdskills install sanjay3290/imagenEnables cross-platform AI image generation with clear triggers and usage examples
A Claude Code skill that generates images using Google Gemini's image generation model. Simply ask Claude to create an image during any coding session, and it will generate and save it for you.
Cross-Platform: Works on Windows, macOS, and Linux.
# Via plugin marketplace (recommended)
/plugin install imagen@ai-skills
# Or add the entire marketplace
/plugin marketplace add sanjay3290/ai-skills
Get a free API key from Google AI Studio:
Windows (PowerShell):
$env:GEMINI_API_KEY = "your-api-key-here"
Windows (CMD):
set GEMINI_API_KEY=your-api-key-here
macOS/Linux:
export GEMINI_API_KEY="your-api-key-here"
# Add to ~/.zshrc or ~/.bashrc to persist
echo 'export GEMINI_API_KEY="your-api-key-here"' >> ~/.zshrc
Just ask Claude to generate an image during any conversation:
"Generate an image of a sunset over mountains"
"I need a hero image for my landing page"
"Create an app icon for a weather app"
When you mention needing an image, Claude will automatically:
You: "I'm building a dashboard. Generate a placeholder chart image."
Claude: *generates and saves image* "Created the image at ./assets/chart-placeholder.png"
You: "Create an architecture diagram for our microservices"
Claude: *generates image* "Saved to ./docs/architecture.png"
You: "Generate a high-res hero image and save it to ./public/hero.png"
Claude: *generates 2K image at specified path*
| Variable | Required | Default | Description |
|---|---|---|---|
GEMINI_API_KEY | Yes | - | Your Google Gemini API key |
IMAGE_SIZE | No | 1K | Default size (512, 1K, or 2K) |
GEMINI_MODEL | No | gemini-3-pro-image-preview | Gemini model ID |
| Size | Resolution | Best For |
|---|---|---|
512 | 512x512 | Icons, thumbnails, quick previews |
1K | 1024x1024 | General use, web images |
2K | 2048x2048 | High-res, print, retina displays |
# Basic usage
python scripts/generate_image.py "A serene lake at dawn"
# Custom output path
python scripts/generate_image.py "App icon" "./icon.png"
# With size option
python scripts/generate_image.py --size 2K "Detailed landscape" "./wallpaper.png"
# With custom model
python scripts/generate_image.py --model gemini-3-pro-image-preview "A logo" "./logo.png"
imagen/
├── SKILL.md # Skill definition (Claude reads this)
├── README.md # This file
├── reference.md # Detailed API reference
├── examples.md # Usage examples
├── .env.example # API key template
└── scripts/
└── generate_image.py # Cross-platform Python script
Windows:
echo $env:GEMINI_API_KEY # Should show your key
macOS/Linux:
echo $GEMINI_API_KEY # Should show your key
source ~/.zshrc # Reload if you just added it
Apache-2.0 License - See LICENSE for details.
Install via CLI
npx mdskills install sanjay3290/imagenImagen - AI Image Generation Skill is a free, open-source AI agent skill. |
Install Imagen - AI Image Generation Skill with a single command:
npx mdskills install sanjay3290/imagenThis downloads the skill files into your project and your AI agent picks them up automatically.
Imagen - AI Image Generation Skill works with Claude Code, Claude Desktop, Cursor, Vscode Copilot, Windsurf, Continue Dev, Codex, Gemini Cli, Amp, Roo Code, Goose, Opencode, Trae, Qodo, Command Code. Skills use the open SKILL.md format which is compatible with any AI coding agent that reads markdown instructions.