---
name: "svg-path-morphing-optimizer"
description: "Morph between complex, dissimilar SVG vector shapes seamlessly using Flubber."
metadata:
  author: "Noah Veltman"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "morph svg path flubber"
  - "interpolate svg shapes"
  - "fix svg morphing vertex mismatch"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# SVG Path Morphing & Flubber Normalization

Solves SVG path morphing anomalies (differing vertex counts, holes, disjoint subpaths) using Flubber: path interpolation, shape morphing, and SVG d attribute normalization.

## When to Invoke
Invoke this skill whenever you need to:
- morph svg path flubber
- interpolate svg shapes
- fix svg morphing vertex mismatch

## Execution SOP & Rules
1. Create interpolator with const interpolator = flubber.interpolate(shapeA_d, shapeB_d, { maxSegmentLength: 2 }).
2. Sample interpolated path at fractional progress: pathElement.setAttribute('d', interpolator(progress)).
3. Use flubber.toCircle or flubber.fromCircle when morphing to simple geometric primitives.
4. Ensure input SVG paths are valid single-path strings before running interpolation.

## 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.
