/prompt-to-asset:svg-authoringfrom prompt-to-asset
Writes production-grade inline SVG (logos, favicons, icon packs, stickers, transparent marks) enforcing viewBox, path budget, palette, optical balance, and legibility rules for crisp scaling from 16x16 to 1024x1024.
Ships in prompt-to-asset. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Engaged when asset_generate_* returns an InlineSvgPlan. Read svg_brief (viewBox, palette, path_budget, require[], do_not[], skeleton) and emit one <svg>…</svg> code block that honors every constraint. Then call asset_save_inline_svg({ svg, asset_type }) so the file lands on disk.
| Asset type | viewBox | Path budget | Colors | Safe-zone | Notes |
|---|---|---|---|---|---|
logo | 0 0 120 120 (or brief-specified) | ≤40 | 2–4 hex | subject fits inside 80% center box | Flat, geometric, closed shapes |
favicon (master SVG) | 0 0 64 64 | ≤30 | 2–3 hex | legible at 16×16 after downsampling | ≥2px stroke equivalent at 16² |
icon_pack (per icon) | 0 0 24 24 | ≤8 | monocolor (currentColor) OR 2 tones | 2px grid, 1.5–2px strokes | All icons share grid + stroke weight |
sticker | 0 0 240 240 | ≤60 | up to 6 hex | bleed allowed; no hard edge requirement | Chunkier line weights OK |
transparent_mark | 0 0 200 200 | ≤40 | 2–3 hex | 80% center | Never emit <rect fill="white"> as "background" |
app_icon master | 0 0 1024 1024 | ≤60 | 3–5 hex | iOS HIG 824² center | Opaque bg allowed; no alpha needed on this one |
Never emit: <image> tags, external refs, <script>, inline Base64, fonts with unverified family names, CSS animations in a favicon master, gradients in an icon-pack icon.
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 120" fill="none" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round">
<!-- primitives beat paths for circles/rects -->
<circle cx="60" cy="60" r="40" />
<rect x="30" y="30" width="60" height="60" rx="8" />
<!-- paths: M (moveto), L (lineto), C (cubic), Z (close) -->
<path d="M40 80 L60 40 L80 80 Z" fill="#0A1F44" />
<!-- groups scope styles; use currentColor for theming -->
<g fill="#FF6B6B"><path d="…"/><path d="…"/></g>
</svg>
Rules: always close shapes with Z; round coordinates to 2 decimals; prefer primitives (<circle>, <rect>) over equivalent <path>; use <g> to deduplicate fill/stroke.
Flat-geometric — primitives + straight paths, fills only, 2–3 hex. Default for logos/favicons.
Outlined (stroke-only) — fill="none", uniform stroke-width, round caps/joins. Default for icon packs (Lucide/Heroicons pattern).
Filled (solid) — single-color fills, currentColor for theming. Compact file size.
Duotone — two layered <g> groups, contrasting hex codes. Good for logos with depth.
Minimal/brutalist — 1–3 shapes, monocolor, asymmetric composition. Highest failure rate if executed carelessly.
Gradient — <linearGradient> or <radialGradient> in <defs>. Avoid in favicons (collapses at 16²).
Before emitting, picture the mark at 16×16:
2 × 16/120 = 0.27px at 16×16. Too thin. Use 6–8px at viewBox 120 for favicons.)Default: no text. Composite brand typography in the application layer using real fonts.
If the brief requires <text>:
font-family="ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif" — never a single exotic font.svg_brief.palette. Use it strictly. No new hex codes.currentColor for icon-pack icons so consumers can theme via CSS.asset_save_inline_svg).| Mistake | Symptom | Fix |
|---|---|---|
| Coordinates > viewBox | Subject clipped / off-canvas | Keep all coordinates within [0, viewBox_size] |
Open paths (missing Z) | Fill leaks, unpredictable stroke | Always Z before starting new subpath |
Sub-pixel coordinates (e.g. 60.000001) | Blurry rasterization | Round to 2 decimals |
| Stroke sized for 1024 canvas in a favicon viewBox | Invisible at 16² | Size strokes as ratio of viewBox |
| Over-detail / literal interpretation | Cannot read at small scale | Reduce to silhouette; cut paths |
| Mixed stroke/fill conventions | Inconsistent icons in a pack | Pick one and declare at <svg> root |
| Gradient in favicon | Muddy at 16² | Flat fills only below 64×64 viewBox |
| Drop shadows / filters | Broken in most renderers | Do not use <filter> in brand assets |
The asset_save_inline_svg tool validates your SVG against the brief. If it returns an error:
viewBox mismatch — you used a different viewBox than the brief specifiedpath count > budget — reduce via primitives, merging, or deletion of decorative pathsunknown palette color — swap rogue hex for nearest palette entryexternal reference — remove <image href>, <use href>, etc.Regenerate the SVG with the correction; call asset_save_inline_svg again. Max 2 retries, then report back to user.
docs/research/12-vector-svg-generation/12d-llm-direct-svg-code-generation.md — LLM-author SVG patterns, StarVector, path budgetsdocs/research/12-vector-svg-generation/12e-hybrid-vector-pipeline-architectures.md — fallback paths when inline failsdocs/research/24-skills-for-p2a/02-svg-authoring-skill-design.md — full spec (this file is the shipping distillation)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
svg-authoring, inline-svg, icon-design, vector-graphics, logo-design, favicon
Generated from the plugin's indexed repository (mohamedabdallah-14/prompt-to-asset) — no native marketplace selected
npx claudepluginhub p/mohamedabdallah-14-prompt-to-asset13 skills in this plugin
/app-iconGenerate an app icon from a single 1024² master and fan out to iOS (AppIcon.appiconset with squircle-ready 1024 opaque), Android (adaptive foreground + background + Android 13 monochrome), PWA (192/512 + 512 maskable with 80% safe zone), and visionOS (3-layer parallax)./asset-enhancerClassify 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./asset-validation-debugOther plugins' skills for the same job