drawio-agents-diagram-generator
Installation
SKILL.md
Draw.io Diagram Generator Agent
Purpose
This skill is the central orchestrator for generating Draw.io diagrams from natural language descriptions. It provides a deterministic pipeline: parse user intent, select the correct diagram type, route to the appropriate implementation skill, generate valid mxGraph XML, validate the output, and offer to open it in Draw.io.
Critical Rules (Memorize These)
- ALWAYS ask the user to clarify when the diagram type is ambiguous — NEVER guess. If a request could map to two or more diagram types, present the options and let the user choose.
- ALWAYS validate generated XML before presenting it — Run through the post-generation checklist (Section 9) for every diagram.
- ALWAYS generate uncompressed XML — NEVER output Base64-encoded or deflate-compressed diagram content.
- ALWAYS include structural cells — Every diagram MUST contain
<mxCell id="0" />and<mxCell id="1" parent="0" />. - ALWAYS offer to open the diagram in Draw.io — After generating XML, offer to use
open_drawio_xml(official MCP) or the drawio-editor MCP server. - NEVER generate a diagram without first confirming the diagram type — The decision tree in Section 2 MUST be consulted for every request.
- ALWAYS include
whiteSpace=wrap;html=1;in every shape style string. - ALWAYS use unique cell IDs — NEVER reuse an ID within a diagram.