--- name: icon-forge description: Generate brand icons as SVG and produce all platform assets including favicon package (ICO, SVG with dark mode, apple-touch-icon), PWA manifest icons, and mobile app icons. Use when user runs /icon-forge, requests "brand icon", "favicon generation", "app icon", or "svg logo" for a project. allowed-tools: Bash(uv run *) argument-hint: "[brand description or --svg or --base ]" --- # Icon Forge Generate brand icons as SVG and produce all required platform assets from a single source. ## Quick Start Follow these phases in order. Skip to Phase 4 if user provides `--svg `. Use `--base ` to load an existing SVG as a design seed for Phase 2 iteration. ### Phase 1: Brand Discovery Gather brand information before designing. Ask about: - **Identity**: Brand name, industry, tagline - **Concept**: Visual metaphor, abstract vs literal, symbol ideas - **Colors**: Primary color (hex), secondary, accent - **Style preset**: Present the style menu: 1. **Geometric** — clean shapes, mathematical precision 2. **Organic** — flowing curves, irregular blobs, natural asymmetry 3. **Illustrative** — layered scenes, color blocks, story-driven 4. **Symbolic** — dual-meaning line art, negative space, conceptual merges 5. **Constellation** — connected nodes, network graphs, dot clusters - **Depth**: Flat (default) or with gradients/shadows? If `$ARGUMENTS` contains a brand description, extract info and minimize questions. ### Phase 2: Design Master SVG Generate 2-3 concept variations as SVG. Apply the chosen style preset's SVG techniques from [WORKFLOW.md](WORKFLOW.md) (see Style-to-SVG Technique Table). Design for three progressive detail tiers: Glyph (16px, 2-4 shapes), Mark (192px, full logomark), Master (1024px, rich detail). Present concepts, let user choose, iterate. **If `--base ` was provided**: Read the existing SVG, analyze its shapes/colors/structure, and use it as a starting point instead of generating from scratch. Present the original alongside 2 improved variations that apply the chosen style preset. See [WORKFLOW.md](WORKFLOW.md) "Design Seed Workflow" for details. **SVG structure requirements:** ```xml Brand Name ``` **Validation checklist:** - viewBox is square (`0 0 100 100` brand icons; `0 0 24 24` for UI-style marks) - No `width`/`height` attributes on root `` - `` as first child, `role="img"` on root (accessibility) - No `` elements (text does not scale to 16px) - Filled shapes on integer coordinates (prevents sub-pixel blur) - No strokes thinner than 2 units in Glyph/Mark tiers - Color count within preset limit (1-3 most; up to 5 Illustrative/Constellation) - `xmlns` attribute present ### Phase 3: Create Dark-Mode Favicon SVG Duplicate the master SVG and embed a `@media (prefers-color-scheme: dark)` block: ```xml Brand Name ``` Rules: dark foreground becomes light, light backgrounds become dark, maintain >= 4.5:1 contrast. ### Phase 3b: Monochrome Variant Duplicate the master SVG and replace all colors with `currentColor`. Remove `