/prompt-to-asset:vectorizefrom prompt-to-asset
Converts raster images to SVG using Recraft (hosted), vtracer (multi-color polygon), or potrace (1-bit). Optimizes with SVGO and validates path count for quality.
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.
/vectorize (hosted, highest quality)Input: any raster. Output: clean SVG, typically 20–100 paths for a mark, 200–500 for an illustration. Commercial tier only.
const svg = await recraft.vectorize({ image: pngBuffer });
vtracer (local, multi-color polygon)npm install vtracer for the Node wrapper.polygon (recommended for logos), spline (smoother curves), pixel (blocky).pipeline:
raster 1024²
→ BiRefNet matte (alpha the background)
→ K-means LAB 6-color palette
→ vtracer --mode polygon --filter-speckle 4 --color-precision 6
→ SVGO (conservative preset)
potrace (local, 1-bit)<g>s.pipeline:
raster 1024²
→ BiRefNet matte
→ per-color mask (binary threshold per palette entry)
→ potrace per mask → <g> wrapper
→ combine into single SVG
→ SVGO
| Use case | Path |
|---|---|
| Budget available, one-shot quality | Recraft vectorize |
| Multi-color logo, local | vtracer (polygon mode) |
| Single-color icon pack | potrace |
| Photorealistic illustration → vector | don't — keep as PNG/WebP. Vectorization of photoreal is lossy noise. |
After vectorization, count <path> elements:
Conservative preset — preserve: viewBox, IDs, classes. Strip: metadata, editor comments, hidden elements.
{
multipass: true,
plugins: [
{ name: 'preset-default', params: {
overrides: { removeViewBox: false, cleanupIds: { minify: false } } } },
'removeDimensions', // prefer viewBox-only
'sortAttrs',
'removeScriptElement' // security
]
}
Never enable convertPathData with default floatPrecision — it collapses small strokes.
@resvg/resvg-js without errors.<path> count ≤ 200 for logos, ≤ 500 for illustrations.<image> tags (sneaking raster into SVG).<script> tags.vector/
├── mark.svg # primary vectorization
├── mark.svg.orig # pre-SVGO original (for debugging)
└── meta.json # paths_count, colors_used, svgo_savings_bytes
What SKILL.md sets; muted values are Claude Code's defaults
13 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-debugGenerated from the plugin's indexed repository (mohamedabdallah-14/prompt-to-asset) — no native marketplace selected
npx claudepluginhub p/mohamedabdallah-14-prompt-to-assetOther plugins' skills for the same job