Draw.io Skill treats export as part of the offline bundle workflow, not as a browser-only step.
Keep these files together whenever the diagram may be edited again:
<name>.drawio<name>.spec.yaml<name>.arch.jsonThis bundle supports local iteration without requiring a live session.
.drawio filenode skills/drawio/scripts/cli.js input.yaml output.drawio --validate --write-sidecars
node skills/drawio/scripts/cli.js input.yaml output.svg --validate --write-sidecars
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
.drawio FileIf 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.
.drawio.svg requires draw.io Desktop and keeps round-trip editing metadata in the export pathUse --use-desktop when embedded export matters.
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 |
--strict-warnings for paper-quality review