Generate and edit draw.io diagrams in XML format with proper font settings, arrow placement, and Japanese text support. Use when creating flowcharts, architecture diagrams, sequence diagrams, or any visual diagrams in .drawio format. Handles font family settings, arrow layering, text sizing, and PNG export validation.
Inherits all available tools
Additional assets for this skill
This skill inherits all available tools. When active, it can use any tool Claude has access to.
checklist.mdexamples.mdreference.mdThis skill enables Claude Code to generate high-quality draw.io diagrams by directly editing XML. It addresses common pitfalls when generating draw.io files programmatically.
When creating a draw.io diagram:
defaultFontFamily in mxGraphModelfontFamily=FontName; to ALL text element stylesfontSize=18 or larger for readabilitypage="0" for transparent background<!-- In mxGraphModel -->
<mxGraphModel defaultFontFamily="Noto Sans JP" page="0" ...>
<!-- In EVERY text element's style -->
<mxCell style="text;fontFamily=Noto Sans JP;fontSize=18;..." />
Arrows must be declared FIRST to render behind other elements:
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<!-- ARROWS FIRST (renders at back) -->
<mxCell id="arrow1" edge="1" ... />
<!-- BOXES AFTER (renders in front) -->
<mxCell id="box1" vertex="1" ... />
</root>
Labels must be at least 20px away from arrow lines:
<!-- Arrow at Y=220 -->
<mxCell id="arrow">
<mxGeometry>
<mxPoint y="220" as="sourcePoint"/>
</mxGeometry>
</mxCell>
<!-- Label at Y=180 (40px above arrow) - CORRECT -->
<mxCell id="label" value="Process">
<mxGeometry y="180" width="60" height="20" />
</mxCell>
Allocate sufficient width to prevent unwanted line breaks:
<!-- 8 Japanese characters × 35px = 280px minimum -->
<mxCell id="title" value="シンプルなフロー図">
<mxGeometry width="300" height="40" />
</mxCell>
When asked to create a draw.io diagram, use this approach:
Always recommend PNG export for visual verification:
# macOS
drawio -x -f png -s 2 -t -o output.png input.drawio
open output.png
# Linux
drawio -x -f png -s 2 -t -o output.png input.drawio
xdg-open output.png