drawio
drawio Diagram Generator
Quick Start: Create <mxfile> with <diagram> → Define <mxGraphModel> with grid settings → Add <root> with cells → Use <mxCell> for shapes and edges → Set geometry with <mxGeometry> → Wrap in ```drawio fence.
Critical Rules
Structure Rules
- S1: Check Stencil Names 🚨 NEVER guess stencil names. Check stencils/README.md for EXACT names. Wrong:
mxgraph.cisco.router→ Correct:mxgraph.cisco.routers.router - S2: Stencils Require fillColor Many stencils have no default color. Always add
fillColor/strokeColor. Exception: edge/link stencils are connectors, not devices. - S3: Root Cells Required Must include
<mxCell id="0"/>and<mxCell id="1" parent="0"/>or diagram won't render. - S4: Labels Below Stencils Use
verticalLabelPosition=bottom;verticalAlign=top;labelPosition=center;align=center;for device labels. - S5: mxCell Must Be Siblings ALL mxCell elements must be siblings under
<root>— NEVER nest mxCell inside another mxCell. - S6: Container Transparency For container shapes, use
fillColor=none;to make background transparent and prevent covering child elements.
Preset Color Palette: Blue(#dae8fc,#6c8ebf) Green(#d5e8d4,#82b366) Orange(#ffe6cc,#d79b00) Red(#f8cecc,#b85450) Purple(#e1d5e7,#9673a6) Yellow(#fff2cc,#d6b656) Gray(#f5f5f5,#666666)
Layout Rules
- L1: Starting Margin Begin positioning from x=40, y=40.
- L2: Element Spacing Keep 40-60px gaps between connected shapes; 150-200px for routing channels.
- L3: Compact Layouts Use vertical stacking or grid layouts. Avoid spreading elements too far apart.
More from markdown-viewer/skills
architecture
Create layered system architecture diagrams using HTML/CSS templates with color-coded tiers and grid layouts. Best for technology stacks, microservices topology, and multi-tier application design.
2.0Kuml
Create UML diagrams using PlantUML syntax. Best for software modeling — Class, Sequence, Activity, State Machine, Component, Use Case, and Deployment diagrams with concise text-based notation and auto-layout.
1.9Kinfographic
Create template-based infographics with space-separated key-value syntax (NOT YAML). Best for KPI dashboards, timelines, roadmaps, SWOT analysis, funnels, comparisons, and org charts with quick visual impact.
1.8Kcanvas
Create spatial diagrams with free-positioned nodes using JSON format. Best for concept maps, knowledge graphs, and planning boards requiring precise x/y coordinate control.
1.8Kgraphviz
Create directed/undirected graphs using DOT language with automatic layout. Best for dependency trees, call graphs, package hierarchies, and module relationships requiring fine-grained edge routing.
1.8Knetwork
Create network topology diagrams using PlantUML syntax with mxgraph device icons (Cisco, Citrix, etc.). Best for LAN/WAN layouts, datacenter interconnects, and physical/logical network design.
1.7K