image-gen — anti-slop image gen
Caution
Raw prompts produce AI-looking images. Symmetrical faces, plastic skin, impossible reflections, airbrushed gradients — the usual tells. The skill applies a style-matched anti-slop prefix automatically so you don’t have to fight defaults every time.
Tip
Fast path: just type a prompt. No flags needed — the skill picks Gemini Imagen 4, photo style, 1024×1024, and goes. Only asks questions when something is genuinely missing (API key, or you passed --count/--style flags explicitly).
Quick reference
| Field | Value |
|---|---|
| Command | /brewui:image-gen |
| Arguments | [prompt] [--edit image.png 'instructions'] [--config] [--update] [--service] [--style] [--count N] [--output dir] [--size WxH] |
| Model | haiku |
| Tools | Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion, WebSearch |
| Output | PNG files + sidecar JSON metadata in .claude/reports/images/ |
When to use
- Quick OG image —
"minimalist tech blog header, dark mode, purple accents"and done - Batch variations —
--count 4to compare options before committing to one - Edit an existing image —
--edit hero.png "remove background, add soft shadow"(Gemini + OpenAI only) - Cost-conscious iteration — use OpenRouter Gemini 2.5 Flash (~$0.001) for drafts, switch to GLM-image or Imagen 4 for finals
- API key setup —
--configwalks through key entry, validation, and storage once
Examples
# Default: Gemini Imagen 4, photo style, 1024×1024
/brewui:image-gen "developer at a standing desk, morning light through large windows"
# Illustration style, custom provider
/brewui:image-gen --style illustration --service zai "tech blog header, geometric shapes, dark background"
# Edit an existing image (Gemini or OpenAI only)
/brewui:image-gen --edit ./hero.png "remove the background, increase contrast"
Providers
| Provider | Model | Speed | Quality | Cost |
|---|---|---|---|---|
gemini (default) | Imagen 4 | Fast | Very High | Paid plan required |
openrouter | Gemini 2.5 Flash Image | Fast | High | ~$0.001/image |
openrouter-gpt5 | GPT-5 Image | Medium | Highest | ~$0.01/image |
zai | GLM-image | Fast | Very High | ~$0.015/image |
openai | DALL-E 3 | Medium | High | $0.04–0.12/image |
Edit support: gemini (native), openai (DALL-E 2 fallback). OpenRouter redirects to a supported provider.
Flow
- Parse arguments
Runs
parse-args.shto extract flags. Detects mode from explicit flags first, then natural language signals (“edit this”, “configure key”), then defaults to generate. - Resolve API key
Checks in order: inline in prompt text →
.env→ shell environment variable → interactive config (Phase C). Stops here if no key is found and guides setup. - Fast-path or gather params
Prompt provided, no extra flags? Skip count/service/style/output questions — use defaults straight away. Explicit flags or missing prompt triggers targeted questions only.
- Build enhanced prompt
Loads the anti-slop prefix for the chosen style from
references/anti-slop.md, prepends it to your prompt, then constructs the provider JSON payload. - Send request & save
Calls the provider API, parses base64 or URL response, saves each image as
kebab-title-NNN.pngwith a sidecar.json(prompt, service, style, size, timestamp, cost estimate). - Report & offer next action
Prints a results table with file paths, provider, cost estimate. Asks: generate more, different prompt, edit one, or done.
Full provider matrix, anti-slop rules, and parameter reference
Anti-slop prefixes by style
| Style | Enforces | Bans |
|---|---|---|
photo | Real lighting physics, correct anatomy, natural material textures, depth of field | Plastic skin, impossible reflections, symmetrical faces |
illustration | Clean line work, proper color theory, organic imperfections, consistent style | Airbrushed gradients, floating elements, generic clip-art feel |
art | Unified brushwork, intentional composition, coherent color temperature, visible technique | Mixed-media confusion, over-processed look |
All parameters
| Parameter | Default | Options | Description |
|---|---|---|---|
--service | gemini | gemini, openrouter, openrouter-gpt5, zai, openai | Provider |
--style | photo | photo, illustration, art | Anti-slop preset |
--count | 1 | 1–10 | Images per generation (DALL-E 3: sequential requests) |
--size | 1024x1024 | WxH | Image dimensions |
--output | .claude/reports/images/ | Directory path | Save location |
--edit | — | <image.png> 'instructions' | Edit mode |
--config | — | — | API key setup |
--update | — | — | Check providers for latest models/pricing |
API key priority
- Explicit key pasted in prompt text
.envin project root (source .env)- Shell environment variable
- Interactive config (Phase C)
For team projects use .env (add to .gitignore). For personal use ~/.zshrc works well.
Update mode
Runs WebSearch for each provider’s latest models and pricing, compares against references/providers.md, and offers to update the file if changes are detected.
GLM Design to Code
Turn images, HTML, or URLs into multi-framework code using GLM vision.
GitHub source
Source code, anti-slop references, and provider specs.
Brewui overview
All brewui skills in one place.
Updating plugins
/brewtools:plugin-update to check and update the brewcode plugin suite in one command.
See the FAQ for details.