Generate professional-grade flowcharts, organizational charts, UML diagrams, and network topology diagrams, and output draw.io-compatible XML files.
Use Cases
- The user says "help me draw a flowchart," "draw an organizational chart," or "draw a system architecture diagram"
- The user needs professional diagrams for formal documents
- The user wants to visualize a certain process or structure
Execution Method
Generate a draw.io XML format file, which the user can directly open and edit with draw.io (desktop or online version).
Supported Diagram Types
- Flowchart: business processes, approval processes, development processes
- Organizational Chart: company/team hierarchy
- UML Diagram: class diagrams, sequence diagrams, use case diagrams
- Mind Map: topic expansion, knowledge structure
- Network Topology Diagram: system architecture, network structure
- Gantt Chart/Timeline: project scheduling
XML Generation Specifications
<?xml version="1.0" encoding="UTF-8"?>
<mxfile>
<diagram name="Page-1">
<mxGraphModel>
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<!-- 节点和连线 -->
<mxCell id="2" value="开始" style="rounded=1;whiteSpace=wrap;"
vertex="1" parent="1">
<mxGeometry x="100" y="100" width="120" height="60" as="geometry"/>
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>
Style Specifications
- Use a clear color scheme (mainly blue tones, with red marking important nodes)
- Even spacing between nodes, neat layout
- Use right-angle polylines or curves for connectors, avoiding crossings
- Moderate text size, use 14px for Chinese
Output Process
- Understand the user's needs, confirm the diagram type and content
- Generate the draw.io XML file and save it
- Tell the user the file path and how to open it
# 检测是否安装了 draw.io
# macOS
open -a "draw.io" /path/to/diagram.drawio
# 或使用在线版
# https://app.diagrams.net/
Output Specifications
- The generated file extension is
.drawio - If it is detected that the user has draw.io installed, automatically open the file
- If it is not installed, prompt the user that it can be opened with the online version
- For complex diagrams, first confirm the structural outline, then generate the complete XML