Xml Generation
БесплатноБез исполняемых скриптовНе проверенComplete draw.io XML generation reference including mxGraphModel structure, cell types, style properties, and validation rules
от TheLobbi★ 22 звезды на GitHubОб этом скилле
draw.io XML Generation Reference
XML Document Structure
Full Format (mxfile wrapper)
<?xml version="1.0" encoding="UTF-8"?>
<mxfile host="app.diagrams.net" modified="2026-03-14T00:00:00.000Z"
agent="Claude" version="24.0.0" type="device">
<diagram id="page-1" name="Page 1">
<mxGraphModel dx="1422" dy="762" grid="1" gridSize="10"
guides="1" tooltips="1" connect="1" arrows="1"
fold="1" page="1" pageScale="1"
pageWidth="1169" pageHeight="827"
math="0" shadow="0">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<!-- diagram content here -->
</root>
</mxGraphModel>
</diagram>
</mxfile>
Simplified Format (IMPORT ONLY — do NOT use for .drawio files)
The mxGraphModel-only format works for clipboard import but causes blank files
when saved directly as .drawio. The draw.io desktop app and web editor both expect
the full <mxfile> wrapper to render the diagram. Always use the full format above.
<!-- DO NOT save this as a .drawio file — it will appear blank -->
<mxGraphModel>
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<!-- only works for import/paste, not for .drawio files -->
</root>
</mxGraphModel>
mxGraphModel Attributes
| Attribute | Default | Description |
|---|---|---|
dx |
0 | Horizontal scroll offset |
dy |
0 | Vertical scroll offset |
grid |
1 | Show grid (0/1) |
gridSize |
10 | Grid spacing in px |
guides |
1 | Enable alignment guides |
tooltips |
1 | Show tooltips |
connect |
1 | Enable connection points |
arrows |
1 | Show arrows on edges |
fold |
1 | Enable container folding |
page |
1 | Show page boundaries |
pageScale |
1 | Page zoom scale |
pageWidth |
1169 | Page width (A4 landscape) |
pageHeight |
827 | Page height (A4 landscape) |
math |
0 | Enable LaTeX math rendering |
shadow |
0 | Default shadow on shapes |
background |
none |
Background color — always use none (transparent) for clean embedding |
IMPORTANT: Always set background="none" on the <mxGraphModel> element. Transparent backgrounds ensure diagrams embed cleanly in any context (dark mode, light mode, wiki pages, PRs). Never use a solid white background unless explicitly requested.
Mandatory Structural Cells
Every diagram MUST begin with these two cells. They are never rendered but form the cell hierarchy root.
<mxCell id="0"/> <!-- Root cell (invisible) -->
<mxCell id="1" parent="0"/> <!-- Default layer -->
id="0"is the absolute root. It has no parent.id="1"is the default layer. All visible shapes/edges useparent="1"unless placed on a custom layer.- Omitting either cell causes diagram corruption.
Vertex Cells (Shapes)
Vertices represent boxes, circles, and all other shapes. They require vertex="1" and an mxGeometry child.
<mxCell id="2" value="My Shape" style="rounded=1;whiteSpace=wrap;html=1;"
vertex="1" parent="1">
<mxGeometry x="100" y="50" width="120" height="60" as="geometry"/>
</mxCell>
Vertex Attributes
| Attribute | Required | Description |
|---|---|---|
id |
Yes | Unique identifier (string) |
value |
No | Label text (plain or HTML) |
style |
No | Semicolon-delimited style string |
vertex |
Yes | Must be "1" |
parent |
Yes | Parent cell ID (usually "1") |
connectable |
No | "0" to disable connections |
mxGeometry for Vertices
<mxGeometry x="100" y="50" width="120" height="60" as="geometry"/>
| Attribute | Description |
|---|---|
x |
Left edge position (px from canvas origin) |
y |
Top edge position (px from canvas origin) |
width |
Shape width in px |
height |
Shape height in px |
as |
Must be "geometry" |
relative |
"1" for relative positioning inside parent |
Edge Cells (Connectors)
Edges connect vertices. They require edge="1" and typically source/target attributes.
<mxCell id="3" value="connects to" style="edgeStyle=orthogonalEdgeStyle;"
edge="1" source="2" target="4" parent="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
Edge Attributes
| Attribute | Required | Description |
|---|---|---|
id |
Yes | Unique identifier |
value |
No | Edge label |
style |
No | Style string |
edge |
Yes | Must be "1" |
source |
No | Source vertex ID |
target |
No | Target vertex ID |
parent |
Yes | Parent cell ID |
mxGeometry for Edges
Edge geometry uses relative="1" and may contain waypoints:
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="200" y="150"/>
<mxPoint x="300" y="150"/>
</Array>
<mxPoint x="100" y="100" as="sourcePoint"/>
<mxPoint x="400" y="200" as="target
Установить Xml Generation в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл Xml Generation?
Complete draw.io XML generation reference including mxGraphModel structure, cell types, style properties, and validation rules
Как установить скилл Xml Generation?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Xml Generation запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic