Loading...
Loading...
Generate professional draw.io architecture diagrams from text descriptions. The agent generates mxGraph XML directly, validates it, and iterates until correct. Includes 8900+ vendor stencils (AWS, Azure, GCP, Cisco, Kubernetes, etc.). Use when the user asks for draw.io diagrams, architecture diagrams, cloud infrastructure diagrams, or system design visualizations.
npx skill4agent add enriquecatala/skills drawio-generatorstencils/*.mdmxgraph.cisco.routermxgraph.cisco.routers.routerfillColorstrokeColor<mxCell id="0"/><mxCell id="1" parent="0"/>verticalLabelPosition=bottom;verticalAlign=top;labelPosition=center;align=center;<root>fillColor=none;<Array>exitX/exitY/entryX/entryY<!-- ... -->exitY=0.3exitY=0.7exitX=1entryX=0exitX=0entryX=1exitXexitYentryXentryYedgeStyle=orthogonalEdgeStyle<Array>entryX=1,entryY=1exitY=1entryY=0exitX=1entryX=0references/drawio_system_prompt.txtreferences/color_palette.mdreferences/drawio_xml_rules.mdassets/example_simple.drawiostencils/<category>.mdfillColorrounded=1;fillColor=#BAC8D3;strokeColor=none;opacity=60rounded=1;dashed=1;dashPattern=8 8;fillColor=none;strokeColor=#0BA5C4endArrow=none;endFill=0endArrow=classicdashed=1value<mxfile><diagram><mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/>vertex="1" parent="1"edge="1" parent="1"sourcetarget<Array>.drawiowrite_to_filepython .agent/skills/drawio-generator/scripts/validate_drawio.py <output_file.drawio><Array>&<.drawio.drawiostencils/*.md| Category | Stencil File | Use Case |
|---|---|---|
| AWS | | AWS cloud architecture (1031 shapes) |
| Azure | | Azure cloud & enterprise architecture |
| GCP | | Google Cloud architecture |
| Cisco | | Network topology |
| Kubernetes | | Container orchestration |
| Network | | General network diagrams |
| Virtualization | | Infrastructure diagrams |
| Software | | Process & UI design |
| Hardware | | Data center & electrical |
| Office | | Business diagrams |
| Cloud (Other) | | Other cloud providers |
<!-- Cisco router with label below -->
<mxCell id="router1" value="Core Router" style="shape=mxgraph.cisco.routers.router;html=1;fillColor=#036897;strokeColor=#ffffff;strokeWidth=2;verticalLabelPosition=bottom;verticalAlign=top;labelPosition=center;align=center;" vertex="1" parent="1">
<mxGeometry x="100" y="100" width="78" height="53" as="geometry"/>
</mxCell>
<!-- AWS Lambda -->
<mxCell id="lambda1" value="Lambda" style="shape=mxgraph.aws4.lambda;html=1;fillColor=#ED7100;strokeColor=none;verticalLabelPosition=bottom;verticalAlign=top;" vertex="1" parent="1">
<mxGeometry x="200" y="100" width="54" height="56" as="geometry"/>
</mxCell>
<!-- Kubernetes pod -->
<mxCell id="pod1" value="API Pod" style="shape=mxgraph.kubernetes.pod;html=1;fillColor=#326CE5;strokeColor=#ffffff;strokeWidth=2;verticalLabelPosition=bottom;verticalAlign=top;" vertex="1" parent="1">
<mxGeometry x="300" y="100" width="50" height="50" as="geometry"/>
</mxCell><mxCell id="rect" value="Box" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="20" y="20" width="100" height="50" as="geometry"/></mxCell>
<mxCell id="rounded" value="Rounded" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="140" y="20" width="100" height="50" as="geometry"/></mxCell>
<mxCell id="circle" value="Circle" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="260" y="10" width="70" height="70" as="geometry"/></mxCell>
<mxCell id="db" value="Database" style="shape=cylinder;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="350" y="5" width="60" height="80" as="geometry"/></mxCell>
<mxCell id="cloud" value="Cloud" style="ellipse;shape=cloud;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="430" y="10" width="100" height="70" as="geometry"/></mxCell><!-- Swimlane with child elements (relative positioning) -->
<mxCell id="lane1" value="Frontend" style="swimlane;" vertex="1" parent="1">
<mxGeometry x="40" y="40" width="200" height="200" as="geometry"/></mxCell>
<mxCell id="step1" value="Step 1" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="lane1">
<mxGeometry x="20" y="60" width="160" height="40" as="geometry"/></mxCell>parent="lane1"parent="1"<!-- Basic directional edge -->
<mxCell style="edgeStyle=orthogonalEdgeStyle;endArrow=classic;html=1;" edge="1" parent="1" source="a" target="b">
<mxGeometry relative="1" as="geometry"/></mxCell>
<!-- Bidirectional: use different exit/entry Y positions -->
<mxCell id="e1" value="Request" style="edgeStyle=orthogonalEdgeStyle;exitX=1;exitY=0.3;entryX=0;entryY=0.3;endArrow=classic;html=1;" edge="1" parent="1" source="nodeA" target="nodeB">
<mxGeometry relative="1" as="geometry"/></mxCell>
<mxCell id="e2" value="Response" style="edgeStyle=orthogonalEdgeStyle;exitX=0;exitY=0.7;entryX=1;entryY=0.7;endArrow=classic;html=1;" edge="1" parent="1" source="nodeB" target="nodeA">
<mxGeometry relative="1" as="geometry"/></mxCell>endArrow=block;endFill=0endArrow=block;endFill=0;dashed=1endArrow=open;endFill=1endArrow=open;dashed=1startArrow=diamondThin;startFill=0startArrow=diamondThin;startFill=1roundedfillColorstrokeColorstrokeWidthdashedopacityfontColorfontSizefontStylealignverticalAlignshadowedgeStylecurvedendArrowstartArrowendFillstartFill#dae8fc#6c8ebf#d5e8d4#82b366#f8cecc#b85450#fff2cc#d6b656#e1d5e7#9673a6| Issue | Solution |
|---|---|
| Shape not visible | Verify |
| Edge not connecting | Ensure |
| Styles not applying | Check semicolon separators in style string |
| Text not showing | Add |
| Stencil not rendering | Verify exact name in |
| Edges crossing shapes | Rearrange layout to minimize crossings |
| Multiple edges overlapping | Use different |
| Corner connections look ugly | Use edge centers instead ( |
| Diagram too spread out | Keep within x: 0-800, y: 0-600 viewport |
| XML crashes draw.io | Remove |
clientserverdbstrokeColor=none<>&"| Path | Purpose |
|---|---|
| XML validator — run after every generation |
| Master system prompt with all mxGraph rules |
| Quick-reference for XML syntax |
| Professional colors by component type |
| Working example for structural reference |
| Stencil libraries — 48 categories, 8900+ shapes |