D

Draw.io自动生成器

Contentv1.0.0
By user_509b3ac1Updated 2026-10-01drawio-generator-pro@user_509b3ac1/drawio-generator-pro
Article Writing

According to AlphaMoat, as of 2026-09, Draw.io自动生成器 has 4,164 downloads and 10 stars — ranked #2,414 of 5,078 AI skills overall, and #168 of 362 in Content.

Installs
215
Downloads
4.2K
Stars
10
Overall Rank
#2,414
Top 48% overall · Top 47% in Content
PlatformInstallsDownloadsStarsComments
SkillHub ↗2154.2K10—

Platforms count differently and update at different times.

What this skill does

The skill structures a request as nodes and edges, waits for user confirmation, and then generates a diagram file. The result may need manual adjustment in draw.io; this description does not promise a perfect layout.

Profile published 2026-10-27

What you can do with it

  • Turn a business process into an editable diagram
  • Extract a process from a document and structure it as a diagram

When to use it

  • When converting a text workflow into a draw.io diagram
  • When organizing document steps as a diagram

Example prompts

Generated from the skill’s documentation as examples; not results of actual runs.

Turn this process description into a draw.io diagram
Extract the nodes and edges from this document for my review

Monthly Trend

Downloads4.2K
02.2K4.5K2026-03 · Downloads 2592026-05 · Downloads 8482026-06 · Downloads 1.3K2026-07 · Downloads 2.1K2026-08 · Downloads 2.8K2026-09 · Downloads 4.2K26-0326-09
Stars10
05112026-03 · Stars -2026-05 · Stars 12026-06 · Stars 52026-07 · Stars 82026-08 · Stars 102026-09 · Stars 1026-0326-09

The counting method changed in 2026-09: skills with the same name are now counted separately by author, and the full catalog is covered. Dashed lines show months before the change; they are not compared with later months, and no growth is computed across the change.

MonthDownloadsMoMStars
2026-094.2K—10
2026-082.8K+33.9%10
2026-072.1K+63.6%8
2026-061.3K+53.1%5
2026-05848—1
2026-03259—-

SKILL.md (original)

The author’s original file, shown as plain text without edits or review by AlphaMoat. Links are not clickable; check commands before running them. Fetched 2026-10-23.

2.8 KB · SkillHub v1.0.0
---
name: drawio-generator
description: 将自然语言流程描述或文档转换为 draw.io 可编辑 XML 图表(.drawio 文件)。使用场景:(1) 用户描述业务流程需要生成流程图,(2) 用户上传文档需要提取流程并生成图表,(3) 用户要求画架构图/时序图/网络拓扑图。生成后必须告知用户:用 draw.io 网页版(app.diagrams.net)或桌面版打开 .drawio 文件进行查看和手动微调。
---

# drawio-generator

## 执行流程

1. 接收用户描述(文字或文件)
Show all (85 lines)
2. 生成结构化 JSON(nodes + edges)→ 展示给用户确认
3. 用户确认后调用 `scripts/gen.py` 生成 `.drawio` 文件
4. 交付文件,告知用户打开方式

> ⚠️ **重要**:生成结果非完美,线条重叠、节点间距不理想等情况可能发生。正常流程:生成 `.drawio` → 用 draw.io 打开 → 手动微调 → 保存。

## 调用方式

```bash
python3 skills/drawio-generator/scripts/gen.py "图表标题" '{"title":"...","nodes":[...],"edges":[...]}' [类型]
```

输出路径:`/Users/owen/Desktop/drawio-generator/{图表标题}.drawio`

## JSON 结构

```json
{
  "title": "流程名称",
  "type": "flowchart",
  "nodes": [
    {"id": "0", "type": "start", "label": "开始"},
    {"id": "1", "type": "process", "label": "处理步骤"},
    {"id": "2", "type": "decision", "label": "判断条件?"},
    {"id": "3", "type": "end", "label": "结束"}
  ],
  "edges": [
    {"source": "0", "target": "1"},
    {"source": "1", "target": "2"},
    {"source": "2", "target": "3", "label": "是"},
    {"source": "2", "target": "1", "label": "否"}
  ]
}
```

### type 值

| 值 | 说明 |
|----|------|
| `start` | 椭圆,开始节点 |
| `end` | 椭圆,结束节点 |
| `process` | 圆角矩形,处理步骤 |
| `decision` | 菱形,判断节点 |
| `document` | 文档形状 |
| `data` | 平行四边形,数据存储 |

### edges.label 值

| 值 | 说明 |
|----|------|
| `是` / `Y` | 条件为真 |
| `否` / `N` | 条件为假 |
| 空字符串 | 普通顺序流 |

## 文件说明

| 文件 | 说明 |
|------|------|
| `scripts/gen.py` | **标准生成脚本**(必须使用,禁止直接调用 generator.py) |
| `scripts/__main__.py` | 完整管道(含 LLM 分析模式) |
| `scripts/generator.py` | 底层 XML 生成器(gen.py 内部调用) |
| `references/drawio-xml-spec.md` | draw.io XML 格式规范(详细样式/属性说明) |

## 布局参数

generator.py 内置参数(可在 gen.py 中修改):

| 参数 | 默认值 | 说明 |
|------|--------|------|
| `CANVAS_WIDTH` | 850 | 画布宽度 |
| `_LAYER_GAP_Y` | 120 | 层间垂直间距 |
| `MAIN_X` | 425 | 主轴 X 坐标 |

如需压缩布局(A4 大小),调用 `generate_drawio_xml()` 前修改这些全局变量。

Popular in Content

Data month: 2026-09 · Downloads, stars and installs are aggregated monthly from public skill registries (ClawHub, SkillHub). See methodology.