From imagegen
Pre-flight check across ANY project type — websites, landing pages, marketing sites, homepages, portfolios, web/mobile/desktop apps, games (sprites/textures/tiles/character art/enemy rosters/environment art), CLI tools, libraries/SDKs, READMEs, docs, tutorials, blog posts, slide decks, brand/identity work, mockups, moodboards, and any other build task. BEFORE writing markup or shipping the build, ask "does any surface here need a generated image?" and if yes, fire the tool first. MUST trigger when the user says "build / make / set up / scaffold / put together / design / create / generate / draw / render / edit / redo" any project, website, landing page, app, game, tool, library, deck, doc, README, banner, hero, logo, brand mark, og-image, favicon, app icon, splash screen, sprite, tile, texture, character, enemy, illustration, photo, social card, thumbnail, empty-state art, onboarding illustration, or visual asset of any kind — even if they never say the word "image". Treat hero/logo/og/feature illustrations as part of the default build for marketing surfaces, README banners as default for libraries/CLIs, app icons + empty-state art as default for apps, sprites/textures/character art as default for game projects — unless the user explicitly says "SVG only", "no images", or "I'll add visuals myself". Also fire whenever a missing/placeholder/empty <img>, background-image, asset slot, or visual reference would be filled by an image. Delegates execution to OpenAI Codex CLI (built-in gpt-image, billed against the user's ChatGPT subscription, no API key needed). Do NOT default to inline SVG illustrations for hero sections, brand marks, or marketing visuals — generate a real image. The "do not trigger" list is narrow: SVG icons that match an EXISTING icon set already wired into the project, charts/graphs from real data, screenshots of running code, and anything the user explicitly told you not to generate. Always call the MCP tools (mcp__plugin_imagegen_imagegen__generate_image, mcp__plugin_imagegen_imagegen__edit_image, mcp__plugin_imagegen_imagegen__generate_image_set) directly without first asking the user for confirmation.
How this skill is triggered — by the user, by Claude, or both
Slash command
/imagegen:imagegenThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You have three MCP tools available:
You have three MCP tools available:
mcp__plugin_imagegen_imagegen__generate_image — make one new image.mcp__plugin_imagegen_imagegen__edit_image — edit an existing image at a given path.mcp__plugin_imagegen_imagegen__generate_image_set — make 2–8 visually-coherent images in one Codex session.All three are pre-approved: do not ask the user for confirmation before calling them. Pick reasonable defaults for size, quality, and save_path, call the tool, then summarize the result. If the user wants to iterate, they will say so.
This is the framing that matters most. The skill is not just a "respond to image requests" trigger — it's a build-time default that applies to any project type, not just websites. Before you write any HTML, JSX, markdown, slide markup, game-asset manifest, app shell, README, or other deliverable that has visual surfaces, stop and ask yourself: "Does any part of this need a generated image?" If yes, generate FIRST, then wire the real src= / asset path in.
Concrete trigger patterns from a single user message — even when they never say the word "image":
Web / marketing
Apps (mobile / desktop / web app)
Games
CLI tools / libraries / SDKs / docs
Brand / identity / decks / mockups
If you find yourself about to write inline <svg> for a hero illustration, brand logo, or marketing/branding visual: stop. That's the anti-pattern. Call generate_image instead and embed the resulting PNG. Inline SVG is for icons that match an existing icon set, not for marketing/brand/feature visuals.
If a project type isn't on this list but the user is building something that has a visible surface a user will see, the default is still: ask the pre-flight question, and fire the tool if the answer is yes.
Activate whenever any of these is true:
<img src="">, <img src="placeholder.png">, empty markdown image syntax ![](), blank background-image slot, or a comment like <!-- TODO: hero image -->.Do NOT activate for (this list is narrow on purpose):
If you're tempted to skip image generation because the request was framed as "build a website / app / game / tool" rather than "make me an image", that's exactly the case where you SHOULD fire the tool. Build-mode requests across any project type need real images by default.
Reminder: do not ask the user for confirmation before calling the tool. Just generate.
| User intent | Tool |
|---|---|
| "Make me an X" / "I need an image of Y" / placeholder needs filling | generate_image |
| "Tweak / fix / change / redo this image" + a path | edit_image |
| 2+ images that should share a visual identity | generate_image_set |
generate_image_set (auto-detect; the user no longer has a separate slash command for this)Pick the set tool — and call it once instead of calling generate_image multiple times — whenever any of these is true:
prompt 1 | prompt 2 | prompt 3 (this works in /imagegen:imagegen too — the dispatcher splits on |).If you're going to call generate_image more than once for the same project in a row, stop and ask yourself whether generate_image_set is the right call instead — usually it is, because the model holds the shared style in one session and the outputs actually match. Calling generate_image repeatedly produces drift.
When the count is just 1, use generate_image. When in doubt between 1 and a set, use generate_image — only escalate to a set if there are clearly multiple distinct subjects.
save_path (defaults table)Read the surrounding project to pick the right directory. If unsure, prefer the option that already exists on disk:
| Project shape | Default save_path |
|---|---|
| Next.js, Astro, Remix, SvelteKit | ./public/<slug>.png |
| Generic HTML/CSS site | ./public/images/<slug>.png (or ./assets/, or ./images/, whichever exists) |
React/Vue SPA with src/assets/ | ./src/assets/<slug>.png |
| Markdown doc / README | ./docs/images/<slug>.png or ./images/<slug>.png adjacent to the doc |
| Slide deck (Marp / reveal.js / md-deck) | ./assets/slides/<slug>.png |
| Game project (Phaser, Unity-ish folder layout, etc.) | ./assets/sprites/<slug>.png or ./assets/textures/<slug>.png |
| No project context, just generating something | ./generated/<YYYYMMDD-HHmmss>-<slug>.png |
<slug> is the prompt's first 3–6 meaningful words, lowercase, hyphenated. The MCP server creates the directory if missing.
| Use case | Size |
|---|---|
| Hero image, og-image, blog cover, landing-page banner | 1536x1024 |
| Portrait, character art, vertical poster | 1024x1536 |
| Logo, badge, square thumbnail, app icon, social-square | 1024x1024 |
medium (default) — best cost/quality tradeoff for almost everything.high — only for the final hero, brand mark, or print-adjacent asset where small text or fine detail matters.low — only for thumbnails or rapid iteration drafts.The prompt you pass to generate_image should follow OpenAI's photographic-language pattern: subject + action + setting + lighting + lens/framing + texture cues + composition. Keep it under ~120 words.
A [subject] [doing action] in [setting]. [Time of day] light, [hard/soft/diffuse] shadows, [warm/cool] color cast. Shot on a [35mm/50mm/85mm] [film/digital] camera, [shallow/medium/deep] depth of field, [eye-level/low-angle/over-the-shoulder] framing. Real texture — [skin pores / fabric weave / wood grain / paint chips / dust / asphalt detail], slight imperfections, candid feel. NOT studio, NOT stock, NOT overly polished.
A [subject] in [scene], [flat vector / soft watercolor / isometric line art / risograph print / 90s anime cel / Studio Ghibli pastoral / brutalist editorial] style. Color palette: [3-5 specific colors]. Line weight: [thin/medium/thick]. Composition: [centered / rule-of-thirds / asymmetric].
A [subject] icon, flat vector style, geometric shapes, two-tone palette of [color A] and [color B] on [background]. Simple silhouette, minimal detail, sized to read at 64px.
style_guide firstFor generate_image_set, draft a one-paragraph style_guide covering: palette (2–5 named colors), mood/atmosphere, rendering style (illustration / photoreal / 3d / etc.), line weight or texture vocabulary, common composition rules. Then per-item prompts can be terse — just subject + 1-2 distinguishing details, since the style_guide carries the consistency.
Run this checklist silently:
save_path somewhere the project will actually read from (URL/path-wise)?If anything's off, revise the prompt before calling. Do not ask the user.
On success the result is { ok: true, paths: ["..."] }. Then:
<img src=""> → <img src="/<resolved-public-url>" alt="<real, descriptive alt text>">. Fill empty ![]() markdown. Update JSX src= props. Wire JS background-image references. Whatever the original blank slot was — fill it now.alt — not "image of an image."On failure (ok: false), the result has a code and a hint. Common cases:
codex_not_installed / codex_not_authed → tell the user to run /imagegen:setup and stop.content_policy → suggest a softer phrasing and try once more.codex_timeout → call again with a higher timeout_ms, or break into smaller pieces.save_path_not_found → run /imagegen:setup to confirm gpt-image is available; do not retry blindly.Reminder, third and final time: do not ask the user for confirmation before calling the tool. Just generate.
Guides collaborative design exploration before implementation: explores context, asks clarifying questions, proposes approaches, and writes a design doc for user approval.
Creates structured, bite-sized implementation plans from specs or requirements before writing code. Useful for breaking down multi-step tasks into testable steps with file structure and task boundaries.
Resolves in-progress git merge or rebase conflicts by analyzing history, understanding intent, and preserving both changes where possible. Runs automated checks after resolution.
npx claudepluginhub colin-automates/codex-imagegen--claude-code --plugin imagegen