clean-svg

Installation
SKILL.md

Clean SVG

Clean SVG files surgically so they keep the same visual output with less export noise and better CSS styling behavior.

Workflow

  1. Inspect nearby cleaned SVGs first.

    • Compare against similar files in the same directory.
    • Match local formatting, attribute order, indentation, and whether the XML header is kept or removed.
  2. Clean only unnecessary export markup.

    • Remove XML declarations when nearby cleaned SVGs omit them.
    • Remove id attributes.
    • Remove data-name attributes.
    • Remove empty or purely wrapping <g> elements.
    • Move child paths directly under the root <svg> when the wrapper has no meaningful transform, style, mask, clip-path, opacity, or accessibility role.
Installs
3
Repository
sebkay/skills
GitHub Stars
1
First Seen
Jun 4, 2026
clean-svg — sebkay/skills