Token导航 LogoToken导航TokenDH.com
运维和基础设施external-servicegithub未标认证来源可访问clear审计通过

draw-io绘制 io

Agent Skill

draw-io 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

442

周安装

19

GitHub Stars

27

下载量

155
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:draw-io(绘制 io)
来源仓库:https://github.com/ekusiadadus/draw-mcp
仓库路径:skills/draw-io
安装命令:
npx skills add https://github.com/ekusiadadus/draw-mcp --skill draw-io
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/ekusiadadus/draw-mcp --skill draw-io

简介

draw-io 生成符合 draw.io XML 规范的图表文件,确保跨平台渲染一致性。

  • 适用于架构图、流程图和数据结构可视化场景。
  • 提供 23 项验证规则保证输出质量,支持 PNG 导出。
  • 使用前需了解 mxfile 结构和 diagram 元素组织方式。
  • draw-io 属于运维和基础设施类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

draw.io XML Generation Specification v2.0

1. Scope

This specification defines the rules for AI-generated draw.io XML files. It ensures consistent, high-quality output that renders correctly in draw.io desktop, web, and PNG export. Rules are categorized as:

  • MUST (Severity: ERROR) — Violations break rendering or structure
  • SHOULD (Severity: WARNING) — Violations degrade quality
  • INFORMATIONAL (Severity: INFO) — Suggestions for best practices

All rules are enforced by the draw-mcp-validate CLI tool with 23 validation rules.

2. Structural Rules (MUST)

2.1 File Hierarchy

mxfile > diagram > mxGraphModel > root > mxCell...

Every file MUST follow this hierarchy. The mxfile element is the root.

2.2 Root Cells

Two root cells MUST always be present:

<mxCell id="0"/>
<mxCell id="1" parent="0"/>

Cell id="0" is the invisible root. Cell id="1" is the default layer with parent="0".

2.3 Parent References

Every mxCell with a parent attribute MUST reference an existing cell id. Orphaned references cause rendering failures.

2.4 Vertex/Edge Exclusivity

A cell MUST NOT have both vertex="1" and edge="1". It is either a shape or a connection, never both.

2.5 Edge Geometry

Edge mxGeometry MUST have relative="1":

<mxCell id="e1" edge="1" parent="1" source="a" target="b"
  style="edgeStyle=orthogonalEdgeStyle;">
  <mxGeometry relative="1" as="geometry"/>
</mxCell>

2.6 Unique IDs

All mxCell elements MUST have unique id attributes.

2.7 XML Well-Formedness

  • MUST NOT use -- inside XML comments (illegal per XML spec)
  • MUST escape special characters in attribute values: &, <, >, "

3. Style String Rules (MUST)

3.1 Format

Style strings use key=value; pairs with a trailing semicolon:

style="rounded=1;whiteSpace=wrap;html=1;fontFamily=Noto Sans JP;fontSize=18;"

3.2 Boolean Values

Boolean style keys MUST use 0 or 1, never true or false:

<!-- CORRECT -->
style="rounded=1;html=1;"

<!-- WRONG -->
style="rounded=true;html=false;"

3.3 fontFamily on All Text

Every cell with a value attribute MUST include fontFamily=FontName; in its style:

<mxCell id="a" value="Label"
  style="rounded=1;fontFamily=Noto Sans JP;fontSize=18;"
  vertex="1" parent="1"/>

3.4 Font Size

Minimum font size is 14px (MUST). Recommended size is 18px (SHOULD).

3.5 Known Keys

Use only valid draw.io style keys. Common typos (e.g., storkeColor for strokeColor) are detected and flagged.

4. Layout Rules (SHOULD)

4.1 Grid Alignment

Align node positions to a 10px grid (multiples of 10).

4.2 Node Spacing

  • Minimum spacing: 60px between nodes
  • Recommended: 200px horizontal, 120px vertical

4.3 Edge Final Segment

The final straight segment of an edge MUST be at least 20px for arrowheads to render cleanly.

5. Edge Routing (SHOULD)

5.1 Z-Order

Edges SHOULD be declared before vertices in XML for correct Z-order (arrows behind shapes):

<root>
  <mxCell id="0"/><mxCell id="1" parent="0"/>
  <!-- EDGES FIRST -->
  <mxCell id="e1" edge="1" .../>
  <!-- VERTICES AFTER -->
  <mxCell id="a" vertex="1" .../>
</root>

5.2 Orthogonal Style

Use edgeStyle=orthogonalEdgeStyle for right-angle connectors. Add rounded=1 for cleaner bends.

5.3 jettySize

Use jettySize=auto for better port spacing on orthogonal edges.

5.4 jumpStyle

For crossing edges, use jumpStyle=arc or jumpStyle=gap to show crossings clearly.

5.5 Waypoints

Add explicit waypoints when edges would overlap:

<mxGeometry relative="1" as="geometry">
  <Array as="points">
    <mxPoint x="300" y="150"/>
  </Array>
</mxGeometry>

5.6 Connection Points

Use exitX/exitY and entryX/entryY (values 0-1) to control which side of a node an edge connects to. Spread connections across different sides to prevent overlap.

6. Containers (SHOULD)

6.1 Group Container

Invisible grouping with no visual border:

<mxCell id="grp1" style="group;" vertex="1" parent="1">
  <mxGeometry x="100" y="100" width="300" height="200" as="geometry"/>
</mxCell>

6.2 Swimlane Container

Visible title bar, ideal for service boundaries:

<mxCell id="svc1" value="User Service"
  style="swimlane;startSize=30;fillColor=#dae8fc;strokeColor=#6c8ebf;fontFamily=Noto Sans JP;fontSize=16;"
  vertex="1" parent="1">
  <mxGeometry x="100" y="100" width="300" height="200" as="geometry"/>
</mxCell>

Swimlanes SHOULD specify startSize for the title bar height.

6.3 Custom Container

Any shape acting as a container:

style="rounded=1;container=1;pointerEvents=0;"

Containers (except swimlanes) SHOULD include pointerEvents=0; to prevent connection capture.

6.4 Children Coordinates

Children MUST use relative coordinates within their parent container:

<!-- Child at (20, 40) relative to container origin -->
<mxCell id="child" vertex="1" parent="svc1">
  <mxGeometry x="20" y="40" width="120" height="60" as="geometry"/>
</mxCell>

Children SHOULD not extend beyond parent container bounds.

6.5 Collapsible

Consider adding collapsible=1 for interactive containers (INFO).

7. Layers (SUPPORTED)

Layers are additional cells with parent="0" (like cell id="1"):

<mxCell id="0"/>
<mxCell id="1" parent="0"/>                    <!-- Default layer -->
<mxCell id="layer-bg" value="Background" parent="0"/>  <!-- Custom layer -->
<mxCell id="layer-fg" value="Foreground" parent="0"/>  <!-- Custom layer -->

Assign elements to layers via parent="layerId". Layer cells do not require fontFamily.

8. Export Modes (INFORMATIONAL)

8.1 Transparent Background

Set page="0" on mxGraphModel for transparent background in PNG export.

8.2 PNG Verification

Always verify diagrams with PNG export:

drawio -x -f png -s 2 -t -o output.png input.drawio

8.3 Embed Diagram

For portable files, consider type="embed" on mxfile.

9. Japanese Text (SHOULD)

  • Allocate 30-40px width per Japanese character
  • Use Noto Sans JP as default font for cross-platform compatibility
  • Set defaultFontFamily="Noto Sans JP" on mxGraphModel

10. Validation

CLI Usage

# Validate a file (text output, warning+ severity)
draw-mcp-validate diagram.drawio

# JSON output
draw-mcp-validate diagram.drawio --format json

# Errors only
draw-mcp-validate diagram.drawio --severity error

# Multiple files
draw-mcp-validate *.drawio

Rule Summary (23 rules)

ModuleRulesSeverity
structureroot-cells, hierarchy, vertex-edge-exclusivity, parent-reference, unique-idsERROR
styletrailing-semicolon (W), boolean-values (E), typo (W), font-family (E)Mixed
edgez-order (W), relative (E), arrowhead-segment (W), node-spacing (W)Mixed
containerpointer-events (W), children-bounds (W), swimlane-start-size (W), collapsible (I)Mixed
textjapanese-width (W), html-escape (W), font-size (E/W)Mixed
exportpage-setting (W), embed-diagram (I)Mixed

Quick Decision Guide

NeedApproach
Custom styling, precise positioning, Japanese textXML (this skill)
Simple flowchart, sequence, ER diagramMermaid.js via MCP
Inline preview in chatMCP App Server (mcp.draw.io/mcp)

Supporting Files

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

29.26%
按下载量换算45

OpenCode

23.87%
按下载量换算37

Gemini CLI

17.58%
按下载量换算27

Cursor

10.82%
按下载量换算17

Antigravity

8.39%
按下载量换算13

windsurf

3.38%
按下载量换算5

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills