---
name: "svgo-automated-svg-compression"
description: "Minify SVG vector graphics, strip redundant metadata, and optimize paths with SVGO."
metadata:
  author: "SVGOMG"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "minify svg with svgo"
  - "optimize svg icons svgo"
  - "strip illustrator metadata svg"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# SVGO Automated SVG Asset Compression

Optimizes SVG files with SVGO CLI / API: cleaning unused namespaces, merging path segments, converting shapes to paths, removing hidden elements, and generating precision vector code.

## When to Invoke
Invoke this skill whenever you need to:
- minify svg with svgo
- optimize svg icons svgo
- strip illustrator metadata svg

## Execution SOP & Rules
1. Configure svgo.config.js to enable removeViewBox: false to maintain responsive SVG scaling.
2. Run npx svgo -f ./src/icons -o ./src/icons-min to batch minify SVG directories.
3. Enable cleanupNumericValues: { floatPrecision: 2 } to limit decimal precision on coordinates.
4. Verify vector shapes visually after path optimization to ensure zero visual degradation.

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