drawio
Fungsinya
Skill ini mengajari agent cara menggambar diagram dalam format draw.io. Pengguna bisa mengedit hasilnya nanti di draw.io, dan skill ini cocok untuk diagram alur, diagram sistem, dan mockup sederhana.
Kapan dipakai
- βSaat pengguna meminta diagram alur, diagram arsitektur, atau diagram sekuens.
- βSaat pengguna membutuhkan diagram yang disimpan sebagai file .drawio yang bisa mereka edit nanti.
- βSaat pengguna ingin diagram diekspor ke PNG, SVG, atau PDF dengan sumber yang bisa diedit ikut disertakan.
Link skill
https://github.com/jgraph/drawio-mcp/blob/main/plugins/antigravity/skills/drawio/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βBuatkan diagram alur proses pendaftaran saya sebagai file draw.io yang bisa saya edit nanti.β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Agent menulis diagram sebagai teks Mermaid, yang diubah dan ditata oleh draw.io, atau sebagai XML draw.io. Lalu agent menyimpan atau mengekspor file itu.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
Draw.io Diagram Skill
Generate draw.io diagrams as native .drawio files. Author each diagram either as Mermaid (concise text that the draw.io desktop CLI converts and lays out for you) or as draw.io XML directly. Optionally auto-layout XML-authored diagrams with ELK, export to PNG/SVG/PDF with the diagram XML embedded (so the exported file stays editable in draw.io), or generate a browser URL that opens the diagram directly in the draw.io editor.
Inline viewer first. This skill writes files and opens them with a shell command. If the draw.io MCP server's create_diagram tool is available in a chat that shows diagrams inline (VS Code's or Cursor's own chat, Claude.ai, ChatGPT), and the user hasn't asked for a .drawio file, an export or a URL, call create_diagram instead: the diagram appears in the conversation, with no file and no shell command. Claude Code, Codex and Copilot CLI don't show diagrams inline, not even in their VS Code or JetBrains extensions: there create_diagram only returns a link, so use this skill.
Authoring: Mermaid or XML?
The desktop CLI converts Mermaid to a native .drawio file and lays it out automatically, which is far more reliable than hand-positioning cells in XML.
| Author as | Best for | Needs desktop CLI? |
|---|---|---|
| Mermaid | Flowcharts, sequence, class, state, ER, gantt, mindmap, timeline, user journey, quadrant, C4, git graph, pie, and other standard types | Yes β to convert to .drawio |
| XML | Custom styling, precise/hand positioning, specific shape libraries (AWS, Azure, network, UML detailβ¦), or when the desktop CLI is not installed | No (optional ELK --layout needs the CLI) |
- Prefer Mermaid when the desktop CLI is available and the request is one of the standard types above.
- Use XML for precise control, or as the universal fallback: XML needs no CLI, so it's the only option when the desktop app isn't installed (deliver a
.drawiofile or aurl). For XML you can let the CLI apply an ELK auto-layout instead of computing coordinates yourself.
If you're unsure whether the desktop CLI is present, detect it first (see Locating the CLI).
The pipeline
Every diagram becomes a native .drawio file first, then is delivered in the requested output format, whether you authored Mermaid or XML.
- Author β
.drawio- Mermaid: write the Mermaid to a
.mmdfile, then convert it with the CLI:
Delete thedrawio -x -f xml -o diagram.drawio diagram.mmd.mmdafterward β the.drawiois the artifact. - XML: write the mxGraphModel XML to
diagram.drawio(see XML format), then run the repair pass on it. Optionally apply an ELK layout.
- Mermaid: write the Mermaid to a
- Deliver (identical for both sources):
- (no format) β keep
diagram.drawioand open it. - png / svg / pdf β export from the
.drawiowith embedded XML, then delete the source.drawio:drawio -x -f png -e -b 10 -o diagram.drawio.png diagram.drawio - url β build a browser URL from the
.drawioXML, open it, and keep the.drawioas a local copy (see Browser URL output).
- (no format) β keep
- Open the result β the exported file, the URL, or the
.drawio(see Opening the result). If the open command fails, print the absolute path (or URL) so the user can open it manually.
Always convert Mermaid to .drawio first, then export β direct Mermaid β PNG export with -e is broken in current draw.io Desktop (the embedded-XML step crashes); the two-step path is reliable and produces an editable embed.
If Mermaid was requested but no desktop CLI is available, author the same diagram as XML.
ELK layout for XML
The CLI's --layout step auto-positions XML-authored diagrams with the same ELK layouts as the editor's Arrange βΈ Layout menu and the draw.io MCP app server. Generate the cells with approximate (or even 0,0) positions and get the graph structure β nodes and edges β right. Use verticalFlow / horizontalFlow for flow-style diagrams and organic for networks. Mermaid-authored diagrams are already laid out β don't add --layout.
Lay out in place after you write the file (reading and overwriting the same path is supported), or combine layout with export in one call:
drawio -x -f xml --layout verticalFlow
Pertanyaan umum
Apakah saya perlu memasang draw.io?
Beberapa pilihan membutuhkan program desktop draw.io, seperti mengubah teks Mermaid menjadi file.
Apa itu Mermaid?
Mermaid adalah teks sederhana yang menggambarkan diagram, dan draw.io mengubahnya menjadi gambar.
Bisakah saya tetap mengedit PNG yang diekspor?
Bisa. Skill menyatakan XML diagram bisa disematkan sehingga file ekspor tetap bisa diedit di draw.io.
Detail
Deskripsi asli dari pembuat
Always use when user asks to create, generate, draw, or design a diagram, flowchart, architecture diagram, ER diagram, sequence diagram, class diagram, network diagram, mockup, wireframe, or UI sketch, or mentions draw.io, drawio, drawoi, .drawio files, or diagram export to PNG/SVG/PDF. Exception: in a chat that shows diagrams inline (VS Code's or Cursor's own chat, Claude.ai, ChatGPT) where the draw.io MCP server's create_diagram tool is available, call that tool instead, unless the user asks for a file or an export. Claude Code, Codex and Copilot CLI, also in their VS Code and JetBrains exte
repo: jgraph/drawio-mcp
Popularitas
- Bintang GitHub
- 5.8k
- Peringkat
- #14740
- Lisensi
- Apache-2.0
- Diperbarui
- 2/11/2026
Komentar
- β¦
Skill serupa
canvas
394kMemungkinkan agent Anda menampilkan widget visual yang di-hosting di panel Mac yang terhubung, lalu menyembunyikan panel atau memindahkannya ke halaman lain.
control-ui
394kMembantu agent Anda mengatur dan memecahkan masalah OpenClaw Control UI, termasuk sesi, dasbor, dan Gateway yang terhubung.
diagram-maker
394kMembantu agent Anda membuat diagram yang jelas sebagai SVG, HTML, atau Excalidraw yang dapat diedit untuk proses, arsitektur sistem, dan sketsa papan tulis.