draw.io diagram creation, editing, and review. Use for .drawio XML editing, PNG conversion, layout adjustment, and AWS icon usage.
A Claude Code skill for creating, editing, and managing draw.io diagrams with professional quality standards.
This skill enables AI-assisted creation and maintenance of draw.io architecture diagrams, flowcharts, and technical documentation visuals. It ensures consistent styling, proper layout, and automated PNG conversion for presentations and documentation.
Use this skill when you need to:
.drawio XML diagram filesThe skill provides:
.drawio files as structured XMLEnsures consistent typography across diagrams:
defaultFontFamily in mxGraphModelfontFamily to individual text elementsMultiple conversion methods:
# Via pre-commit hook (all files)
mise exec -- pre-commit run --all-files
# Specific file via pre-commit
mise exec -- pre-commit run convert-drawio-to-png --files assets/my-diagram.drawio
# Direct script execution
bash ~/.claude/skills/draw-io/scripts/convert-drawio-to-png.sh assets/diagram.drawio
Conversion produces:
Programmatic element positioning:
y + (height / 2)Search and integrate official AWS service icons:
python ~/.claude/skills/draw-io/scripts/find_aws_icon.py ec2
python ~/.claude/skills/draw-io/scripts/find_aws_icon.py lambda
Uses latest mxgraph.aws4.* icon set.
Enforces professional standards:
Automated validation ensures:
<!-- Set font family -->
<mxGraphModel defaultFontFamily="Noto Sans JP" ...>
<!-- Background frame with proper margins -->
<mxCell id="vpc" style="rounded=1;strokeWidth=3;...">
<mxGeometry x="500" y="20" width="560" height="430" />
</mxCell>
<!-- Title with 30px margin from frame top -->
<mxCell id="title" value="VPC" style="text;fontSize=18;fontFamily=Noto Sans JP;">
<mxGeometry x="510" y="50" width="540" height="35" />
</mxCell>
<!-- Arrow with explicit coordinates -->
<mxCell id="arrow1" style="edgeStyle=..." edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="100" y="200" as="sourcePoint"/>
<mxPoint x="500" y="200" as="targetPoint"/>
</mxGeometry>
</mxCell>
<!-- Arrow label with offset -->
<mxCell id="label1" value="API Request" style="edgeLabel;fontSize=14;fontFamily=Noto Sans JP;">
<mxGeometry relative="1" as="geometry">
<mxPoint x="0" y="-20" as="offset"/>
</mxGeometry>
</mxCell>
</mxGraphModel>
# Edit the diagram
vim architecture.drawio
# Convert to PNG (via pre-commit hook)
mise exec -- pre-commit run convert-drawio-to-png --files architecture.drawio
# Result: architecture.drawio.png (2x resolution, transparent)
# Search for EC2 icon
python ~/.claude/skills/draw-io/scripts/find_aws_icon.py ec2
# Output: mxgraph.aws4.compute.ec2_instance
For complex systems, create staged diagrams:
Japanese text requires 30-40px per character:
<!-- For 10-character text: 300-400px width -->
<mxGeometry x="140" y="60" width="400" height="40" />
Always place arrows immediately after title in XML:
<mxCell id="title" value="..." .../>
<mxCell id="arrow1" style="edgeStyle=..." .../> <!-- Back layer -->
<mxCell id="box1" .../> <!-- Front layer -->
Ensure sufficient spacing inside grouping boxes:
Frame: y=20, height=400 → range 20-420
Element top: y ≥ 50 (30px margin)
Element bottom: y ≤ 390 (30px margin)
Remove background color for theme adaptability:
<!-- Remove this -->
<mxGraphModel background="#ffffff" ...>
<!-- Use this -->
<mxGraphModel page="0" ...>
~/.claude/skills/draw-io/
├── SKILL.md # This documentation
├── README.md # User-facing guide
├── scripts/
│ ├── convert-drawio-to-png.sh # PNG conversion script
│ └── find_aws_icon.py # AWS icon search utility
└── references/
├── layout-guidelines.md # Detailed layout rules
└── aws-icons.md # AWS icon catalog
For reveal.js slides (Quarto), add to YAML header:
---
title: "Your Presentation"
format:
revealjs:
auto-stretch: false
---
This ensures correct image sizing on mobile devices.
Before finalizing any diagram:
page="0")mxgraph.aws4.*).drawio XML files.drawio.png high-resolution imagesCapture frames or clips from RTSP/ONVIF cameras.
Foodora-only CLI for checking past orders and active order status (Deliveroo WIP).
Edit PDFs with natural-language instructions using the nano-pdf CLI.
Control Eight Sleep pods (status, temperature, alarms, schedules).
CLI to manage emails via IMAP/SMTP. Use `himalaya` to list, read, write, reply, forward, search, and organize emails from the terminal. Supports multiple accounts and message composition with MML (MIME Meta Language).
Control Sonos speakers (discover/status/play/volume/group).
Category:tools