drawio-logical-diagrams by giuseppe-trisciuoglio/developer-kit
npx skills add https://github.com/giuseppe-trisciuoglio/developer-kit --skill drawio-logical-diagrams以 draw.io 原生 XML 格式创建专业的逻辑图。此技能能够生成可用于生产的 .drawio 文件,用于逻辑流程图、系统架构可视化以及使用通用形状和符号的抽象过程表示。
在以下情况下使用此技能:
请勿用于:
aws-drawio-architecture-diagrams)广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
mxfile:包含主机和版本信息的根元素diagram:包含图表定义mxGraphModel:画布设置(网格、页面大小)root:所有单元格的容器(必须包含 id="0" 和 id="1")mxCell:单个形状(顶点)或连接器(边)每个 .drawio 文件都遵循以下 XML 结构:
<mxfile host="app.diagrams.net" agent="Claude" version="24.7.17">
<diagram id="logical-flow-1" name="Logical Flow">
<mxGraphModel dx="1200" dy="800" grid="1" gridSize="10" guides="1"
tooltips="1" connect="1" arrows="1" fold="1" page="1"
pageScale="1" pageWidth="1169" pageHeight="827" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<!-- Shapes and connectors here -->
</root>
</mxGraphModel>
</diagram>
</mxfile>
关键规则:
| 形状 | 样式 |
|---|---|
| 矩形 | rounded=0;whiteSpace=wrap;html=1; |
| 圆角矩形 | rounded=1;whiteSpace=wrap;html=1; |
| 椭圆/圆形 | ellipse;whiteSpace=wrap;html=1; |
| 菱形 | rhombus;whiteSpace=wrap;html=1; |
| 圆柱体 | shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1; |
| 六边形 | shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1; |
| 平行四边形 | shape=ext;double=1;rounded=0;whiteSpace=wrap;html=1; |
| 元素类型 | 填充颜色 | 边框颜色 | 用途 |
|---|---|---|---|
| 过程 | #dae8fc (浅蓝色) | #6c8ebf | 操作/动作 |
| 决策 | #fff2cc (浅黄色) | #d6b656 | 条件分支 |
| 开始/结束 | #d5e8d4 (浅绿色) | #82b366 | 终止状态 |
| 数据/存储 | #e1f5fe (浅青色) | #0277bd | 数据库/文件 |
| 实体 | #f3e5f5 (浅紫色) | #7b1fa2 | 外部系统 |
| 错误/停止 | #f8cecc (浅红色) | #b85450 | 错误状态 |
| 参与者/用户 | #ffe0b2 (浅橙色) | #f57c00 | 用户/参与者 |
| 容器 | #f5f5f5 (浅灰色) | #666666 | 分组区域 |
标准流程:
edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=classic;endFill=1;strokeColor=#666666;strokeWidth=2;
虚线(替代/可选):
edgeStyle=orthogonalEdgeStyle;dashed=1;dashPattern=5 5;strokeColor=#666666;
箭头头部样式:
endArrow=classic;endFill=1 - 实心三角形endArrow=open;endFill=0 - 空心箭头endArrow=blockThin;endFill=1 - 块状箭头显示数据或过程在系统组件间的逻辑流动:
┌─────────┐ ┌─────────┐ ┌─────────┐
│ User │────▶│ Service │────▶│ Data │
└─────────┘ └─────────┘ └─────────┘
关键元素:
系统组件的抽象表示:
┌─────────────────────────────────────────┐
│ Presentation Layer │
│ ┌─────────────┐ ┌─────────────┐ │
│ │ Web UI │ │ Mobile │ │
│ └─────────────┘ └─────────────┘ │
└─────────────────────────────────────────┘
│
┌─────────────────────────────────────────┐
│ Application Layer │
│ ┌─────────────┐ ┌─────────────┐ │
│ │ API │ │ Business │ │
│ │ Gateway │ │ Logic │ │
│ └─────────────┘ └─────────────┘ │
└─────────────────────────────────────────┘
│
┌─────────────────────────────────────────┐
│ Data Layer │
│ ┌─────────────┐ ┌─────────────┐ │
│ │ Database │ │ Cache │ │
│ └─────────────┘ └─────────────┘ │
└─────────────────────────────────────────┘
业务流程建模:
| 符号 | 含义 |
|---|---|
| 圆形 | 开始/结束事件 |
| 圆角矩形 | 活动/任务 |
| 菱形 | 网关/决策 |
| 箭头 | 序列流 |
组件间的交互:
┌─────────┐ ┌─────────┐ ┌─────────┐
│ Actor │ │Service A│ │Service B│
└────┬────┘ └────┬────┘ └────┬────┘
│ │ │
│─────────────▶│ │
│ │─────────────▶│
│ │◀─────────────│
│◀─────────────│ │
系统数据移动:
<mxCell id="2" value="Process Name"
style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=12;"
vertex="1" parent="1">
<mxGeometry x="200" y="100" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="3" value="Decision?"
style="rhombus;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;fontSize=12;"
vertex="1" parent="1">
<mxGeometry x="280" y="200" width="80" height="80" as="geometry" />
</mxCell>
<mxCell id="4" value="Start"
style="ellipse;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;fontSize=12;"
vertex="1" parent="1">
<mxGeometry x="200" y="300" width="80" height="40" as="geometry" />
</mxCell>
<mxCell id="5" value="Database"
style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;fillColor=#e1f5fe;strokeColor=#0277bd;fontSize=12;"
vertex="1" parent="1">
<mxGeometry x="400" y="100" width="60" height="80" as="geometry" />
</mxCell>
<mxCell id="10"
style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=classic;endFill=1;strokeColor=#666666;strokeWidth=2;"
edge="1" parent="1" source="2" target="3">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="11" value="Data"
style="text;html=1;align=center;verticalAlign=middle;fontSize=11;fontColor=#333333;labelBackgroundColor=#ffffff;"
vertex="1" parent="1">
<mxGeometry x="250" y="160" width="40" height="20" as="geometry" />
</mxCell>
有关详细模板和形状参考,请参阅:
用户请求: "创建一个逻辑流程图,展示订单处理过程:客户提交订单,系统验证,如果有效则处理付款并发货,如果无效则通知客户。"
生成的 XML:
<mxfile host="app.diagrams.net" agent="Claude" version="24.7.17">
<diagram id="order-flow-1" name="Order Processing">
<mxGraphModel dx="1200" dy="800" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1169" pageHeight="827" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<!-- Start -->
<mxCell id="2" value="Start"
style="ellipse;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;fontSize=12;"
vertex="1" parent="1">
<mxGeometry x="80" y="50" width="80" height="40" as="geometry" />
</mxCell>
<!-- Submit Order -->
<mxCell id="3" value="Submit Order"
style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=12;"
vertex="1" parent="1">
<mxGeometry x="60" y="130" width="120" height="60" as="geometry" />
</mxCell>
<!-- Validate -->
<mxCell id="4" value="Validate
Order?"
style="rhombus;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;fontSize=12;"
vertex="1" parent="1">
<mxGeometry x="80" y="230" width="80" height="80" as="geometry" />
</mxCell>
<!-- Invalid: Notify -->
<mxCell id="5" value="Notify
Customer"
style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;fontSize=12;"
vertex="1" parent="1">
<mxGeometry x="220" y="240" width="100" height="50" as="geometry" />
</mxCell>
<!-- Valid: Process Payment -->
<mxCell id="6" value="Process
Payment"
style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=12;"
vertex="1" parent="1">
<mxGeometry x="60" y="350" width="120" height="60" as="geometry" />
</mxCell>
<!-- Ship -->
<mxCell id="7" value="Ship Order"
style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=12;"
vertex="1" parent="1">
<mxGeometry x="60" y="450" width="120" height="60" as="geometry" />
</mxCell>
<!-- End -->
<mxCell id="8" value="End"
style="ellipse;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;fontSize=12;"
vertex="1" parent="1">
<mxGeometry x="80" y="550" width="80" height="40" as="geometry" />
</mxCell>
<!-- Connectors -->
<mxCell id="10" style="edgeStyle=orthogonalEdgeStyle;rounded=0;endArrow=classic;endFill=1;strokeColor=#666666;strokeWidth=2;" edge="1" parent="1" source="2" target="3">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="11" style="edgeStyle=orthogonalEdgeStyle;rounded=0;endArrow=classic;endFill=1;strokeColor=#666666;strokeWidth=2;" edge="1" parent="1" source="3" target="4">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="12" value="No" style="edgeStyle=orthogonalEdgeStyle;rounded=0;endArrow=classic;endFill=1;strokeColor=#b85450;strokeWidth=2;fontSize=11;" edge="1" parent="1" source="4" target="5">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="13" value="Yes" style="edgeStyle=orthogonalEdgeStyle;rounded=0;endArrow=classic;endFill=1;strokeColor=#82b366;strokeWidth=2;fontSize=11;" edge="1" parent="1" source="4" target="6">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="14" style="edgeStyle=orthogonalEdgeStyle;rounded=0;endArrow=classic;endFill=1;strokeColor=#666666;strokeWidth=2;" edge="1" parent="1" source="6" target="7">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="15" style="edgeStyle=orthogonalEdgeStyle;rounded=0;endArrow=classic;endFill=1;strokeColor=#666666;strokeWidth=2;" edge="1" parent="1" source="7" target="8">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="16" style="edgeStyle=orthogonalEdgeStyle;rounded=0;endArrow=classic;endFill=1;strokeColor=#b85450;strokeWidth=2;" edge="1" parent="1" source="5" target="8">
<mxGeometry relative="1" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>
用户请求: "为具有表示层、业务逻辑层和数据层的 Web 应用程序创建一个逻辑架构图。"
生成的 XML:
<mxfile host="app.diagrams.net" agent="Claude" version="24.7.17">
<diagram id="three-tier-1" name="Three-Tier Architecture">
<mxGraphModel dx="1200" dy="800" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1169" pageHeight="827" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<!-- User -->
<mxCell id="2" value="User"
style="ellipse;whiteSpace=wrap;html=1;fillColor=#ffe0b2;strokeColor=#f57c00;fontSize=12;"
vertex="1" parent="1">
<mxGeometry x="40" y="340" width="60" height="40" as="geometry" />
</mxCell>
<!-- Presentation Layer -->
<mxCell id="3" value="Presentation Layer"
style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#666666;fontSize=14;fontStyle=1;"
vertex="1" parent="1">
<mxGeometry x="160" y="40" width="300" height="180" as="geometry" />
</mxCell>
<mxCell id="4" value="Web
Browser"
style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=12;"
vertex="1" parent="3">
<mxGeometry x="20" y="30" width="80" height="50" as="geometry" />
</mxCell>
<mxCell id="5" value="Mobile
App"
style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=12;"
vertex="1" parent="3">
<mxGeometry x="120" y="30" width="80" height="50" as="geometry" />
</mxCell>
<mxCell id="6" value="API
Client"
style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=12;"
vertex="1" parent="3">
<mxGeometry x="200" y="30" width="80" height="50" as="geometry" />
</mxCell>
<!-- Application Layer -->
<mxCell id="7" value="Application Layer"
style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#666666;fontSize=14;fontStyle=1;"
vertex="1" parent="1">
<mxGeometry x="160" y="260" width="300" height="180" as="geometry" />
</mxCell>
<mxCell id="8" value="API
Gateway"
style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;fontSize=12;"
vertex="1" parent="7">
<mxGeometry x="20" y="30" width="80" height="50" as="geometry" />
</mxCell>
<mxCell id="9" value="Business
Logic"
style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=12;"
vertex="1" parent="7">
<mxGeometry x="110" y="30" width="80" height="50" as="geometry" />
</mxCell>
<mxCell id="10" value="Auth
Service"
style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;fontSize=12;"
vertex="1" parent="7">
<mxGeometry x="200" y="30" width="80" height="50" as="geometry" />
</mxCell>
<!-- Data Layer -->
<mxCell id="11" value="Data Layer"
style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#666666;fontSize=14;fontStyle=1;"
vertex="1" parent="1">
<mxGeometry x="160" y="480" width="300" height="180" as="geometry" />
</mxCell>
<mxCell id="12" value="Primary
Database"
style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;fillColor=#e1f5fe;strokeColor=#0277bd;fontSize=12;"
vertex="1" parent="11">
<mxGeometry x="20" y="30" width="60" height="80" as="geometry" />
</mxCell>
<mxCell id="13" value="Read
Replica"
style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;fillColor=#e1f5fe;strokeColor=#0277bd;fontSize=12;"
vertex="1" parent="11">
<mxGeometry x="100" y="30" width="60" height="80" as="geometry" />
</mxCell>
<mxCell id="14" value="Cache
(Redis)"
style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;fillColor=#fff3e0;strokeColor=#e65100;fontSize=12;"
vertex="1" parent="11">
<mxGeometry x="180" y="30" width="60" height="80" as="geometry" />
</mxCell>
<!-- Connectors -->
<mxCell id="20" style="edgeStyle=orthogonalEdgeStyle;rounded=0;endArrow=classic;endFill=1;strokeColor=#666666;strokeWidth=2;" edge="1" parent="1" source="2" target="4">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="21" style="edgeStyle=orthogonalEdgeStyle;rounded=0;endArrow=classic;endFill=1;strokeColor=#666666;strokeWidth=2;" edge="1" parent="1" source="4" target="8">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="22" style="edgeStyle=orthogonalEdgeStyle;rounded=0;endArrow=classic;endFill=1;strokeColor=#666666;strokeWidth=2;" edge="1" parent="1" source="8" target="9">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="23" style="edgeStyle=orthogonalEdgeStyle;rounded=0;endArrow=classic;endFill=1;strokeColor=#666666;strokeWidth=2;" edge="1" parent="1" source="9" target="12">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="24" value="query" style="edgeStyle=orthogonalEdgeStyle;rounded=0;endArrow=open;endFill=0;strokeColor=#666666;strokeWidth=1;fontSize=10;dashed=1;" edge="1" parent="1" source="9" target="14">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="25" style="edgeStyle=orthogonalEdgeStyle;rounded=0;endArrow=classic;endFill=1;strokeColor=#666666;strokeWidth=2;" edge="1" parent="1" source="9" target="13">
<mxGeometry relative="1" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>
用户请求: "创建一个逻辑图,展示具有 API 网关、多个服务和用于异步通信的消息队列的微服务架构。"
参考: 有关完整的微服务模板,请参阅 diagram-templates.md。
每周安装量
289
仓库
GitHub 星标数
173
首次出现
2026年2月20日
安全审计
安装于
codex263
gemini-cli260
github-copilot257
cursor256
kimi-cli255
opencode255
Create professional logical diagrams in draw.io's native XML format. This skill enables generation of production-ready .drawio files for logical flow diagrams, system architecture visualizations, and abstract process representations using generic shapes and symbols.
Use this skill when:
Do NOT use for:
aws-drawio-architecture-diagrams)mxfile: Root element with host and versiondiagram: Contains the diagram definitionmxGraphModel: Canvas settings (grid, page size)root: Container for all cells (must include id="0" and id="1")mxCell: Individual shapes (vertices) or connectors (edges)Every .drawio file follows this XML structure:
<mxfile host="app.diagrams.net" agent="Claude" version="24.7.17">
<diagram id="logical-flow-1" name="Logical Flow">
<mxGraphModel dx="1200" dy="800" grid="1" gridSize="10" guides="1"
tooltips="1" connect="1" arrows="1" fold="1" page="1"
pageScale="1" pageWidth="1169" pageHeight="827" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<!-- Shapes and connectors here -->
</root>
</mxGraphModel>
</diagram>
</mxfile>
Key rules:
| Shape | Style |
|---|---|
| Rectangle | rounded=0;whiteSpace=wrap;html=1; |
| Rounded Rectangle | rounded=1;whiteSpace=wrap;html=1; |
| Ellipse/Circle | ellipse;whiteSpace=wrap;html=1; |
| Diamond | rhombus;whiteSpace=wrap;html=1; |
| Cylinder | shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1; |
| Hexagon | shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1; |
| Element Type | Fill Color | Border Color | Usage |
|---|---|---|---|
| Process | #dae8fc (light blue) | #6c8ebf | Operations/actions |
| Decision | #fff2cc (light yellow) | #d6b656 | Conditional branches |
| Start/End | #d5e8d4 (light green) | #82b366 |
Standard flow:
edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=classic;endFill=1;strokeColor=#666666;strokeWidth=2;
Dashed (alternative/optional):
edgeStyle=orthogonalEdgeStyle;dashed=1;dashPattern=5 5;strokeColor=#666666;
Arrow head styles:
endArrow=classic;endFill=1 - Filled triangleendArrow=open;endFill=0 - Open arrowendArrow=blockThin;endFill=1 - Block arrowShows the logical flow of data or processes through system components:
┌─────────┐ ┌─────────┐ ┌─────────┐
│ User │────▶│ Service │────▶│ Data │
└─────────┘ └─────────┘ └─────────┘
Key elements:
Abstract representation of system components:
┌─────────────────────────────────────────┐
│ Presentation Layer │
│ ┌─────────────┐ ┌─────────────┐ │
│ │ Web UI │ │ Mobile │ │
│ └─────────────┘ └─────────────┘ │
└─────────────────────────────────────────┘
│
┌─────────────────────────────────────────┐
│ Application Layer │
│ ┌─────────────┐ ┌─────────────┐ │
│ │ API │ │ Business │ │
│ │ Gateway │ │ Logic │ │
│ └─────────────┘ └─────────────┘ │
└─────────────────────────────────────────┘
│
┌─────────────────────────────────────────┐
│ Data Layer │
│ ┌─────────────┐ ┌─────────────┐ │
│ │ Database │ │ Cache │ │
│ └─────────────┘ └─────────────┘ │
└─────────────────────────────────────────┘
Business process modeling:
| Symbol | Meaning |
|---|---|
| Circle | Start/End Event |
| Rounded Rectangle | Activity/Task |
| Diamond | Gateway/Decision |
| Arrow | Sequence Flow |
Interaction between components:
┌─────────┐ ┌─────────┐ ┌─────────┐
│ Actor │ │Service A│ │Service B│
└────┬────┘ └────┬────┘ └────┬────┘
│ │ │
│─────────────▶│ │
│ │─────────────▶│
│ │◀─────────────│
│◀─────────────│ │
System data movement:
<mxCell id="2" value="Process Name"
style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=12;"
vertex="1" parent="1">
<mxGeometry x="200" y="100" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="3" value="Decision?"
style="rhombus;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;fontSize=12;"
vertex="1" parent="1">
<mxGeometry x="280" y="200" width="80" height="80" as="geometry" />
</mxCell>
<mxCell id="4" value="Start"
style="ellipse;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;fontSize=12;"
vertex="1" parent="1">
<mxGeometry x="200" y="300" width="80" height="40" as="geometry" />
</mxCell>
<mxCell id="5" value="Database"
style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;fillColor=#e1f5fe;strokeColor=#0277bd;fontSize=12;"
vertex="1" parent="1">
<mxGeometry x="400" y="100" width="60" height="80" as="geometry" />
</mxCell>
<mxCell id="10"
style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=classic;endFill=1;strokeColor=#666666;strokeWidth=2;"
edge="1" parent="1" source="2" target="3">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="11" value="Data"
style="text;html=1;align=center;verticalAlign=middle;fontSize=11;fontColor=#333333;labelBackgroundColor=#ffffff;"
vertex="1" parent="1">
<mxGeometry x="250" y="160" width="40" height="20" as="geometry" />
</mxCell>
For detailed templates and shape references, see:
User Request: "Create a logical flow diagram showing order processing: customer submits order, system validates, if valid then processes payment and ships, if invalid notifies customer."
Generated XML:
<mxfile host="app.diagrams.net" agent="Claude" version="24.7.17">
<diagram id="order-flow-1" name="Order Processing">
<mxGraphModel dx="1200" dy="800" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1169" pageHeight="827" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<!-- Start -->
<mxCell id="2" value="Start"
style="ellipse;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;fontSize=12;"
vertex="1" parent="1">
<mxGeometry x="80" y="50" width="80" height="40" as="geometry" />
</mxCell>
<!-- Submit Order -->
<mxCell id="3" value="Submit Order"
style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=12;"
vertex="1" parent="1">
<mxGeometry x="60" y="130" width="120" height="60" as="geometry" />
</mxCell>
<!-- Validate -->
<mxCell id="4" value="Validate
Order?"
style="rhombus;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;fontSize=12;"
vertex="1" parent="1">
<mxGeometry x="80" y="230" width="80" height="80" as="geometry" />
</mxCell>
<!-- Invalid: Notify -->
<mxCell id="5" value="Notify
Customer"
style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;fontSize=12;"
vertex="1" parent="1">
<mxGeometry x="220" y="240" width="100" height="50" as="geometry" />
</mxCell>
<!-- Valid: Process Payment -->
<mxCell id="6" value="Process
Payment"
style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=12;"
vertex="1" parent="1">
<mxGeometry x="60" y="350" width="120" height="60" as="geometry" />
</mxCell>
<!-- Ship -->
<mxCell id="7" value="Ship Order"
style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=12;"
vertex="1" parent="1">
<mxGeometry x="60" y="450" width="120" height="60" as="geometry" />
</mxCell>
<!-- End -->
<mxCell id="8" value="End"
style="ellipse;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;fontSize=12;"
vertex="1" parent="1">
<mxGeometry x="80" y="550" width="80" height="40" as="geometry" />
</mxCell>
<!-- Connectors -->
<mxCell id="10" style="edgeStyle=orthogonalEdgeStyle;rounded=0;endArrow=classic;endFill=1;strokeColor=#666666;strokeWidth=2;" edge="1" parent="1" source="2" target="3">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="11" style="edgeStyle=orthogonalEdgeStyle;rounded=0;endArrow=classic;endFill=1;strokeColor=#666666;strokeWidth=2;" edge="1" parent="1" source="3" target="4">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="12" value="No" style="edgeStyle=orthogonalEdgeStyle;rounded=0;endArrow=classic;endFill=1;strokeColor=#b85450;strokeWidth=2;fontSize=11;" edge="1" parent="1" source="4" target="5">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="13" value="Yes" style="edgeStyle=orthogonalEdgeStyle;rounded=0;endArrow=classic;endFill=1;strokeColor=#82b366;strokeWidth=2;fontSize=11;" edge="1" parent="1" source="4" target="6">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="14" style="edgeStyle=orthogonalEdgeStyle;rounded=0;endArrow=classic;endFill=1;strokeColor=#666666;strokeWidth=2;" edge="1" parent="1" source="6" target="7">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="15" style="edgeStyle=orthogonalEdgeStyle;rounded=0;endArrow=classic;endFill=1;strokeColor=#666666;strokeWidth=2;" edge="1" parent="1" source="7" target="8">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="16" style="edgeStyle=orthogonalEdgeStyle;rounded=0;endArrow=classic;endFill=1;strokeColor=#b85450;strokeWidth=2;" edge="1" parent="1" source="5" target="8">
<mxGeometry relative="1" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>
User Request: "Create a logical architecture diagram for a web application with presentation, business logic, and data tiers."
Generated XML:
<mxfile host="app.diagrams.net" agent="Claude" version="24.7.17">
<diagram id="three-tier-1" name="Three-Tier Architecture">
<mxGraphModel dx="1200" dy="800" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1169" pageHeight="827" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<!-- User -->
<mxCell id="2" value="User"
style="ellipse;whiteSpace=wrap;html=1;fillColor=#ffe0b2;strokeColor=#f57c00;fontSize=12;"
vertex="1" parent="1">
<mxGeometry x="40" y="340" width="60" height="40" as="geometry" />
</mxCell>
<!-- Presentation Layer -->
<mxCell id="3" value="Presentation Layer"
style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#666666;fontSize=14;fontStyle=1;"
vertex="1" parent="1">
<mxGeometry x="160" y="40" width="300" height="180" as="geometry" />
</mxCell>
<mxCell id="4" value="Web
Browser"
style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=12;"
vertex="1" parent="3">
<mxGeometry x="20" y="30" width="80" height="50" as="geometry" />
</mxCell>
<mxCell id="5" value="Mobile
App"
style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=12;"
vertex="1" parent="3">
<mxGeometry x="120" y="30" width="80" height="50" as="geometry" />
</mxCell>
<mxCell id="6" value="API
Client"
style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=12;"
vertex="1" parent="3">
<mxGeometry x="200" y="30" width="80" height="50" as="geometry" />
</mxCell>
<!-- Application Layer -->
<mxCell id="7" value="Application Layer"
style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#666666;fontSize=14;fontStyle=1;"
vertex="1" parent="1">
<mxGeometry x="160" y="260" width="300" height="180" as="geometry" />
</mxCell>
<mxCell id="8" value="API
Gateway"
style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;fontSize=12;"
vertex="1" parent="7">
<mxGeometry x="20" y="30" width="80" height="50" as="geometry" />
</mxCell>
<mxCell id="9" value="Business
Logic"
style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=12;"
vertex="1" parent="7">
<mxGeometry x="110" y="30" width="80" height="50" as="geometry" />
</mxCell>
<mxCell id="10" value="Auth
Service"
style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;fontSize=12;"
vertex="1" parent="7">
<mxGeometry x="200" y="30" width="80" height="50" as="geometry" />
</mxCell>
<!-- Data Layer -->
<mxCell id="11" value="Data Layer"
style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#666666;fontSize=14;fontStyle=1;"
vertex="1" parent="1">
<mxGeometry x="160" y="480" width="300" height="180" as="geometry" />
</mxCell>
<mxCell id="12" value="Primary
Database"
style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;fillColor=#e1f5fe;strokeColor=#0277bd;fontSize=12;"
vertex="1" parent="11">
<mxGeometry x="20" y="30" width="60" height="80" as="geometry" />
</mxCell>
<mxCell id="13" value="Read
Replica"
style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;fillColor=#e1f5fe;strokeColor=#0277bd;fontSize=12;"
vertex="1" parent="11">
<mxGeometry x="100" y="30" width="60" height="80" as="geometry" />
</mxCell>
<mxCell id="14" value="Cache
(Redis)"
style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;fillColor=#fff3e0;strokeColor=#e65100;fontSize=12;"
vertex="1" parent="11">
<mxGeometry x="180" y="30" width="60" height="80" as="geometry" />
</mxCell>
<!-- Connectors -->
<mxCell id="20" style="edgeStyle=orthogonalEdgeStyle;rounded=0;endArrow=classic;endFill=1;strokeColor=#666666;strokeWidth=2;" edge="1" parent="1" source="2" target="4">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="21" style="edgeStyle=orthogonalEdgeStyle;rounded=0;endArrow=classic;endFill=1;strokeColor=#666666;strokeWidth=2;" edge="1" parent="1" source="4" target="8">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="22" style="edgeStyle=orthogonalEdgeStyle;rounded=0;endArrow=classic;endFill=1;strokeColor=#666666;strokeWidth=2;" edge="1" parent="1" source="8" target="9">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="23" style="edgeStyle=orthogonalEdgeStyle;rounded=0;endArrow=classic;endFill=1;strokeColor=#666666;strokeWidth=2;" edge="1" parent="1" source="9" target="12">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="24" value="query" style="edgeStyle=orthogonalEdgeStyle;rounded=0;endArrow=open;endFill=0;strokeColor=#666666;strokeWidth=1;fontSize=10;dashed=1;" edge="1" parent="1" source="9" target="14">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="25" style="edgeStyle=orthogonalEdgeStyle;rounded=0;endArrow=classic;endFill=1;strokeColor=#666666;strokeWidth=2;" edge="1" parent="1" source="9" target="13">
<mxGeometry relative="1" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>
User Request: "Create a logical diagram showing microservice architecture with API gateway, multiple services, and message queue for async communication."
Reference: See diagram-templates.md for complete microservice template.
Weekly Installs
289
Repository
GitHub Stars
173
First Seen
Feb 20, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
codex263
gemini-cli260
github-copilot257
cursor256
kimi-cli255
opencode255
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
106,200 周安装
| Parallelogram | shape=ext;double=1;rounded=0;whiteSpace=wrap;html=1; |
| Terminal states |
| Data/Store | #e1f5fe (light cyan) | #0277bd | Databases/files |
| Entity | #f3e5f5 (light purple) | #7b1fa2 | External systems |
| Error/Stop | #f8cecc (light red) | #b85450 | Error states |
| Actor/User | #ffe0b2 (light orange) | #f57c00 | Users/actors |
| Container | #f5f5f5 (light gray) | #666666 | Grouping areas |