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
-
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.
-
Clean only unnecessary export markup.
- Remove XML declarations when nearby cleaned SVGs omit them.
- Remove
idattributes. - Remove
data-nameattributes. - 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.