drawio
Draw.io Diagram Skill
Generate draw.io diagrams as native .drawio files. Author each diagram either as Mermaid (concise text that draw.io converts to editable shapes and connectors and lays out) or as draw.io XML directly. Optionally auto-layout XML with ELK, export to PNG/SVG/PDF with the diagram XML embedded (so the file stays editable in draw.io), or open the diagram in the draw.io editor through a browser URL.
Inline viewer first. This skill writes files and opens them with a shell command. If the draw.io MCP server's create_diagram tool is available in a chat that shows diagrams inline (VS Code's or Cursor's own chat, Claude.ai, ChatGPT), and the user hasn't asked for a .drawio file, an export or a URL, call create_diagram instead: the diagram appears in the conversation, with no file and no shell command. Claude Code, Codex and Copilot CLI don't show diagrams inline, not even in their VS Code or JetBrains extensions: there create_diagram only returns a link, so use this skill.
Authoring: Mermaid or XML?
Converted Mermaid is a native .drawio file, laid out automatically, which is far more reliable than hand-positioning cells in XML.
| Author as | Best for | Needs |
|---|---|---|
| Mermaid | Flowcharts, sequence, class, state, ER, gantt, mindmap, timeline, user journey, quadrant, C4, git graph, pie, and other standard types | The desktop CLI, or an installed Chrome, Edge or Chromium, to convert it |
| XML | Custom styling, precise/hand positioning, specific shape libraries (AWS, Azure, network, UML detail…) | Nothing (optional ELK --layout needs the CLI) |
- Prefer Mermaid for the standard types above.
- Use XML for precise control, or when nothing can convert Mermaid (deliver a
.drawiofile or aurl). For XML the CLI can apply an ELK auto-layout instead of you computing coordinates.
If you're unsure whether the desktop CLI is present, detect it first (see Locating the CLI).