image-gen
- Group: Front end and design
- When it activates: Generating AI images that match the website: floating product, heroes, backgrounds, 3D, mockups, textures (gpt-image in Codex, Nano Banana in Antigravity, multi-provider script)
- Requires:
ui-ux-pro-max - Installed: In projects with a frontend profile.
Generates images that match the website (never generic): the palette, mood and style come from
senzu/design-system/<slug>/MASTER.md (or BRAND.md) and go into the prompt. Recipes per image type in
references/prompt-recipes.md; which tool depending on your agent in references/tools-by-agent.md.
1. RULE 0 — does your environment already generate images? Use it directly, no script
Section titled “1. RULE 0 — does your environment already generate images? Use it directly, no script”Check FIRST whether the host has native generation; if it does, give it the recipe’s prompt as is and skip the script (faster, no keys, no extra processing):
| Environment | How it generates |
|---|---|
| ChatGPT/Codex app (Windows/Mac: agent + chat + images) | NATIVE: generates the image directly with the recipe’s prompt. Do NOT look for the API or the script |
| Antigravity | NATIVE: Nano Banana Pro (Gemini 3 Pro Image) built into the IDE; recipe prompt directly |
| Codex CLI / Claude Code / Cursor / Windsurf (no native generation) | node <skills-dir>/image-gen/scripts/generate.mjs "<prompt>" — --provider openai (default, OPENAI_API_KEY) | gemini | fal |
Native or script, the rest of the skill applies EQUALLY: recipe + design system tokens + post-processing.
No native generation and no key → tell the user which one to export (OPENAI_API_KEY/GEMINI_API_KEY/FAL_KEY)
and do NOT improvise stock images as if they were generated.
2. Mandatory flow
Section titled “2. Mandatory flow”- Image brief (1 line each): which section it is for, type (floating product, hero bg, mockup, 3D, texture, illustration), what it must convey, and where it goes (size/aspect of the REAL slot in the layout).
- Tokens → words: turn the design system palette into prompt language (“deep green #046a53 and mint accents, dark charcoal background”) + the MASTER.md mood (“clean, industrial, trustworthy”). The image must look like it belongs to the SAME site as everything else.
- Recipe: open ONLY the type’s section in
references/prompt-recipes.mdand fill in its template. - Generate (2-3 variants):
node scripts/generate.mjs "<prompt>" --size 1536x1024 --n 2 --out hero.png. - Post-processing: crop/cleanup, compressed WebP/AVIF (squoosh/sharp), exact dimensions of the
slot, descriptive
alt. Transparent backgrounds:--background transparent(openai) or remove.bg. - Verify consistency: put it ON the page alongside everything else (do not judge it on its own) and run
ui-verify.
3. Which model for what (if you can choose the provider)
Section titled “3. Which model for what (if you can choose the provider)”| You need | Use |
|---|---|
| Follow fine style/palette instructions, edit an existing image | gpt-image (openai) — the script’s default |
| Pure photorealism (product, “real photos”) | FLUX (--provider fal) or Imagen/Nano Banana |
| Legible text INSIDE the image (banners with a claim) | Ideogram (via fal) or Nano Banana Pro |
| Icons, vector illustration, brand system | Recraft V3 (via its own API/fal) — consistent style |
| UI mockups to show the client | Antigravity + Nano Banana Pro (makes them natively) |
4. Hard rules
Section titled “4. Hard rules”- No AI images pretending to be the client’s real ones: their work, their team or their premises are photographed, not generated. An AI image of a “team at work” is used as a generic resource and noted in the devlog.
- Generated people: no faces of real/famous people; be careful with hands and text (always review).
- No third-party logos or brands inside the image; the client’s logo is composed afterwards, in HTML/SVG.
- Series consistency: same recipe + same lighting/palette descriptors for all the website’s images;
save the prompts used in
senzu/design-system/<slug>/prompts.mdto reuse them. - Every image goes through compression and carries dimensions +
alt; the hero also getsfetchpriority="high". - Cost: gpt-image ~$0.02-0.19/image depending on quality — generate 2-3 variants, not 20.
5. Resources
Section titled “5. Resources”scripts/generate.mjs— multi-provider generator (openai by default; gemini, fal).--helpfor options.references/prompt-recipes.md— recipes per type with templates (floating product, hero, 3D, mockup…).references/tools-by-agent.md— details per agent, models, prices and post-processing.