daftai-image-to-svglisted
Install: claude install-skill daftAI2026/daftAI-skills
# Image to SVG
Convert transparent or solid-background single-color artwork into a genuine SVG containing paths rather than an embedded bitmap.
Automatic tracing approximates the raster boundary. Only the original vector source can provide mathematically exact curves.
## Scope
Supported:
- Transparent PNG.
- PNG on a pure-color background, including white, red, green, or other flat colors.
- SVG containing exactly one Base64 or local PNG.
- Single-color logos, stamps, engravings, silhouettes, and detailed line art.
Reject:
- Photos, gradients, textured backgrounds, and multicolor artwork.
- Remote image URLs.
- SVG mixing raster artwork with existing paths.
- Centerline or editable-stroke reconstruction.
For multicolor artwork, recommend VTracer instead of forcing this workflow.
## Script Directory
**Important**: All scripts are located in the `scripts/` subdirectory of this skill.
**Agent Execution Instructions**:
1. Determine this SKILL.md file's directory path as `SKILL_DIR`.
2. Set command working directory to `${SKILL_DIR}`.
3. Execute `bun ${SKILL_DIR}/scripts/vectorize.ts`.
4. Replace `${SKILL_DIR}` with the absolute path.
| Script | Purpose |
|---|---|
| `scripts/vectorize.ts` | Extract alpha, scan Potrace candidates, measure error, and deliver the best path-only SVG |
| `scripts/vectorize.test.ts` | Unit and real-toolchain regression tests |
## Dependencies
Detect the runtime once per session:
```bash
command -v bun
command -v ffmpeg
command -v ffprob