drawio
Create and edit draw.io diagrams in XML format. Use when the user wants to create flowcharts, architecture diagrams, sequence diagrams, or any visual diagrams. Handles XML structure, styling, fonts (Noto Sans JP), arrows, connectors, and PNG export.
Best use case
drawio is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Create and edit draw.io diagrams in XML format. Use when the user wants to create flowcharts, architecture diagrams, sequence diagrams, or any visual diagrams. Handles XML structure, styling, fonts (Noto Sans JP), arrows, connectors, and PNG export.
Teams using drawio should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/drawio/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How drawio Compares
| Feature / Agent | drawio | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Create and edit draw.io diagrams in XML format. Use when the user wants to create flowcharts, architecture diagrams, sequence diagrams, or any visual diagrams. Handles XML structure, styling, fonts (Noto Sans JP), arrows, connectors, and PNG export.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Draw.io Diagram Skill
draw.ioファイル(.drawio)をXML形式で直接作成・編集するためのスキル。
## XML基本構造
```xml
<mxfile host="app.diagrams.net" modified="2024-01-01T00:00:00.000Z" agent="Claude" version="21.0.0">
<diagram name="Page-1" id="page-1">
<mxGraphModel dx="1000" dy="600" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0" defaultFontFamily="Noto Sans JP">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<!-- 図形要素をここに追加 -->
</root>
</mxGraphModel>
</diagram>
</mxfile>
```
## mxCell要素
### 矩形(Rectangle)
```xml
<mxCell id="rect-1" value="ラベル" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=Noto Sans JP;fontSize=18;" vertex="1" parent="1">
<mxGeometry x="100" y="100" width="120" height="60" as="geometry" />
</mxCell>
```
### 角丸矩形(Rounded Rectangle)
```xml
<mxCell id="rounded-1" value="ラベル" style="rounded=1;whiteSpace=wrap;html=1;fontFamily=Noto Sans JP;fontSize=18;arcSize=20;" vertex="1" parent="1">
<mxGeometry x="100" y="100" width="120" height="60" as="geometry" />
</mxCell>
```
### 楕円(Ellipse)
```xml
<mxCell id="ellipse-1" value="ラベル" style="ellipse;whiteSpace=wrap;html=1;fontFamily=Noto Sans JP;fontSize=18;" vertex="1" parent="1">
<mxGeometry x="100" y="100" width="120" height="80" as="geometry" />
</mxCell>
```
### ひし形(Diamond)
```xml
<mxCell id="diamond-1" value="条件" style="rhombus;whiteSpace=wrap;html=1;fontFamily=Noto Sans JP;fontSize=18;" vertex="1" parent="1">
<mxGeometry x="100" y="100" width="100" height="100" as="geometry" />
</mxCell>
```
### テキスト(Text Only)
```xml
<mxCell id="text-1" value="テキスト" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontFamily=Noto Sans JP;fontSize=18;" vertex="1" parent="1">
<mxGeometry x="100" y="100" width="120" height="30" as="geometry" />
</mxCell>
```
## 矢印・コネクタ
### 基本の矢印
```xml
<mxCell id="arrow-1" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontFamily=Noto Sans JP;fontSize=14;" edge="1" parent="1" source="rect-1" target="rect-2">
<mxGeometry relative="1" as="geometry" />
</mxCell>
```
### ラベル付き矢印
```xml
<mxCell id="arrow-2" value="ラベル" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontFamily=Noto Sans JP;fontSize=14;" edge="1" parent="1" source="rect-1" target="rect-2">
<mxGeometry relative="1" as="geometry" />
</mxCell>
```
### 点線矢印
```xml
<mxCell id="arrow-3" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;dashed=1;fontFamily=Noto Sans JP;fontSize=14;" edge="1" parent="1" source="rect-1" target="rect-2">
<mxGeometry relative="1" as="geometry" />
</mxCell>
```
## スタイル設定ガイド
### フォント設定(必須)
1. `mxGraphModel`に`defaultFontFamily="Noto Sans JP"`を設定
2. **すべてのテキスト要素**に`fontFamily=Noto Sans JP;`を明示的に追加
### 推奨設定
| 項目 | 推奨値 | 説明 |
|------|--------|------|
| fontSize | 18 | 標準の1.5倍、視認性向上 |
| 日本語テキスト幅 | 30-40px/文字 | レイアウト計算用 |
| 矢印とラベル間隔 | 20px以上 | 重なり防止 |
### 色設定
```
fillColor=#ffffff; # 塗りつぶし色
strokeColor=#000000; # 枠線色
fontColor=#333333; # 文字色
```
### よく使う色
| 用途 | 色コード |
|------|----------|
| 白背景 | #ffffff |
| 薄い青 | #dae8fc |
| 薄い緑 | #d5e8d4 |
| 薄い黄 | #fff2cc |
| 薄い赤 | #f8cecc |
| 薄いグレー | #f5f5f5 |
## 配置ルール
### XMLの記述順 = 描画順
- **先に書いたものが背面**に配置される
- 矢印は図形より先(XMLの先頭側)に記述して最背面に配置
### 推奨構造
```xml
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<!-- 1. 矢印・コネクタ(最背面) -->
<mxCell id="arrow-1" ... edge="1" ... />
<mxCell id="arrow-2" ... edge="1" ... />
<!-- 2. 図形(中間) -->
<mxCell id="rect-1" ... vertex="1" ... />
<mxCell id="rect-2" ... vertex="1" ... />
<!-- 3. テキストラベル(最前面) -->
<mxCell id="text-1" ... vertex="1" ... />
</root>
```
## PNG変換
### drawio CLIコマンド
```bash
drawio -x -f png -s 2 -t -o output.png input.drawio
```
| オプション | 説明 |
|------------|------|
| -x | エクスポートモード |
| -f png | PNG形式 |
| -s 2 | 2倍スケール(高解像度) |
| -t | 透明背景 |
| -o | 出力ファイル指定 |
## 検証チェックリスト
作成後、以下を確認:
- [ ] mxGraphModelにdefaultFontFamilyが設定されているか
- [ ] 全テキスト要素にfontFamilyが明示的に設定されているか
- [ ] fontSizeは18px程度か(視認性)
- [ ] 矢印がXMLの先頭側に配置されているか(最背面)
- [ ] 矢印とラベルの間隔は20px以上か
- [ ] 日本語テキストの幅は十分か(30-40px/文字)
- [ ] PNG出力で視覚確認したか
## テンプレート
基本テンプレートは `templates/basic.drawio` を参照。Related Skills
gwt-spec-to-issue-migration
Migrate legacy spec sources to artifact-first GitHub Issue specs. Supports local `specs/SPEC-*` directories and body-canonical `gwt-spec` Issues using the bundled migration script.
gwt-pty-communication
PTY based communication tools for Project Mode orchestration (Lead/Coordinator/Developer).
gwt-pr
Create or update GitHub Pull Requests with the gh CLI, including deciding whether to create a new PR or only push based on existing PR merge status. Use when the user asks to open/create/edit a PR, generate a PR body/template, or says 'open a PR/create a PR/gh pr'. Defaults: base=develop, head=current branch (same-branch only; never create/switch branches).
gwt-pr-check
Check GitHub PR status with the gh CLI, including unmerged PR detection and post-merge new-commit detection for the current branch.
gwt-fix-pr
Inspect GitHub PR for CI failures, merge conflicts, update-branch requirements, reviewer comments, change requests, and unresolved review threads. Create fix plans and implement after user approval. Reply to ALL reviewer comments with action taken or reason for not addressing, then resolve threads. Notify reviewers after fixes.
release
Execute the release workflow when the user asks `release` or `/release`: sync develop, update version/changelog, create `chore(release)` commit, collect closing issues, create develop->main release PR, and verify release/publish artifacts.
hotfix
Execute the hotfix workflow when the user asks `hotfix` or `/hotfix`: create a hotfix branch from main, guide fix+checks, open PR to main, and confirm patch release.
skill-installer
Install Codex skills into $CODEX_HOME/skills from a curated list or a GitHub repo path. Use when a user asks to list installable skills, install a curated skill, or install a skill from another repo (including private repos).
skill-creator
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Codex's capabilities with specialized knowledge, workflows, or tool integrations.
plan
Generate a plan for how an agent should accomplish a complex coding task. Use when a user asks for a plan, and optionally when they want to save, find, read, update, or delete plan files in $CODEX_HOME/plans (default ~/.codex/plans).
web-design-guidelines
Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".
vercel-react-best-practices
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.