ekusiadadus/draw-mcp/draw-io
Claude Code and agent skill by ekusiadadus/draw-mcp
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
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.
Install
npx vskill@latest install ekusiadadus/draw-mcp/draw-ioSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as ekusiadadus/draw-mcp/draw-io.
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
Every file MUST follow this hierarchy. The mxfile element is the root.
2.2 Root Cells
Two root cells MUST always be present:
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":
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:
&,<,>,"
3. Style String Rules (MUST)
3.1 Format
Style strings use key=value; pairs with a trailing semicolon:
3.2 Boolean Values
Boolean style keys MUST use 0 or 1, never true or false:
3.3 fontFamily on All Text
Every cell with a value attribute MUST include fontFamily=FontName; in its style:
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):
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:
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:
6.2 Swimlane Container
Visible title bar, ideal for service boundaries:
Swimlanes SHOULD specify startSize for the title bar height.
6.3 Custom Container
Any shape acting as a container:
Containers (except swimlanes) SHOULD include pointerEvents=0; to prevent connection capture.
6.4 Children Coordinates
Children MUST use relative coordinates within their parent container:
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"):
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:
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 JPas default font for cross-platform compatibility - Set
defaultFontFamily="Noto Sans JP"onmxGraphModel
10. Validation
CLI Usage
Rule Summary (23 rules)
| Module | Rules | Severity | |
|---|---|---|---|
| structure | root-cells, hierarchy, vertex-edge-exclusivity, parent-reference, unique-ids | ERROR | |
| style | trailing-semicolon (W), boolean-values (E), typo (W), font-family (E) | Mixed | |
| edge | z-order (W), relative (E), arrowhead-segment (W), node-spacing (W) | Mixed | |
| container | pointer-events (W), children-bounds (W), swimlane-start-size (W), collapsible (I) | Mixed | |
| text | japanese-width (W), html-escape (W), font-size (E/W) | Mixed | |
| export | page-setting (W), embed-diagram (I) | Mixed |
Quick Decision Guide
| Need | Approach | |
|---|---|---|
| Custom styling, precise positioning, Japanese text | XML (this skill) | |
| Simple flowchart, sequence, ER diagram | Mermaid.js via MCP | |
| Inline preview in chat | MCP App Server (mcp.draw.io/mcp) |
Supporting Files
- reference.md — Complete XML structure reference
- examples.md — 8 production-ready examples
- checklist.md — Pre-commit validation checklist
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/draw-io/SKILL.md
Popularity
- Repository stars
- 26
- Repository forks
- 3
- 7-day trend score
- 16
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 31 Mar 2026, 8 months ago.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ekusiadadus/draw-mcp/draw-io)