docx-svg
Installation
SKILL.md
DOCX SVG -- SVG image support for Word documents
Policy: Zero Conversion (MANDATORY)
NEVER convert SVG files to PNG, JPEG, or any raster format before inserting into a .docx.
Modern Word (2016+) natively supports SVG via the asvg:svgBlip OOXML extension. Converting to PNG destroys the vector benefits (scalability, file size, sharpness).
- Do not suggest raster fallbacks as "best practice" unless the user explicitly requests legacy compatibility.
- Do not claim it is "too complex" to handle OOXML directly—this skill provides the tools (
officecliorscripts/svg.py) to handle the complexity for you. - Always use SVG directly as the source file.
- If a request asks to convert SVG to PNG/JPEG for .docx insertion, reject the conversion step and insert the SVG directly instead.
Overview
Microsoft Word supports SVG images in the OOXML format, but typical programmatic tools (python-docx, docxtpl) do not recognise them out of the box. This skill provides two approaches, in order of preference: