drawio
БесплатноЗапускает вложенные скриптыНе проверенAlways use when user asks to create, generate, draw, or design a diagram, flowchart, architecture diagram, ER diagram, sequence diagram, class diagram…
от jgraph★ 5 928 звёзд на GitHubОб этом скилле
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).
The pipeline
Every diagram becomes a native .drawio file first, then is delivered in the requested output format, whether you authored Mermaid or XML.
- Author →
.drawio- Mermaid: write the Mermaid to a
.mmdfile, then convert it with the CLI:
Without the CLI, the skill's script converts it with draw.io's converter in an installed Chrome, Edge or Chromium (Node.js 18+, network; the Mermaid stays local):drawio -x -f xml -o diagram.drawio diagram.mmd
Delete thenode <skill-folder>/scripts/mermaid-to-drawio.js diagram.mmd.mmdafterward — the.drawiois the artifact. - XML: write the mxGraphModel XML to
diagram.drawio(see XML format), then run the repair pass on it. Optionally apply an ELK layout.
- Mermaid: write the Mermaid to a
- Deliver (identical for both sources):
- (no format) → keep
diagram.drawioand open it. - png / svg / pdf → export from the
.drawiowith embedded XML, then delete the source.drawio:drawio -x -f png -e -b 10 -o diagram.drawio.png diagram.drawio - url → build a browser URL from the
.drawioXML, open it, and keep the.drawioas a local copy (see Browser URL output).
- (no format) → keep
- Open the result — the exported file, the URL, or the
.drawio(see Opening the result). If the open command fails, print the absolute path (or URL) so the user can open it manually.
Always convert Mermaid to .drawio first, then export: direct .mmd → PNG with -e crashes in current draw.io Desktop.
If the script finds no browser (exit code 3), node <skill-folder>/scripts/mermaid-to-drawio.js --link diagram.mmd prints an app.diagrams.net URL that converts the Mermaid when opened: deliver that for url or no format, saying there is no local file. For a file or an export, author the same diagram as XML. PNG, SVG and PDF need the desktop CLI either way.
ELK layout for XML
The CLI's --layout step auto-positions XML-authored diagrams with the same ELK layouts as the editor's Arrange ▸ Layout menu and the draw.io MCP app server. Generate the cells with approximate (or even 0,0) positions and get the graph structure — nodes and edges — right. Use verticalFlow / horizontalFlow for flow-style diagrams and organic for networks. Mermaid-authored diagrams are already laid out — don't add --layout.
Lay out in place after you write the file (reading and overwriting the same path is supported), or combine layout with export in one call:
drawio -x -f xml --layout verticalFlow -o diagram.drawio diagram.drawio
drawio -x -f png -e -b 10 --layout verticalFlow -o diagram.drawio.png diagram.drawio
Layout presets
| Name | Layout |
|---|---|
verticalFlow |
Layered, top-to-bottom — flowcharts, pipelines |
horizontalFlow |
Layered, left-to-right |
Установить drawio в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл drawio?
Always use when user asks to create, generate, draw, or design a diagram, flowchart, architecture diagram, ER diagram, sequence diagram, class diagram, network diagram, mockup, wireframe, or UI sketch, or mentions draw.io, drawio, drawoi, .drawio files, or diagram export to PNG/SVG/PDF. Exception: in a chat that shows diagrams inline (VS Code's or Cursor's own chat, Claude.ai, ChatGPT) where the draw.io MCP server's create_diagram tool is available, call that tool instead, unless the user asks for a file or an export. Claude Code, Codex and Copilot CLI, also in their VS Code and JetBrains extensions, don't show diagrams inline: use this skill there.
Как установить скилл drawio?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл drawio запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic