drawio-diagram

drawio-diagram is a skill for Claude Code, Codex from xstongxue/best-skills. It costs 104 tokens per session (949 once invoked), scanned A, original, Apache-2.0.

A tool for creating editable Draw.io diagrams, a file format used for flowcharts, system diagrams, and model illustrations.

In plain words
What is it for?
Use it to create deep-learning model diagrams, algorithm flows, data flows, system architectures, or new diagrams that follow a reference image's style.
Why use it?
It removes the need to draw these diagrams manually while keeping the result openable and editable in Draw.io.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to create deep-learning model diagrams, algorithm flows, data flows, system architectures, or new diagrams that follow a reference image's style.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/xstongxue/best-skills/drawio-diagram
About the project

best-skills is a collection of reusable skills for coding agents, including tools for writing papers, creating diagrams and presentations, generating code documentation, and other tasks. Users install its skills into agents such as Cursor, Claude Code, Codex, or OpenClaw so those agents can recognize relevant requests and run the corresponding workflows. The catalogue entries are examples of the skills included in the collection.

xstongxue/best-skills · 2,814 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add xstongxue/best-skills --skill drawio-diagram
Clone the repo
git clone --depth 1 https://github.com/xstongxue/best-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for drawio-diagram

README.md
[![agentmods](https://agentmods.dev/badge/skills/xstongxue/best-skills/drawio-diagram/github.svg)](https://agentmods.dev/skills/xstongxue/best-skills/drawio-diagram)
Your own site
<a href="https://agentmods.dev/skills/xstongxue/best-skills/drawio-diagram"><img src="https://agentmods.dev/badge/skills/xstongxue/best-skills/drawio-diagram/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for drawio-diagram

Your own site · 80×15
<a href="https://agentmods.dev/skills/xstongxue/best-skills/drawio-diagram"><img src="https://agentmods.dev/badge/skills/xstongxue/best-skills/drawio-diagram.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 104 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 949 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00104 $0.00949
Opus 5 $0.00052 $0.00475
Sonnet 5 $0.00021 $0.00190
Haiku 4.5 $0.00010 $0.00095

Measured 13d ago against content hash 301eb309309d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

drawio-diagram scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 13d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/drawio-diagram/SKILL.md · 68 lines

What it actually says

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、图题与论文引用示例

参考资源

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 13d ago First seen · 68 lines · 104 tokens per session scan A 301eb309309d

Subscribe to this mod's changes

drawio-diagram is a skill published in the GitHub repository xstongxue/best-skills (2,814 stars, last pushed 18d ago), licensed Apache-2.0. It adds 104 tokens to every session and 949 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

cherry-studio-feedback

A guide for handling Cherry Studio bug reports, interface problems, user-experience issues, and feature suggestions.

CherryHQ/cherry-studio · 37 tokens

frontend-design

Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.

anthropics/claude-plugins-official · 40 tokens

visual-plan

Turn ordinary text plans into rich interactive visual plans with diagrams, file maps, annotated code, open questions, and UI/prototype review when useful.

BuilderIO/skills · 32 tokens

visual-edit

Open a running local app in Design overview mode as URL-backed iframe screens for visual editing, flow review, duplication, and route-state exploration. Use when the user asks to inspect, compare, or edit a real local app visually in Design.

BuilderIO/skills · 51 tokens

muapi-ui-design

Generate high-fidelity UI/UX mockups for mobile and web apps using Atomic Design principles — creates wireframes and design systems via muapi.ai.

SamurAIGPT/Generative-Media-Skills · 34 tokens

display-glasses-with-jetpack-compose-glimmer

Provides guidelines for developing projected Android XR apps for display glasses using the Jetpack Compose Glimmer UI toolkit. This skill covers foundational Glimmer design principles, workflows for implementing Jetpack Compose Glimmer, and interaction models for the glasses form factor. Use this skill to build an…

android/skills · 91 tokens