
image-generation
Generate images with Gemini (default) or fal.ai FLUX.2 klein 4B (--cheap for fast/low-cost). Generate videos with Grok Imagine (default) or fal.ai LTX-2 (--cheap). Use for: create image, generate visual, AI image generation, poster, video generation.
- Installs
- 80
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/aviz85/claude-skills-library --skill image-generation- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads image-generation automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Image Generation
Generate images using Google's Gemini model (default) or fal.ai FLUX.2 klein 4B (cheap mode).
Quick Start
MANDATORY: Always use -d (destination) flag to specify output path. This avoids file management issues with poster_0.jpg in the scripts folder.
cd ~/.claude/skills/image-generation/scripts
# ALWAYS specify destination with -d flag
npx tsx generate_poster.ts -d /tmp/my-image.jpg "A futuristic city at sunset"
# Cheap mode: fal.ai FLUX.2 klein 4B (fast, lower cost)
npx tsx generate_poster.ts --cheap -d /tmp/city.jpg "A futuristic city at sunset"
# With aspect ratio
npx tsx generate_poster.ts -d /tmp/landscape.jpg --aspect 3:2 "A wide landscape poster"
npx tsx generate_poster.ts --cheap -d /tmp/story.jpg -a 9:16 "A vertical story format"
# With reference assets (image editing)
npx tsx generate_poster.ts -d /tmp/banner.jpg --assets "/path/to/avatar.jpg" "Create banner with character"
npx tsx generate_poster.ts --cheap -d /tmp/photo.jpg --assets "/path/to/image.jpg" "Turn this into a realistic photo"
Why -d is mandatory:
- Output goes to predictable location (e.g.,
/tmp/for temp images) - Avoids hunting for
poster_0.jpgin scripts folder - Enables immediate use without file renaming
Providers
| Provider | Flag | Use Case | Cost |
|---|---|---|---|
| Gemini | (default) | High quality, best results | Higher |
| fal.ai klein 4B | --cheap | Fast, budget-friendly | ~$0.003/image |
Cheap Mode (--cheap)
Uses fal.ai FLUX.2 klein 4B - a distilled FLUX model optimized for speed and cost.
Why use cheap mode?
- Cost: ~$0.003 per image (vs Gemini's higher cost)
- Speed: Fast 4-step inference (~2-4 seconds)
- Quality: Good enough for drafts, social media, iterations
- Batch friendly: Generate many variations quickly
Endpoints:
- Text-to-image:
fal-ai/flux-2/klein/4b - Image editing (with --assets):
fal-ai/flux-2/klein/4b/edit
Best for:
- Quick iterations and previews
- Social media content
- Concept exploration
- Batch generation (10+ images)
Use Gemini instead for:
- Final production assets
- Complex compositions
- Text-heavy images (especially Hebrew)
Quality
Control image resolution with --quality or -q:
| Quality | Resolution | Use Case |
|---|---|---|
1K | 1024px | Default - fast, good for web |
2K | 2048px | High quality - print, detailed posters |
npx tsx generate_poster.ts -q 2K "High quality poster"
Aspect Ratio
IMPORTANT: Always use the default 3:2 aspect ratio unless the user explicitly requests a different format (like "vertical", "story", "square", etc.). Do NOT change the aspect ratio on your own.
Control image dimensions with --aspect or -a:
| Ratio | Use Case |
|---|---|
3:2 | Horizontal (DEFAULT - use this unless user specifies otherwise) |
1:1 | Square - Instagram, profile pics |
2:3 | Vertical - Pinterest, posters |
16:9 | Wide - YouTube thumbnails, headers |
9:16 | Tall - Stories, reels, TikTok |
npx tsx generate_poster.ts --aspect 3:2 "Your prompt"
npx tsx generate_poster.ts -a 16:9 "Your prompt"
Adding Assets (Reference Images)
Use --assets with full paths to include reference images:
# Single asset
npx tsx generate_poster.ts --assets "/full/path/to/image.jpg" "Your prompt"
# Multiple assets (comma-separated)
npx tsx generate_poster.ts --assets "/path/a.jpg,/path/b.png" "Use both images"
# With cheap mode - uses fal.ai edit endpoint
npx tsx generate_poster.ts --cheap --assets "/path/to/image.jpg" "Turn this into a painting"
Supported formats: .jpg, .jpeg, .png, .webp, .gif
IMPORTANT: Assets are NOT automatically included. You must explicitly pass them via --assets.
Destination (MANDATORY)
ALWAYS use --destination or -d to specify output path:
# REQUIRED: Always specify destination
npx tsx generate_poster.ts -d /tmp/poster.jpg "My poster"
# If file exists, auto-adds suffix: poster_1.jpg, poster_2.jpg, etc.
Features:
- Auto-creates parent directories if needed
- Collision avoidance: if file exists, adds
_1,_2, etc. - Use
/tmp/for temporary images that will be uploaded elsewhere
API Configuration
Create scripts/.env:
GEMINI_API_KEY=your_gemini_api_key
FAL_KEY=your_fal_api_key
XAI_API_KEY=your_xai_api_key
Hebrew/RTL Content
IMPORTANT: When the image contains Hebrew text, you MUST add the following sentence to the prompt:
"CRITICAL: Layout is RTL (right-to-left). All text in Hebrew. Visual flow, reading order, and panel sequence go from RIGHT to LEFT."
Copy this exact sentence and paste it at the BEGINNING of your prompt. Without it, the image will render left-to-right which is wrong for Hebrew content.
WOW Mode
When user asks for "wow mode" or wants maximum visual impact, add these epic elements to the prompt:
"EPIC CINEMATIC WOW: Amazed expression, mind-blown reaction, intense VFX - shattered glass particles, explosive energy bursts, volumetric light rays, dramatic lens flares, particle explosions, motion blur streaks, holographic glitches, electric sparks, cinematic color grading, dramatic rim lighting, depth of field bokeh, anamorphic lens effects. Maximum visual spectacle."
Output
- Files saved to path specified by
-dflag (MANDATORY) - Aspect ratio: Configurable via
--aspect(default: 3:2) - Quality: 1K (1024px on longest edge)
Video Generation
Generate videos using xAI Grok Imagine Video (default) or fal.ai LTX-2 (cheap mode).
Quick Start
cd ~/.claude/skills/image-generation/scripts
# Text-to-video (Grok Imagine - high quality, 720p)
npx tsx generate_video.ts -d /tmp/video.mp4 "A futuristic city at sunset, cinematic drone shot"
# Cheap mode: fal.ai LTX-2 (fast, low cost)
npx tsx generate_video.ts --cheap -d /tmp/video.mp4 "A futuristic city at sunset"
# Image-to-video (animate a still image)
npx tsx generate_video.ts -d /tmp/animated.mp4 --image /path/to/image.jpg "Slow zoom with particles floating"
npx tsx generate_video.ts --cheap -d /tmp/animated.mp4 --image /path/to/image.jpg "Gentle camera movement"
# Custom duration and aspect ratio
npx tsx generate_video.ts -d /tmp/long.mp4 -t 10 -a 9:16 "Vertical video for stories"
Video Providers
| Provider | Flag | Quality | Duration | Resolution | Cost |
|---|---|---|---|---|---|
| Grok Imagine | (default) | High, cinematic | 1-15s | 480p/720p | Per-second billing |
| fal.ai LTX-2 | --cheap | Good, fast | 1-10s | ~480p | Budget-friendly |
Video Options
| Option | Flag | Default | Description |
|---|---|---|---|
| Prompt | (positional) | required | Text description of the video |
| Destination | -d | required | Output file path (.mp4) |
| Duration | -t | 5 | Duration in seconds |
| Aspect ratio | -a | 16:9 | 16:9, 9:16, 1:1, 4:3, 3:4, 3:2, 2:3 |
| Resolution | -r | 720p | 480p or 720p (Grok only) |
| Image source | --image | none | Source image for image-to-video |
| Cheap mode | --cheap | false | Use LTX-2 instead of Grok |
FAQ
What does the image-generation skill do?
Generate images with Gemini (default) or fal.ai FLUX.2 klein 4B (--cheap for fast/low-cost). Generate videos with Grok Imagine (default) or fal.ai LTX-2 (--cheap). Use for: create image, generate visual, AI image generation, poster, video generation.
How do I install image-generation?
Run npx skills add https://github.com/aviz85/claude-skills-library --skill image-generation in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/image-generation/ (personal) or .claude/skills/image-generation/ (project).
Which AI agents can use image-generation?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is image-generation safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains image-generation?
It is published by aviz85 in aviz85/claude-skills-library. It has 80 recorded installs.
More from aviz85/claude-skills-library
html-to-pdf
aviz85/claude-skills-library
Convert HTML to PDF with pixel-perfect rendering and excellent Hebrew/RTL support. Use when the user asks to 'convert HTML to PDF', 'generate PDF from HTML', 'create PDF from webpage', 'export to PDF', or needs PDF generation with Hebrew text support.
youtube-uploader
aviz85/claude-skills-library
Upload videos to YouTube with title, description, tags. Use for: youtube upload, publish video, share on youtube.
gh-pages-deploy
aviz85/claude-skills-library
Open the skill to read its SKILL.md instructions.
presentation-architect
aviz85/claude-skills-library
Open the skill to read its SKILL.md instructions.
music-generator
aviz85/claude-skills-library
Open the skill to read its SKILL.md instructions.
wordpress-publisher
aviz85/claude-skills-library
Open the skill to read its SKILL.md instructions.
Popular media & creative skills
hyperframes
heygen-com/hyperframes
Read first to make, edit, animate or render any video with HyperFrames (HTML rendered to video), including launch films, explainers, music videos, charts, maps, vertical clips, title cards, captions and overlays. Holds the render contract, the work loop and what each kind of video needs.
media-use
heygen-com/hyperframes
Get or make any media for a HyperFrames video - music, sound effects, images, icons, logos, voiceover, avatar and generated video, transcripts, cutouts, colour grades and looks - with HeyGen or free local tools, and mix placed audio. Also for footage that looks dark, flat or dull, or should be stylized or hidden.
hyperframes-registry
heygen-com/hyperframes
About 450 ready-made HyperFrames blocks and components installed as editable source - transitions, overlays, titles, kinetic type, captions, charts, map overlays, 3D, camera moves. Use it before hand-building any named visual (CRT scanlines, glitch, film grain, a chart); also for hyperframes add and catalog.
hyperframes-creative
heygen-com/hyperframes
Non-animation creative direction for HyperFrames videos. Use for design spec (frame.md / design.md) handling, palettes, typography, narration, beat planning, audio-reactive visuals, composition patterns, and brand / style decisions. For atomic motion patterns and scene blueprints, use hyperframes-animation.
ai-video-generation
101-skills/superpowers
Generate AI videos with Google Veo, Seedance 2.0, HappyHorse, Wan, Grok and 40+ models via inference.sh CLI. Models: Veo 3.1, Veo 3, Seedance 2.0, HappyHorse 1.0, Wan 2.5, Grok Imagine Video, OmniHuman, Fabric, HunyuanVideo. Capabilities: text-to-video, image-to-video, reference-to-video, video editing, lipsync, avatar animation, video upscaling, foley sound. Use for: social media videos, marketing content, explainer videos, product demos, AI avatars. Triggers: video generation, ai video, text to video, image to video, veo, animate image, video from image, ai animation, video generator, generate video, t2v, i2v, ai video maker, create video with ai, runway alternative, pika alternative, sora alternative, kling alternative, seedance, happyhorse
ai-image-generation
101-skills/superpowers
Generate AI images with GPT-Image-2, FLUX, Gemini, Grok, Seedream, Reve and 50+ models via inference.sh CLI. Models: GPT-Image-2, FLUX Dev LoRA, FLUX.2 Klein LoRA, Gemini 3 Pro Image, Grok Imagine, Seedream 4.5, Reve, ImagineArt. Capabilities: text-to-image, image-to-image, inpainting, LoRA, image editing, upscaling, text rendering. Use for: AI art, product mockups, concept art, social media graphics, marketing visuals, illustrations. Triggers: flux, image generation, ai image, text to image, stable diffusion, generate image, ai art, midjourney alternative, dall-e alternative, text2img, t2i, image generator, ai picture, create image with ai, generative ai, ai illustration, grok image, gemini image, gpt image, openai image, chatgpt image