---
name: "potrace-bitmap-to-svg-tracer"
description: "Transform raster bitmaps, signatures, and logos into smooth vector SVG outlines with Potrace."
metadata:
  author: "Peter Selinger"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "trace bitmap to svg potrace"
  - "convert scanned signature to vector svg"
  - "smooth bitmap edges potrace"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# Potrace Automated Bitmap-to-Vector SVG Tracer

Traces monochrome raster images using Potrace / potrace-js: thresholding, turnpolicy heuristics, curve smoothing, alphamax corner optimization, and SVG path extraction.

## When to Invoke
Invoke this skill whenever you need to:
- trace bitmap to svg potrace
- convert scanned signature to vector svg
- smooth bitmap edges potrace

## Execution SOP & Rules
1. Pre-process input images to high contrast grayscale or black-and-white for optimal tracing.
2. Configure threshold options: { threshold: 128, turnpolicy: 'majority' } to balance detail vs smoothness.
3. Tune optcurve: true and alphamax: 1.0 to eliminate jagged pixelated artifacts on curves.
4. Sanitize and format output SVG path strings before embedding in web interfaces.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
