Auto-generate brand-aligned images for frontend projects, directly from Claude Code. A plugin marketplace by Desima-AP.
Stop hand-crafting prompts for every missing <img> and CSS background-image. This plugin watches your frontend code as you edit, catches placeholder URLs, empty src="", broken local imports, and TODO comments about images, then — when you ask — generates real, on-brand assets, post-processes them to exact target dimensions, and wires them into the source files.
Works with JSX, TSX, HTML, CSS, SCSS, Vue, Svelte, Astro, MDX. Picks palette and mood from tailwind.config.* / package.json / README.md / your main layout automatically.
The banner above was generated by this plugin, calling the
autoimagepipeline against an empty project — one prompt, one provider (gpt-image-1.5, auto-fallback fromgpt-image-2while org verification is pending), post-processed to 1920×1080 and a 1280×640 social-preview variant.$0.025round-trip.
/plugin marketplace add github:Desima-AP/autoimage-claude
/plugin install autoimage@desima-plugins
Then restart or /reload-plugins. Confirm with /help — you should see autoimage:auto-image among the skills and the three slash commands below.
Pillow (pip install Pillow)OPENAI_API_KEY and/or GEMINI_API_KEY (both is best). See how to get them.rembg for transparent-PNG output when using Gemini (OpenAI does it natively).Verify setup:
python3 ~/.claude/plugins/cache/desima-plugins/autoimage/<version>/scripts/setup.py
Once installed, you work normally. The plugin runs in two modes:
Background (automatic, scan-only). Every time you Edit / Write / MultiEdit a frontend file, a PostToolUse hook scans it for:
src="", src='', src={""}picsum.photos, via.placeholder.com, placehold.co, dummyimage.com, placekitten, source.unsplash.com, loremflickr, fakeimg.pl, etc../missing.png, /images/not-there.webp)TODO / FIXME comments mentioning an imageFindings land in .claude/pending-assets.json. No API calls. No surprise billing. No workflow interruption.
Foreground (on-demand, generate). Say one of these and the skill kicks in:
"dobierz obrazy do strony" "przygotuj brakujące obrazy" "fill the missing images" "generate the placeholders" "make images that match the brand" "prepare assets for this page"
Claude then:
PNG + WebP..claude/generation-log.csv.Both providers can generate every asset type. The plugin never silently splits a batch between OpenAI and Gemini — mixing two models within one project causes inconsistent aesthetics, which is something you should opt into explicitly.
Resolution order:
--provider openai|gemini on the CLI..claude/brand-preset.json → preferred_provider ("openai" / "gemini" / null).OPENAI_API_KEY / GEMINI_API_KEY is set, use that.Informational warnings still surface (e.g. "this asset has readable text; gpt-image-2 renders baked-in text more reliably"), but they never override your choice.
gpt-image-2 (OpenAI) |
gemini-3.1-flash-image-preview (Google) |
|
|---|---|---|
| Baked-in text | Very reliable | Often misspells |
| Native transparency | Yes (background=transparent) |
No (needs rembg) |
| Cost / image (1024² high) | $0.019 | $0.039 |
| Free tier | No (needs $5 billing min.) | Yes |
| Aspect ratios | 3 fixed sizes | 7 aspect ratios |
/design-scan — full project audit of missing assets, summary, optional batch generation./design-regen <name_or_regex> [extra guidance] — force-regenerate a specific asset (overwrites existing file)./design-brand [show|detect|reset|provider <openai|gemini|null>] — interactive editor for .claude/brand-preset.json, including preferred_provider.gpt-image-2, with automatic fallback)gpt-image-2. Propagates in ~15 minutes.Without verification, the plugin automatically falls back to gpt-image-1.5, then gpt-image-1 — same request schema, same post-processing, slightly different rendering style. The log records which model actually produced each image.
Cost: $0.019 per 1024² high-quality image on gpt-image-2; gpt-image-1.5 has the same pricing; gpt-image-1 is roughly 2× more expensive.
gemini-3.1-flash-image-preview)Cost beyond free tier: $0.039 per image.
The plugin reads, in this order:
export OPENAI_API_KEY=...)..env in the current project directory.# in your project root
cat >> .env <<EOF
OPENAI_API_KEY=sk-proj-...
GEMINI_API_KEY=AIzaSy...
EOF
echo ".env" >> .gitignore
$CLAUDE_PROJECT_DIR/.claude/)| File | Purpose |
|---|---|
pending-assets.json |
Queue of detected missing / placeholder assets |
brand-preset.json |
Detected brand (palette, mood, typography, tone, preferred_provider) — editable |
generation-log.csv |
One row per generation: timestamp, target, model, prompt, cost est., sha256 |
| Name pattern | Target | Notes |
|---|---|---|
hero*, banner* |
1920×1080 | Upscaled from 1536×1024 |
og*, og-image* |
1200×630 | Centre-cropped |
icon* |
512×512 transparent | Native or rembg |
avatar* |
512×512 | Portrait framing |
feature*, card* |
1024×768 | |
bg-*, background* |
1920×1080 | High quality, low-contrast |
thumb* |
1280×720 | |
logo* |
1024×1024 transparent | |
| default | 1024×1024 |
| Name | Status | Description |
|---|---|---|
autoimage |
0.2.1 | Auto-generate brand-aligned images for frontend projects |
More plugins from Desima-AP will land here over time — autocopy-claude, autoseo-claude, and friends are in the queue.
git clone [email protected]:Desima-AP/autoimage-claude.git
cd autoimage-claude
claude --plugin-dir ./plugins/autoimage
Run the test suite:
cd plugins/autoimage
python3 -m unittest discover -s tests
Environment check:
python3 plugins/autoimage/scripts/setup.py
Issues and pull requests welcome. For a meaningful change, please open an issue first — especially for model additions, new hint types, or output-convention changes.