---
name: asset-enhancer
description: Classify a software-asset brief (logo, app icon, favicon, OG image, illustration, splash, icon pack, transparent mark), route to the right image model, rewrite the prompt in the target model's dialect, pick an execution mode (inline_svg / external_prompt_only / api) based on what's actually available, and run the pipeline. Use whenever the user asks for any visual asset for a software product.
trigger_phrases:
- generate a logo
- make an app icon
- create a favicon
- og image for
- illustration for
- splash screen
- icon pack
- transparent png
- transparent background
- vectorize
- convert to svg
- brand assets
---
# asset-enhancer skill
Comprehensive behavior spec for producing production-grade software-development assets. Drives every `asset_*` MCP tool.
## Cardinal rules
> 1. Producing production-grade software assets is a **routing + post-processing** problem, not a prompt-engineering problem.
> 2. The user may not have an image-model API key. The plugin must work anyway.
> 3. There are real zero-key and free-token paths — always surface them first before asking the user to pay for anything. The `free_api.routes` block in `asset_capabilities()` enumerates the ranked free programmatic routes: Cloudflare Workers AI (Flux-1-Schnell + SDXL, 10k neurons/day), NVIDIA NIM (Flux / SDXL / SANA, 1k requests/month with `NVIDIA_API_KEY`, no card), HF Inference (free `HF_TOKEN`), Stable Horde (anonymous queue), Pollinations (zero-signup HTTP, last resort), and local ComfyUI. **Google's Gemini / Imagen image API is paid for programmatic image output** — unbilled `GEMINI_API_KEY` → HTTP 429, `limit: 0`. The AI Studio **web UI** at https://aistudio.google.com is still free for interactive generation — treat it as a paste-only flow (`external_prompt_only` → `asset_ingest_external`).
See `rules/asset-enhancer-activate.md` for the condensed always-on version. This file is the long-form spec.
## Three execution modes
Before generating anything, decide (with the user) which mode to use. Call `asset_capabilities()` to learn what's available in the current environment.
### 1. `inline_svg` — zero key, Claude writes the SVG, server persists
Two-step round trip:
1. The server returns an `svg_brief` (viewBox, palette, path budget, style hints, skeleton) and `instructions_to_host_llm`. You emit the `` inline in your reply as a ```svg code block so the user can see it.
2. **Immediately after emitting, call `asset_save_inline_svg({ svg, asset_type })`.** The server validates the SVG against the brief (viewBox, `` count, palette), writes `master.svg` to disk, and — for favicon / app_icon — runs the full platform export (favicon.ico + apple-touch-icon + PWA 192/512/512-maskable; or AppIconSet + Android adaptive + PWA). Returns an `AssetBundle` with `variants[].path`. Show those paths to the user.
Skip step 2 and the user gets a code block with no file. Do not skip step 2.
**Good for:** `logo`, `favicon`, `icon_pack`, `sticker`, `transparent_mark`, simple `app_icon` masters. Flat, geometric, ≤40 paths.
**Not good for:** illustrations, hero art, photoreal, OG cards with web-font typography.
### 2. `external_prompt_only` — zero key, user pastes into a web UI
The server returns the dialect-correct prompt + a list of paste targets with URLs in **free-first order**: AI Studio **web UI** (https://aistudio.google.com — free interactive Gemini / Imagen), Pollinations (zero-signup HTTP), HF Inference (free `HF_TOKEN`), Stable Horde (anonymous queue), then paid UIs (Ideogram web, Recraft web, Midjourney, fal.ai Flux, BFL Playground, OpenAI Platform Playground, etc.). The user generates elsewhere, saves the image locally, and calls `asset_ingest_external({ image_path, asset_type })` to run the matte / vectorize / validate pipeline.
Note: `GEMINI_API_KEY` does NOT give free image-gen — Google removed that tier in December 2025. The free Gemini/Imagen route is the AI Studio web UI, not the API.
**Good for:** any asset type. Best for `illustration`, `hero`, text-heavy logos, when the user has a Midjourney / Ideogram subscription but no API key.
### 3. `api` — requires a provider key
Server calls the routed provider directly, mattes, vectorizes, exports, validates. Writes a content-addressed `AssetBundle` with `variants[].path` for every artifact.
**Requires** at least one of: `OPENAI_API_KEY`, `IDEOGRAM_API_KEY`, `RECRAFT_API_KEY`, `BFL_API_KEY`, `GEMINI_API_KEY` (or `GOOGLE_API_KEY`). The router falls back among configured providers automatically.
## Recommended flow
```
user brief
↓ asset_capabilities() → what's available RIGHT NOW
↓ asset_enhance_prompt({ brief }) → AssetSpec + modes_available
↓ ask the user which mode they want
↓ asset_generate_({ brief, mode }) → InlineSvgPlan | ExternalPromptPlan | AssetBundle
↓ if inline_svg:
1. emit