Skip to content
Skill Authoring
Skill

/drawio-diagram

为深度学习模型、网络架构、算法流程等生成标准 Draw.io (.drawio) 格式的可视化图表;支持从零生成与风格迁移两种模式。从零生成:模型架构图、流程图、感受野示意图等;风格迁移:参考图 + 内容描述/项目 → 按参考图风格生成新图。确保 XML 格式正确,可直接在 Draw.io 中打开编辑。

From plugin
best-skills
3.2k16 skills

Claude Code

$ npx -y skills add xstongxue/best-skills --skill drawio-diagram --agent claude-code

SKILL.md

drawio-diagram.SKILL.md
name: drawio-diagram
description: 为深度学习模型、网络架构、算法流程等生成标准 Draw.io (.drawio) 格式的可视化图表;支持从零生成与风格迁移两种模式。从零生成:模型架构图、流程图、感受野示意图等;风格迁移:参考图 + 内容描述/项目 → 按参考图风格生成新图。确保 XML 格式正确,可直接在 Draw.io 中打开编辑。

Draw.io 图表

本 Skill 指导 Agent 生成**标准的 Draw.io 格式图表**(.drawio 文件),支持两种模式:**从零生成**(模型架构、算法流程等)与**风格迁移**(参考图 + 内容 → 按参考图风格生成新图)。

Step 0:任务识别

| 条件 | 执行 | |------|------| | 用户提供**参考图**,且希望「按这张图的风格」画新图 | 执行 `reference/style-migration.md` | | 其他情况(从零生成) | 执行 `reference/generation.md` |

使用时机

**从零生成:**

  • 用户需要为深度学习模型(如 Transformer、CNN、RNN 等)生成架构图
  • 用户需要绘制算法流程图、数据流图、系统架构图
  • 用户需要可视化特定概念(如感受野、注意力机制、特征提取过程等)
  • 用户提到「画个图」「生成架构图」「可视化模型结构」「绘制流程图」等需求

**风格迁移:**

  • 用户提供参考图,希望「按这个风格画」「照着这个排版/配色画」

通用规范(两种模式共用)

1. XML 格式严格性

  • ✅ 所有标签必须正确闭合:`<mxCell>` 对应 `</mxCell>`,绝不能写成 `</mCell>`
  • ✅ 使用 `vertex="1"` 标记节点,`edge="1"` 标记连线
  • ✅ 每个元素必须有唯一 `id`,从 0 开始递增
  • ✅ 特殊字符必须转义:`&` → `&amp;`,`<` → `&lt;`,`>` → `&gt;`

2. 标准文件结构

<mxfile host="app.diagrams.net">
  <diagram name="图表名称" id="图表id">
    <mxGraphModel dx="1200" dy="800" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="宽度" pageHeight="高度" background="#F5F5DC">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>
        <!-- 所有图形元素从 id="2" 开始 -->
      </root>
    </mxGraphModel>
  </diagram>
</mxfile>

3. 常用样式

  • **2D 节点**:`rounded=1;whiteSpace=wrap;html=1;fillColor=#颜色;strokeColor=#333333;strokeWidth=1;fontSize=11`
  • **3D 节点(推荐用于神经网络层)**:`shape=cube;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;darkOpacity=0.05;darkOpacity2=0.1;size=20;fillColor=#颜色;strokeColor=#333333;strokeWidth=1.5`
  • **连线**:`edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeColor=#000000;strokeWidth=2;endArrow=classic`
  • **虚线(残差)**:`dashed=1`

4. 输出要求

1. 图表说明(2-3 行) 2. 使用指南:Draw.io 打开、导出 PNG/SVG/PDF、图题与论文引用示例

参考资源

  • Draw.io:https://app.diagrams.net/
  • 官方文档:https://www.drawio.com/doc/
Read more
@xstongxue
Ships withbest-skills

通用高质量 Skill 合集,可安装到 Cursor、Claude Code、Codex、OpenClaw 等 Agent 工具的 skills 目录使用。 与 best-prompts 的区别:best-prompts 是面向聊天框的 Prompt,需手动复制粘贴;best-skills 是面向 Agent 的 SKILL.md,Agent 会根据 description 中的关键词与触发场景自动判断是否调用,无需每次手动选择。

Stars on GitHub

Momentum

stars in total
3.2k
Star history of xstongxue/best-skills on GitHub, a chart by star-history.com

Other skills on best-skills.

codegen-diagram

codegen-diagram

基于当前项目/代码生成 Draw.io 图表,支持技术栈图、系统架构图、数据结构图、E-R 图四种类型。输出符合 Draw.io 语法的 .drawio 文件(mxGraph XML),可直接导入 Draw.io…

codegen-doc

codegen-doc

基于当前项目/代码生成各类文档,支持论文章节、项目梳理、重点问题、简历项目描述四种类型。当用户提到生成论文章节、项目梳理、技术难点、简历项目描述时使用。要给新同事看的上手文档(新人文档、架构文档、代码导读、onboarding)用 project-docs。

dev-workflow

dev-workflow

开发流程五步法。支持需求理解、方案设计、代码实现、代码审查、Bug 修复。当用户提到「需求分析」「方案设计」「代码实现」「代码审查」「理解需求」「技术设计」「开始写代码」「Review」「检查代码」「bug」「报错」「崩溃」「异常」「出错了」时使用。

excalidraw-diagram

excalidraw-diagram

基于文字说明或结构信息,生成可直接在 Excalidraw 中打开的手绘风 `.excalidraw` 图表;支持系统架构图、流程图、数据结构图与自由白板草图,输出标准 Excalidraw JSON。

frontend-design

frontend-design

创建具有高设计品质、可交付生产的前端界面。当用户要求构建 Web 组件、页面、海报或应用(如官网、落地页、仪表盘、React/Vue 组件、HTML/CSS 布局,或对任意 Web UI 进行样式/美化)时使用本技能。产出有创意、打磨到位且避免「AI…

md-report-summary

md-report-summary

生成高质量 Markdown 周报、工作汇报、总结、介绍等文档。无草稿时从 Web 搜索并总结;有草稿时结合草稿整理、润色、补充。当用户提到周报、工作汇报、总结、介绍、述职、复盘时使用。

More skills from other plugins.

gstack-openclaw-ceo-review

gstack-openclaw-ceo-re…

Use when asked to review a plan, challenge a proposal, run a CEO review, poke holes in an approach, think bigger about scope, or…

gstack2w138k
@garrytan@garrytanInstall Skill
book-to-skill

book-to-skill

Converts books and documents (PDF, EPUB, DOCX, HTML, Markdown, plain text, RTF, MOBI/AZW with Calibre) into structured agent…

@virgiliojr94@virgiliojr94Install Skill
distilly

distilly

Set up the owner profile so a personal agent knows who it works for (first-run setup, \"get to know me\"), or distill colleague,…

@titanwings@titanwingsInstall Skill

Questions about drawio-diagram.

Which coding agents can use drawio-diagram?
drawio-diagram installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.