360-panorama-viewer
Build a fully self-contained 360° equirectangular panorama viewer as a single HTML file. The viewer uses Three.js to render…
Generate and transform images using AI Gateway API. Use when the user asks to create, generate, produce, or transform images, or work with image generation.
$ npx -y skills add happycapy-ai/happycapy-skills --skill generate-image --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/generate-imageContext preview
The summary Claude sees to decide when to auto-load this skill.
Generate and transform images using AI Gateway API. Use when the user asks to create, generate, produce, or transform images, or work with image generation.
name: generate-image description: Generate and transform images using AI Gateway API. Use when the user asks to create, generate, produce, or transform images, or work with image generation. allowed-tools: Bash, Read
Generate images from text prompts and transform existing images using the AI Gateway API with support for multiple AI models including Google Gemini, Byteplus Seedream, and OpenAI GPT-Image.
This Skill enables Claude to generate images from text descriptions and transform existing images with AI-powered modifications. It uses the AI Gateway API which routes requests to appropriate providers based on the model selected.
**Required Environment Variable:**
If this environment variable is not set, the scripts will fail with an error message asking you to provide it.
Use the bundled script to generate images from text descriptions:
python3 scripts/generate_image.py "A serene landscape with mountains and a lake at sunset, photorealistic style"
Apply transformations to existing images using reference URLs:
python3 scripts/transform_image.py "Make this image more vibrant and add dramatic lighting" "https://example.com/image.jpg"
| Model | Provider | Best For | |-------|----------|----------| | `google/gemini-3.1-flash-image-preview` | Google Vertex AI | Latest fast image generation with improved quality | | `google/gemini-3-pro-image-preview` | Google Vertex AI | High-quality photorealistic images | | `google/gemini-2.5-flash-image` | Google Vertex AI | Fast image generation | | `byteplus/seedream-4-5` | Byteplus Seedream | Creative artistic styles | | `byteplus/seedream-4-0` | Byteplus Seedream | General purpose image generation | | `openai/gpt-image-1` | OpenAI | Advanced image synthesis | | `openai/gpt-image-1-mini` | OpenAI | Quick image generation | | `openai/gpt-image-1.5` | OpenAI | Enhanced image synthesis | | `openai/gpt-image-2` | OpenAI | Latest generation, multi-aspect ratio support |
These models support the full parameter set above. Key notes:
Generate images from text prompts with customizable parameters.
**Usage:**
python3 scripts/generate_image.py "prompt" [--model MODEL] [--output OUTPUT] [--format FORMAT]
**Options:**
**Example:**
python3 scripts/generate_image.py \ "A futuristic city with flying cars at night, cyberpunk style" \ --model "google/gemini-3.1-flash-image-preview" \ --output "city.png"
Transform existing images using AI with text instructions.
**Usage:**
python3 scripts/transform_image.py "prompt" "image_url" [--model MODEL] [--output OUTPUT]
**Example:**
python3 scripts/transform_image.py \ "Make this image more vibrant and add dramatic sunset lighting" \ "https://example.com/original.jpg" \ --output "enhanced.png"
Generate multiple images in batch.
**Usage:**
python3 scripts/batch_generate.py prompts.txt [--model MODEL]
**Example prompts.txt:**
A sunset over the ocean A mountain landscape at dawn A bustling city street at night
**When implementing image generation tasks:**
1. **Always use JavaScript for API calls** when writing custom code 2. **Check for API Key** at the start:
const apiKey = process.env.AI_GATEWAY_API_KEY;
if (!apiKey) {
throw new Error('AI_GATEWAY_API_KEY environment variable is required. Please set it with your AI Gateway API key.');
}3. **Use the bundled Python scripts** for quick generation tasks rather than writing custom code
4. **Include Origin header** in all API requests: Set `Origin: https://trickle.so` header for proper request routing
5. **Handle both streaming and non-streaming responses** appropriately
6. **Save generated images** to appropriate file paths and inform the user
When you need to write custom JavaScript code for image generation:
const apiKey = process.env.AI_GATEWAY_API_KEY;
if (!apiKey) {
throw new Error('AI_GATEWAY_API_KEY environment variable is required. Please set it with your AI Gateway API key.');
}
const API_BASE = `${process.env.AI_GATEWAY_BASE_URL}/api/v1`;
async function generateImage(prompt, model = 'google/gemini-3.1-flash-image-preview') {
const responseA curated collection of high-quality Claude Code skills to enhance your development workflow
Build a fully self-contained 360° equirectangular panorama viewer as a single HTML file. The viewer uses Three.js to render…
Expert in building 3D experiences for the web - Three.js, React Three Fiber, Spline, WebGL, and interactive 3D scenes. Covers…
Reusable fixed-style PPTX generation skill for the Acid Labels visual brand — bold acid-green (#A9FF7A) operating-guide aesthetic…
Generate AI images with FLUX, Gemini, Grok, Seedream, Reve and 50+ models via inference.sh CLI. Models: FLUX Dev LoRA, FLUX.2…
Generate AI videos with Google Veo, Seedance, Wan, Grok and 40+ models via inference.sh CLI. Models: Veo 3.1, Veo 3, Seedance 1.5…
Reusable fixed-style PPTX generation skill for the Apricot Ritual Index visual brand — warm apricot background (#FDDEB6),…