drawio

Design Community

Skill notes

How to create a diagram

Generate draw.io XML in mxGraphModel format for the requested diagram Write the XML to a .drawio file in the current working directory using the Write tool Handle the requested output format: png / svg / pdf → locate the draw.io CLI (see draw.io CLI), export with --embed-diagram, then delete the source .drawio file. If the CLI is not found, keep the .drawio file and tell the user they can install the draw.io desktop app to enable export, or use url mode instead, or open the .drawio file directly

Choosing the output format

Check the user's request for a format preference. Examples: /drawio create a flowchart → flowchart.drawio /drawio png flowchart for login → login-flow.drawio.png /drawio svg: ER diagram → er-diagram.drawio.svg /drawio pdf architecture overview → architecture-overview.drawio.pdf

Supported export formats

Format · Embed XML · Notes png · Yes (-e) · Viewable everywhere, editable in draw.io svg · Yes (-e) · Scalable, editable in draw.io pdf · Yes (-e) · Printable, editable in draw.io jpg · No · Lossy, no embedded XML support

Browser URL output

When the user requests url format, generate a draw.io URL that opens the diagram directly in the browser editor at app.diagrams.net — no draw.io Desktop required.

How it works

The .drawio file is written to disk as usual (gives the user a persistent local copy they can re-edit) The XML is compressed with Node.js's built-in zlib and base64-encoded The result is embedded in a https://app.diagrams.net/#create=... URL The URL is opened in the default browser This uses only Node.js built-in modules (zlib, child_process) — no external dependencies.

Fluxly profile Runtime and permissions are inferred by Fluxly static checks, not author declarations or runtime test results.
Domain
Design
Author-declared agents
No explicit declaration found; this is not inferred or tested compatibility
Static check
88 / 100 · heuristic scan, not runtime safety proof
Runtime evidence
Not run; no isolated runtime test evidence is currently recorded
Author / version / license
@jgraph · no license declared
Token usage
Lean
Setup complexity
Guided setup
External API key
Not required
Operating systems
macOS · Linux · Windows · WSL
Runtime requirements
Node.js
Detected file/system behavior
  • Read-only
  • Write / modify
  • Shell exec
Network behavior
External requests
Install commands
None (reference only)

Heads up: Tool permissions are not declared; actual access depends on the runtime.

Output preview drawio.preview
# Choosing the output format

- `/drawio create a flowchart` → `flowchart.drawio`
- `/drawio png flowchart for login` → `login-flow.drawio.png`
- `/drawio svg: ER diagram` → `er-diagram.drawio.svg`
- `/drawio pdf architecture overview` → `architecture-overview.drawio.pdf`
- `/drawio url flowchart for user login` → opens browser at `app.diagrams.net` with the diagram, keeps `login-flow.drawio` locally

Discussion

Powered by GitHub Discussions. Sign in with GitHub to comment, react, or subscribe.