Generate images using multiple AI models — Midjourney (via Legnext.ai), Flux, Nano Banana Pro (Gemini), Ideogram, Recraft, and more via fal.ai. Intelligently...
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install image-gen或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install image-gen⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/image-gen/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: image-gen description: Generate images using multiple AI models — Midjourney (via Legnext.ai), Flux, Nano Banana Pro (Gemini), Ideogram, Recraft, and more via fal.ai. Intelligently routes to the best model based on use case. homepage: https://legnext.ai metadata: {"openclaw":{"emoji":"🎨","primaryEnv":"FAL_KEY","requires":{"env":["FAL_KEY","LEGNEXT_KEY"]},"install":[{"id":"node","kind":"node","package":"@fal-ai/client","label":"Install fal.ai client (npm)"}]}} ---
This skill generates images using the best AI model for each use case. Model selection is the most important decision — read the dispatch logic carefully before generating.
---
Always select the model based on the user's actual need, not just the request surface.
Does the request involve MULTIPLE images that share characters, scenes, or story continuity?
├─ YES → Use NANO BANANA (Gemini)
│ Reason: Gemini understands context holistically; supports reference_images
│ for character/scene consistency across a series (storyboard, comic, sequence)
│
└─ NO → Is it a SINGLE standalone image?
├─ Artistic / cinematic / painterly / highly detailed?
│ → Use MIDJOURNEY
│
├─ Photorealistic / portrait / product photo?
│ → Use FLUX PRO
│
├─ Contains TEXT (logo, poster, sign, infographic)?
│ → Use IDEOGRAM
│
├─ Vector / icon / flat design / brand asset?
│ → Use RECRAFT
│
├─ Quick draft / fast iteration (speed priority)?
│ → Use FLUX SCHNELL (<2s)
│
└─ General purpose / balanced?
→ Use FLUX DEV
| Model | ID | Artistic | Photorealism | Text | Context Continuity | Speed | Cost | |---|---|---|---|---|---|---|---| | Midjourney | midjourney | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐ | ❌ (no context) | ~30s | ~$0.05 | | Nano Banana Pro | nano-banana | ⭐⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ | ~20s | $0.15 | | Flux Pro | flux-pro | ⭐⭐⭐ | ⭐⭐⭐⭐⭐ | ⭐⭐⭐ | ❌ | ~5s | ~$0.05 | | Flux Dev | flux-dev | ⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐ | ❌ | ~8s | ~$0.03 | | Flux Schnell | flux-schnell | ⭐⭐ | ⭐⭐⭐ | ⭐⭐ | ❌ | <2s | ~$0.003 | | Ideogram v3 | ideogram | ⭐⭐⭐ | ⭐⭐⭐ | ⭐⭐⭐⭐⭐ | ❌ | ~10s | ~$0.08 | | Recraft v3 | recraft | ⭐⭐⭐⭐ | ⭐⭐ | ⭐⭐⭐⭐ | ❌ | ~8s | ~$0.04 | | SDXL Lightning | sdxl | ⭐⭐⭐ | ⭐⭐⭐ | ⭐⭐ | ❌ | ~3s | ~$0.01 |
Use Nano Banana whenever the user's request involves:
Nano Banana uses Google's Gemini 3 Pro multimodal architecture, which understands context holistically rather than keyword-matching. It supports up to 14 reference images for maintaining character and scene consistency.
---
exec tool with sufficient timeout.---
node {baseDir}/generate.js \
--model <model_id> \
--prompt "<enhanced prompt>" \
[--aspect-ratio <ratio>] \
[--num-images <1-4>] \
[--negative-prompt "<negative prompt>"] \
[--reference-images "<url1,url2,...>"]
Parameters:
--model: One of midjourney, flux-pro, flux-dev, flux-schnell, sdxl, nano-banana, ideogram, recraft--prompt: The image generation prompt (required)--aspect-ratio: e.g. 16:9, 1:1, 9:16, 4:3, 3:4 (default: 1:1)--num-images: 1-4 (default: 1; Midjourney always returns 4 regardless)--negative-prompt: Things to avoid (not supported by Midjourney)--reference-images: Comma-separated image URLs for context/character consistency (Nano Banana only)--mode: Midjourney speed: turbo (default, ~20-40s), fast (~30-60s), relax (free but slow)exec timeout: Set at least 120 seconds for Midjourney and Nano Banana; 30 seconds is sufficient for Flux Schnell.
---
Always use sync mode (no --async). The script waits internally until complete.
node {baseDir}/generate.js \
--model midjourney \
--prompt "<enhanced prompt>" \
--aspect-ratio 16:9
{
"success": true,
"model": "midjourney",
"jobId": "xxxxxxxx-...",
"imageUrl": "https://cdn.legnext.ai/temp/....png",
"imageUrls": [
"https://cdn.legnext.ai/mj/xxxx_0.png",
"https://cdn.legnext.ai/mj/xxxx_1.png",
"https://cdn.legnext.ai/mj/xxxx_2.png",
"https://cdn.legnext.ai/mj/xxxx_3.png"
]
}
CRITICAL — image field meanings:
| Field | What it is | When to use | |---|---|---| | imageUrl | A 2×2 grid composite of all 4 images | Send as preview so user can see all options | | imageUrls[0] | Image 1 (top-left) | Send when user wants image 1 | | imageUrls[1] | Image 2 (top-right) | Send when user wants image 2 | | imageUrls[2] | Image 3 (bottom-left) | Send when user wants image 3 | | imageUrls[3] | Image 4 (bottom-right) | Send when user wants image 4 |
"放大第N张" / "要第N张" / "give me image N" = send imageUrls[N-1] directly. Do NOT call generate.js again.
After generation: > 🎨 生成完成!这是 4 张图的预览: > 预览图 > 你喜欢哪一张?回复 1、2、3 或 4,我直接发给你高清单图。
When user picks image N: > 这是第 N 张的单独高清图: > 图片 N
---
Use for storyboards, character series, and any context-dependent multi-image generation.
node {baseDir}/generate.js \
--model nano-banana \
--prompt "<detailed scene description>" \
--aspect-ratio 16:9
node {baseDir}/generate.js \
--model nano-banana \
--prompt "<scene description, referencing the character/style from the reference images>" \
--aspect-ratio 16:9 \
--reference-images "https://url-of-previous-image-1.png,https://url-of-previous-image-2.png"
How to build a storyboard series:
--reference-images for the second frameExample storyboard workflow:
Frame 1: node generate.js --model nano-banana --prompt "A young girl with red hair, wearing a blue dress, sitting under a magical treehouse in an enchanted forest, warm golden light, storybook illustration style" --aspect-ratio 16:9
Frame 2: node generate.js --model nano-banana --prompt "The same red-haired girl in blue dress climbing the rope ladder up to the treehouse, excited expression, enchanted forest background, same storybook illustration style" --aspect-ratio 16:9 --reference-images "<frame1_url>"
...安装 Image Gen 后,可以对 AI 说这些话来触发它
Help me get started with Image Gen
Explains what Image Gen does, walks through the setup, and runs a quick demo based on your current project
Use Image Gen to generate images using multiple AI models — Midjourney (via Legnext
Invokes Image Gen with the right parameters and returns the result directly in the conversation
What can I do with Image Gen in my design & creative workflow?
Lists the top use cases for Image Gen, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/image-gen/ 目录(个人级,所有项目可用),或 .claude/skills/image-gen/(项目级)。重启 AI 客户端后,用 /image-gen 主动调用,或让 AI 根据上下文自动发现并使用。
Image Gen 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Image Gen 可免费安装使用。请查阅仓库了解许可证信息。
Generate images using multiple AI models — Midjourney (via Legnext.ai), Flux, Nano Banana Pro (Gemini), Ideogram, Recraft, and more via fal.ai. Intelligently...
Image Gen 属于「Design & Creative」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my design & creative tasks using Image Gen
Identifies repetitive steps in your workflow and sets up Image Gen to handle them automatically