drawio-skills

Export & Save

Draw.io Skill treats export as part of the offline bundle workflow, not as a browser-only step.

Canonical Artifact Bundle

Keep these files together whenever the diagram may be edited again:

This bundle supports local iteration without requiring a live session.

Common Export Commands

Generate a .drawio file

node skills/drawio/scripts/cli.js input.yaml output.drawio --validate --write-sidecars

Generate a standalone SVG

node skills/drawio/scripts/cli.js input.yaml output.svg --validate --write-sidecars

Generate PNG, PDF, or JPG with draw.io Desktop

node skills/drawio/scripts/cli.js input.yaml output.pdf --validate --use-desktop
node skills/drawio/scripts/cli.js input.yaml output.png --validate --use-desktop

Import an Existing .drawio File

If you receive an existing .drawio file and want to edit it via the YAML-first workflow:

node skills/drawio/scripts/cli.js existing.drawio --input-format drawio --export-spec --write-sidecars

That generates an editable bundle you can version and re-render.

Embedded vs Standalone SVG

Use --use-desktop when embedded export matters.

Optional MCP Export

If you are already in a live browser session, export_diagram can still save .drawio, .png, or .svg.

That path is optional. The default export model remains local CLI generation.

Need Best output
ongoing editing .drawio bundle
paper figure .svg
slide deck image .png or .jpg with Desktop
printable handoff .pdf with Desktop

Tips

Next Steps