Logo: Draw Io

Draw Io

Communautéit
ekusiadadus
draw-io

Generate and validate draw.io diagrams in XML format. Strict quality rules for font settings, edge routing, containers, layers, and Japanese text. 23-rule validator with CLI. Use for flowcharts, architecture diagrams, sequence diagrams in .drawio format.

Iwwersiicht

Editeurekusiadadus
Repositorydraw-mcp
Skill-Nummdraw-io
Stären
31
Forks
4
Matgeliwwert Dateien
3
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 3 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    ekusiadadus huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Draw Io an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/ekusiadadus/draw-mcp/tree/main/skills/draw-io
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ekusiadadus/draw-mcp.git /tmp/draw-mcp
mkdir -p .claude/skills
cp -r /tmp/draw-mcp/skills/draw-io .claude/skills/draw-io
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Draw Io an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Draw Io automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Draw Io net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

draw.io XML Generation Specification v2.0

1. Scope

This specification defines the rules for AI-generated draw.io XML files. It ensures consistent, high-quality output that renders correctly in draw.io desktop, web, and PNG export. Rules are categorized as:

  • MUST (Severity: ERROR) — Violations break rendering or structure
  • SHOULD (Severity: WARNING) — Violations degrade quality
  • INFORMATIONAL (Severity: INFO) — Suggestions for best practices

All rules are enforced by the draw-mcp-validate CLI tool with 23 validation rules.

2. Structural Rules (MUST)

2.1 File Hierarchy

mxfile > diagram > mxGraphModel > root > mxCell...

Every file MUST follow this hierarchy. The mxfile element is the root.

2.2 Root Cells

Two root cells MUST always be present:

xml
<mxCell id="0"/>
<mxCell id="1" parent="0"/>

Cell id="0" is the invisible root. Cell id="1" is the default layer with parent="0".

2.3 Parent References

Every mxCell with a parent attribute MUST reference an existing cell id. Orphaned references cause rendering failures.

2.4 Vertex/Edge Exclusivity

A cell MUST NOT have both vertex="1" and edge="1". It is either a shape or a connection, never both.

2.5 Edge Geometry

Edge mxGeometry MUST have relative="1":

xml
<mxCell id="e1" edge="1" parent="1" source="a" target="b"
  style="edgeStyle=orthogonalEdgeStyle;">
  <mxGeometry relative="1" as="geometry"/>
</mxCell>

2.6 Unique IDs

All mxCell elements MUST have unique id attributes.

2.7 XML Well-Formedness

  • MUST NOT use -- inside XML comments (illegal per XML spec)
  • MUST escape special characters in attribute values: &amp;, &lt;, &gt;, &quot;

3. Style String Rules (MUST)

3.1 Format

Style strings use key=value; pairs with a trailing semicolon:

style="rounded=1;whiteSpace=wrap;html=1;fontFamily=Noto Sans JP;fontSize=18;"

3.2 Boolean Values

Boolean style keys MUST use 0 or 1, never true or false:

xml
<!-- CORRECT -->
style="rounded=1;html=1;"

<!-- WRONG -->
style="rounded=true;html=false;"

3.3 fontFamily on All Text

Every cell with a value attribute MUST include fontFamily=FontName; in its style:

xml
<mxCell id="a" value="Label"
  style="rounded=1;fontFamily=Noto Sans JP;fontSize=18;"
  vertex="1" parent="1"/>

3.4 Font Size

Minimum font size is 14px (MUST). Recommended size is 18px (SHOULD).

3.5 Known Keys

Use only valid draw.io style keys. Common typos (e.g., storkeColor for strokeColor) are detected and flagged.

4. Layout Rules (SHOULD)

4.1 Grid Alignment

Align node positions to a 10px grid (multiples of 10).

4.2 Node Spacing

  • Minimum spacing: 60px between nodes
  • Recommended: 200px horizontal, 120px vertical

4.3 Edge Final Segment

The final straight segment of an edge MUST be at least 20px for arrowheads to render cleanly.

5. Edge Routing (SHOULD)

5.1 Z-Order

Edges SHOULD be declared before vertices in XML for correct Z-order (arrows behind shapes):

xml
<root>
  <mxCell id="0"/><mxCell id="1" parent="0"/>
  <!-- EDGES FIRST -->
  <mxCell id="e1" edge="1" .../>
  <!-- VERTICES AFTER -->
  <mxCell id="a" vertex="1" .../>
</root>

5.2 Orthogonal Style

Use edgeStyle=orthogonalEdgeStyle for right-angle connectors. Add rounded=1 for cleaner bends.

5.3 jettySize

Use jettySize=auto for better port spacing on orthogonal edges.

5.4 jumpStyle

