draw-io-diagram-generator
Skill này làm gì
Công cụ này tạo sơ đồ trực quan, như lưu đồ hoặc bản đồ kiến trúc, bằng định dạng đặc biệt gọi là draw.io. Nó tạo một file sẵn sàng mở trong các chương trình như VS Code hoặc trang web draw.io.
Khi nào nên dùng
- ✓Khi bạn cần vẽ lưu đồ để giải thích một quy trình.
- ✓Khi bạn cần tạo bản đồ về cách một hệ thống máy tính được tổ chức.
- ✓Để trực quan hóa cách các phần mềm khác nhau tương tác.
Liên kết skill
https://github.com/github/awesome-copilot/blob/main/skills/draw-io-diagram-generator/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Tạo một lưu đồ thể hiện các bước pha cà phê, có điểm bắt đầu, quá trình và điểm kết thúc.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Công cụ hiểu bạn muốn vẽ gì và chuyển nó thành code (XML) mà chương trình draw.io hiểu được. Nó dùng các mẫu được định sẵn hoặc tạo cấu trúc cơ bản để xây dựng sơ đồ.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Draw.io Diagram Generator
This skill enables you to generate, edit, and validate draw.io (.drawio) diagram files with
correct mxGraph XML structure. All generated files open immediately in the
Draw.io VS Code extension
(hediet.vscode-drawio) without any manual fixes required. You can also open the files in the draw.io web app or desktop app if you prefer.
1. When to Use This Skill
Trigger phrases (load this skill when you see these)
- "create a diagram", "draw a flowchart", "generate an architecture diagram"
- "design a sequence diagram", "make a UML class diagram", "build an ER diagram"
- "add a .drawio file", "update the diagram", "visualise the flow"
- "document the architecture", "show the data model", "diagram the service interactions"
- Any request to produce or modify a
.drawio,.drawio.svg, or.drawio.pngfile
Supported diagram types
| Diagram Type | Template Available | Description |
|---|---|---|
| Flowchart | assets/templates/flowchart.drawio |
Process flows with decisions and branches |
| System Architecture | assets/templates/architecture.drawio |
Multi-tier / layered service architecture |
| Sequence Diagram | assets/templates/sequence.drawio |
Actor lifelines and timed message flows |
| ER Diagram | assets/templates/er-diagram.drawio |
Database tables with relationships |
| UML Class Diagram | assets/templates/uml-class.drawio |
Classes, interfaces, enums, relationships |
| Network Topology | (use shape library) | Routers, servers, firewalls, subnets |
| BPMN Workflow | (use shape library) | Business process events, tasks, gateways |
| Mind Map | (manual) | Central topic with radiating branches |
2. Prerequisites
- If running with VS Code integration enabled, Install the drawio extension: draw.io VS Code extension —
hediet.vscode-drawio(extension id). Install with:ext install hediet.vscode-drawio - Supported file extensions:
.drawio,.drawio.svg,.drawio.png - Python 3.8+ (optional) — for the validation and shape-insertion scripts in
scripts/
3. Step-by-Step Agent Workflow
Follow these steps in order for every diagram generation task.
Step 1 — Understand the Request
Ask or infer:
- Diagram type — What kind of diagram? (flowchart, architecture, UML, ER, sequence, network...)
- Entities / actors — What are the main components, actors, classes, or tables?
- Relationships — How are they connected? What direction? What cardinality?
- Output path — Where should the
.drawiofile be saved? - Existing file — Are we creating new or editing an existing file?
If the request is ambiguous, infer the most sensible diagram type from context (e.g. "show the tables" → ER diagram, "show how the API call flows" → sequence diagram).
Step 2 — Select a Template or Start Fresh
- Use a template when the diagram type matches one in
assets/templates/. Copy the template structure and replace placeholder values. - Start fresh for novel layouts. Begin with the minimal valid skeleton:
<!-- Set modified="" to the current ISO 8601 timestamp when generating a new file -->
<mxfile host="Electron" modified="" version="26.0.0">
<diagram id="page-1" name="Page-1">
<mxGraphModel dx="1422" dy="762" 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" />
<!-- Your cells go here -->
</root>
</mxGraphModel>
</diagram>
</mxfile>
Rule: ids
0and1are ALWAYS required and must be the first two cells. Never reuse them.
Step 3 — Plan the Layout
Before generating XML, sketch the logical placement:
- Organise into rows or tiers (use swimlanes for layers)
- Horizontal spacing: 40–60px between same-row shapes
- Vertical spacing: 80–120px between tier rows
- Standard shape size:
120x60px for process boxes,160x80px for swimlanes - Default canvas: A4 landscape =
1169 x 827px
Step 4 — Generate the mxGraph XML
Vertex cell (every shape):
<mxCell id="unique-id" value="Label"
style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;"
vertex="1" parent="1">
…
Câu hỏi thường gặp
Tôi có cần cài đặt gì không?
Nếu bạn dùng VS Code, nên cài “draw.io VS Code extension”. Nếu không, bạn có thể mở file trên trang web draw.io.
Tôi có thể tạo những loại sơ đồ nào?
Bạn có thể tạo lưu đồ, sơ đồ kiến trúc hệ thống, sơ đồ tuần tự, sơ đồ cơ sở dữ liệu (ER) và sơ đồ UML, cũng như sơ đồ topo mạng.
File .drawio là gì?
Đó là file chứa toàn bộ thông tin của sơ đồ, cho phép chỉnh sửa và mở trong các chương trình tương thích với draw.io.
Chi tiết
Mô tả gốc của tác giả
Use when creating, editing, or generating draw.io diagram files (.drawio, .drawio.svg, .drawio.png). Covers mxGraph XML authoring, shape libraries, style strings, flowcharts, system architecture, sequence diagrams, ER diagrams, UML class diagrams, network topology, layout strategy, the hediet.vscode-drawio VS Code extension, and the full agent workflow from request to a ready-to-open file.
repo: github/awesome-copilot
Độ phổ biến
- Sao GitHub
- 40k
- Vị trí xếp hạng
- #7183
- Giấy phép
- MIT
- Cập nhật
- 15/10/2026
Bình luận
- …
Thêm skill từ kho mã này
acquire-codebase-knowledge
40kGiúp agent của bạn hiểu và ghi tài liệu cho một dự án mã nguồn có sẵn. Hữu ích khi đón thành viên mới hoặc nắm tổng quan về kiến trúc.
acreadiness-assess
40kGiúp agent của bạn đánh giá mức độ sẵn sàng cho AI của dự án và tạo báo cáo. Hữu ích để biết dự án đã sẵn sàng dùng công cụ AI đến đâu.
acreadiness-generate-instructions
40kGiúp agent của bạn tạo hướng dẫn cho công cụ AI dựa trên kết quả đánh giá. Hữu ích để cải thiện cách AI làm việc với mã và khắc phục các khoảng trống.
acreadiness-policy
40kGiúp agent của bạn xác định hoặc áp dụng chính sách đánh giá dự án bằng AI. Hữu ích để chuẩn hóa cách đánh giá dự án và đảm bảo tuân thủ.
Skill tương tự
canvas
394kCho phép agent của bạn hiện một widget trực quan được lưu trữ trên bảng Mac đã kết nối, rồi ẩn bảng hoặc chuyển nó sang trang khác.
control-ui
394kGiúp agent của bạn sắp xếp và khắc phục sự cố Control UI của OpenClaw, gồm các phiên, bảng điều khiển và Gateway đã kết nối.
diagram-maker
394kGiúp agent của bạn vẽ sơ đồ rõ ràng dạng SVG, HTML hoặc Excalidraw có thể sửa, cho quy trình, kiến trúc hệ thống và bản phác bảng trắng.