check-svg-diagrams
Check SVG Diagrams
Combine structural evidence with an actual rendered view. Keep renderer choice flexible: discover what the current environment provides, probe a suitable option with the target SVG, and fall back when rendering or font behavior is unreliable. The bundled Python CLI itself remains headless and never opens a browser, GUI, or network connection.
Workflow
-
Identify the SVG path and any explicit requirements: expected labels, stable IDs, or directed relationships.
-
Run the complete static inspection before opening the SVG in a browser or another active renderer:
python3 <skill-directory>/scripts/svg_check.py report diagram.svg --format table -
Stop before visual rendering when the report contains unsafe markup or external references. Resolve or isolate those errors first.
-
As the Coding Agent, inspect the current session's tools and the local environment for a viable SVG renderer, image viewer, browser workflow, or computer-use capability. Keep this discovery and orchestration outside
svg_check.py. -
Render with any viable SVG-to-image tool or isolated browser workflow. Verify that an image was produced, inspect it at the intended delivery size, and try another renderer when fonts, filters, clipping, or external resources fail.
-
Compare overlap, overflow, connector, and alignment warnings with the rendered view. Compare semantic relationships with the source specification or user intent.
-
Make the smallest SVG edit that fixes the confirmed defect. Preserve unrelated layout, content, styling, and identifiers.
-
Rerun the relevant static command, render again, and inspect the corrected region. Summarize what was confirmed, changed, and rechecked.