drawio

Installation
SKILL.md

Draw.io Diagram Skill

Generate draw.io diagrams as native .drawio files. Author each diagram either as Mermaid (concise text that the draw.io desktop CLI converts and lays out for you) or as draw.io XML directly. Optionally auto-layout XML-authored diagrams with ELK, export to PNG/SVG/PDF with the diagram XML embedded (so the exported file stays editable in draw.io), or generate a browser URL that opens the diagram directly in the draw.io editor.

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?

The desktop CLI converts Mermaid to a native .drawio file and lays it out automatically, which is far more reliable than hand-positioning cells in XML.

Author as Best for Needs desktop CLI?
Mermaid Flowcharts, sequence, class, state, ER, gantt, mindmap, timeline, user journey, quadrant, C4, git graph, pie, and other standard types Yes — to convert to .drawio
XML Custom styling, precise/hand positioning, specific shape libraries (AWS, Azure, network, UML detail…), or when the desktop CLI is not installed No (optional ELK --layout needs the CLI)
  • Prefer Mermaid when the desktop CLI is available and the request is one of the standard types above.
  • Use XML for precise control, or as the universal fallback: XML needs no CLI, so it's the only option when the desktop app isn't installed (deliver a .drawio file or a url). For XML you can let the CLI apply an ELK auto-layout instead of computing coordinates yourself.

If you're unsure whether the desktop CLI is present, detect it first (see Locating the CLI).

Installs
3.2K
GitHub Stars
5.7K
First Seen
Feb 22, 2026