
happy-image-gen
Universal AI image generation supporting OpenAI DALL·E / gpt-image, Google Gemini Image / Imagen, Replicate (Flux / SDXL / any model), Stability AI, FAL, Ark (Seedream 4.5), Bailian (qwen-image / wanx), and SiliconFlow. Use this skill whenever the user asks to generate, create, draw, illustrate, render, or synthesize images from text prompts or reference images. Typical phrases include "draw a ...", "generate an image of ...", "画一张 ...", "给我来张图", "make a poster of ...", "create an illustration ...", or any mention of image-generation model families like DALL·E, gpt-image, Flux, SDXL, Seedream, Imagen, Gemini image, Kolors, or Wanx. Always use this skill even if the user does not name a specific model — pick a provider based on their EXTEND.md defaults or available API keys in the environment. Do NOT use this skill when the user explicitly mentions 即梦 / Dreamina / Jimeng — those go to happy-dreamina instead.
- Installs
- 155
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/iamzhihuix/happy-claude-skills --skill happy-image-gen- 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 happy-image-gen 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.
happy-image-gen
Generates still images across 8 providers through one CLI: bun scripts/main.ts .... The same CLI handles text-to-image and image-to-image (reference-driven) edits.
Quick usage
bun scripts/main.ts --prompt "A calico cat on green grass, cinematic light" --ar 16:9 --image ./out.png
When to invoke this skill
Invoke this skill whenever the user:
- Asks to generate, create, draw, render, illustrate, or synthesize an image from text.
- Asks to restyle or transform an existing image they provide a path to.
- Names any image-generation model (DALL·E, gpt-image, Flux, SDXL, Gemini Image, Imagen, Seedream, Kolors, Wanx, Stable Diffusion) without specifying 即梦/Dreamina/Jimeng.
Route to happy-dreamina instead when the user explicitly names 即梦, Jimeng, or the dreamina CLI.
Step 0: Preflight (BLOCKING — run before any generation)
Run these checks:
-
Locate EXTEND.md config. Check in order:
./.happy-skills/happy-image-gen/EXTEND.md(project)$XDG_CONFIG_HOME/happy-skills/happy-image-gen/EXTEND.md~/.happy-skills/happy-image-gen/EXTEND.md(user)
If none exist, run
bun scripts/main.ts --setupand followreferences/config/first-time-setup.mdto create one. Do not proceed to generation until the user has at least one provider configured. -
Verify a provider is usable. Confirm either an env var is set (e.g.,
OPENAI_API_KEY) or EXTEND.md references anapi_key_env/api_key_sourcethat resolves. If nothing resolves, loop back to setup. -
Verify Bun is available. Run
command -v bun. If missing, fall back tonpx -y bun scripts/main.ts ....
Step 1: Choose a provider
Pick in this order of preference:
--provider <id>explicitly passed by the user.- The
default_providerin EXTEND.md. - The first provider whose API key is present in the environment. Priority when auto-detecting:
openai→google→replicate→stability→fal→ark→bailian→siliconflow.
See references/providers.md for each provider's required env vars, default models, and strengths (e.g., prefer google for text-in-image, replicate for Flux-family photorealism, ark for Chinese text fidelity).
Step 2: Fill in parameters
--prompt: the user's full request, trimmed. Always double-quote.--ar: aspect ratio —1:1/16:9/9:16/3:4/4:3. Seereferences/aspect_ratio_map.mdfor how each provider interprets this.--quality:draft(fastest + cheapest),hd(default), orultra(4K-class, slower).--ref <path>: repeat for multiple reference images. Not every provider supports this — see providers.md.--model: override the default model for the chosen provider. Omit unless the user asked for a specific one.--image <path>: REQUIRED — output file path. Use a descriptive name (e.g.,./out/hero-landscape.png).
Step 3: Run
bun scripts/main.ts \
--prompt "..." \
--image ./out.png \
--provider openai \
--ar 1:1 \
--quality hd
On success the CLI prints the resolved absolute path and byte count. In --json mode it emits:
{ "success": true, "provider": "openai", "model": "gpt-image-1", "image": "/abs/path.png", "size_bytes": 1416341, "format": "png" }
Echo the path back to the user.
Step 4: Handle errors
config: No provider selected ...— no API key in env and no EXTEND.md. Loop back to Step 0.[openai] OpenAI images API 401 ...— key invalid or expired. Ask the user to refresh it.[openai] ... 400 ... content_policy_violation— prompt blocked. Show the raw error to the user; do not paraphrase.- Timeouts / network errors — retry once. If still failing, surface the raw message and
providerso the user knows what to check.
See references/error_codes.md for a per-provider error table.
References
Read on demand:
references/providers.md— all 8 providers, required env vars, default models, strengths.references/aspect_ratio_map.md— how each provider interprets--ar.references/error_codes.md— common errors per provider and fixes.references/config/first-time-setup.md— step-by-step for--setup.references/config/extend-schema.md— EXTEND.md schema reference.
Template for EXTEND.md: assets/EXTEND.template.md.
FAQ
What does the happy-image-gen skill do?
Universal AI image generation supporting OpenAI DALL·E / gpt-image, Google Gemini Image / Imagen, Replicate (Flux / SDXL / any model), Stability AI, FAL, Ark (Seedream 4.5), Bailian (qwen-image / wanx), and SiliconFlow. Use this skill whenever the user asks to generate, create, draw, illustrate, render, or synthesize images from text prompts or reference images. Typical phrases include "draw a ...", "generate an image of ...", "画一张 ...", "给我来张图", "make a poster of ...", "create an illustration ...", or any mention of image-generation model families like DALL·E, gpt-image, Flux, SDXL, Seedream, Imagen, Gemini image, Kolors, or Wanx. Always use this skill even if the user does not name a specific model — pick a provider based on their EXTEND.md defaults or available API keys in the environment. Do NOT use this skill when the user explicitly mentions 即梦 / Dreamina / Jimeng — those go to happy-dreamina instead.
How do I install happy-image-gen?
Run npx skills add https://github.com/iamzhihuix/happy-claude-skills --skill happy-image-gen 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/happy-image-gen/ (personal) or .claude/skills/happy-image-gen/ (project).
Which AI agents can use happy-image-gen?
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 happy-image-gen 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 happy-image-gen?
It is published by iamzhihuix in iamzhihuix/happy-claude-skills. It has 155 recorded installs.
More from iamzhihuix/happy-claude-skills
wechat-article-writer
iamzhihuix/happy-claude-skills
公众号文章自动化写作流程。支持资料搜索、文章撰写、爆款标题生成、排版优化。当用户提到写公众号、微信文章、自媒体写作、爆款文章、内容创作时使用此 skill。
docx-format-replicator
iamzhihuix/happy-claude-skills
Extract formatting from existing Word documents and generate new documents with the same format but different content. Use this skill when users need to create multiple documents with consistent formatting, replicate document templates, or maintain corporate document standards across different content.
browser
iamzhihuix/happy-claude-skills
Minimal Chrome DevTools Protocol tools for browser automation and scraping. Use when you need to start Chrome, navigate pages, execute JavaScript, take screenshots, or interactively pick DOM elements. Triggers include "browse website", "scrape page", "take screenshot", "automate browser", "extract DOM", "web scraping".
video-processor
iamzhihuix/happy-claude-skills
Download and process videos from YouTube and other platforms. Supports video download, audio extraction, format conversion (mp4, webm), and Whisper transcription. Use when user mentions YouTube download, video conversion, audio extraction, transcription, mp4, webm, ffmpeg, yt-dlp, or whisper transcription.
happy-video-gen
iamzhihuix/happy-claude-skills
Open the skill to read its SKILL.md instructions.
happy-dreamina
iamzhihuix/happy-claude-skills
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