For crossing edges, use jumpStyle=arc or jumpStyle=gap to show crossings clearly.

5.5 Waypoints

Add explicit waypoints when edges would overlap:

xml
<mxGeometry relative="1" as="geometry">
  <Array as="points">
    <mxPoint x="300" y="150"/>
  </Array>
</mxGeometry>

5.6 Connection Points

Use exitX/exitY and entryX/entryY (values 0-1) to control which side of a node an edge connects to. Spread connections across different sides to prevent overlap.

6. Containers (SHOULD)

6.1 Group Container

Invisible grouping with no visual border:

xml
<mxCell id="grp1" style="group;" vertex="1" parent="1">
  <mxGeometry x="100" y="100" width="300" height="200" as="geometry"/>
</mxCell>

6.2 Swimlane Container

Visible title bar, ideal for service boundaries:

xml
<mxCell id="svc1" value="User Service"
  style="swimlane;startSize=30;fillColor=#dae8fc;strokeColor=#6c8ebf;fontFamily=Noto Sans JP;fontSize=16;"
  vertex="1" parent="1">
  <mxGeometry x="100" y="100" width="300" height="200" as="geometry"/>
</mxCell>

Swimlanes SHOULD specify startSize for the title bar height.

6.3 Custom Container

Any shape acting as a container:

xml
style="rounded=1;container=1;pointerEvents=0;"

Containers (except swimlanes) SHOULD include pointerEvents=0; to prevent connection capture.

6.4 Children Coordinates

Children MUST use relative coordinates within their parent container:

xml
<!-- Child at (20, 40) relative to container origin -->
<mxCell id="child" vertex="1" parent="svc1">
  <mxGeometry x="20" y="40" width="120" height="60" as="geometry"/>
</mxCell>

Children SHOULD not extend beyond parent container bounds.

6.5 Collapsible

Consider adding collapsible=1 for interactive containers (INFO).

7. Layers (SUPPORTED)

Layers are additional cells with parent="0" (like cell id="1"):

xml
<mxCell id="0"/>
<mxCell id="1" parent="0"/>                    <!-- Default layer -->
<mxCell id="layer-bg" value="Background" parent="0"/>  <!-- Custom layer -->
<mxCell id="layer-fg" value="Foreground" parent="0"/>  <!-- Custom layer -->

Assign elements to layers via parent="layerId". Layer cells do not require fontFamily.

8. Export Modes (INFORMATIONAL)

8.1 Transparent Background

Set page="0" on mxGraphModel for transparent background in PNG export.

8.2 PNG Verification

Always verify diagrams with PNG export:

bash
drawio -x -f png -s 2 -t -o output.png input.drawio

8.3 Embed Diagram

For portable files, consider type="embed" on mxfile.

9. Japanese Text (SHOULD)

  • Allocate 30-40px width per Japanese character
  • Use Noto Sans JP as default font for cross-platform compatibility
  • Set defaultFontFamily="Noto Sans JP" on mxGraphModel

10. Validation

CLI Usage

bash
# Validate a file (text output, warning+ severity)
draw-mcp-validate diagram.drawio

# JSON output
draw-mcp-validate diagram.drawio --format json

# Errors only
draw-mcp-validate diagram.drawio --severity error

# Multiple files
draw-mcp-validate *.drawio

Rule Summary (23 rules)

ModuleRulesSeverity
structureroot-cells, hierarchy, vertex-edge-exclusivity, parent-reference, unique-idsERROR
styletrailing-semicolon (W), boolean-values (E), typo (W), font-family (E)Mixed
edgez-order (W), relative (E), arrowhead-segment (W), node-spacing (W)Mixed
containerpointer-events (W), children-bounds (W), swimlane-start-size (W), collapsible (I)Mixed
textjapanese-width (W), html-escape (W), font-size (E/W)Mixed
exportpage-setting (W), embed-diagram (I)Mixed

Quick Decision Guide

NeedApproach
Custom styling, precise positioning, Japanese textXML (this skill)
Simple flowchart, sequence, ER diagramMermaid.js via MCP
Inline preview in chatMCP App Server (mcp.draw.io/mcp)

Supporting Files

Matgeliwwert Dateien

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Draw Io?

Generate and validate draw.io diagrams in XML format. Strict quality rules for font settings, edge routing, containers, layers, and Japanese text. 23-rule validator with CLI. Use for flowcharts, architecture diagrams, sequence diagrams in .drawio format.

Firwat Draw Io op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Draw Io besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Draw Io an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/ekusiadadus/draw-mcp/tree/main/skills/draw-io an. TypingMind liest d'Datei SKILL.md, bëndelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Draw Io benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Draw Io benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Draw Io domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Draw Io gratis?

Jo. ekusiadadus huet de Skill ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