# draw-io

A Claude skill that edits .drawio XML, converts diagrams to PNG and fixes element layout.

- skill · `type=skill` · Claude Code · 757 installs
- Author: davila7
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/davila7/claude-code-templates/tree/HEAD/cli-tool/components/skills/creative-design/draw-io
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/skills/draw-io

## What it does

The skill handles draw.io diagrams from inside the agent: creating them, editing them, reviewing them. It only touches `.drawio` files and leaves `.drawio.png` alone — those get generated for you, for instance by a pre-commit hook in slides. A conversion script ships with it at `scripts/convert-drawio-to-png.sh`, wrapping `drawio -x -f png -s 2 -t -o output.drawio.png input.drawio` for 2x scale and a transparent background.

Layout work happens by hand on coordinates. Open the `.drawio` file as plain XML, find the `mxCell` you want by its `value` attribute, then change `x`, `y`, `width` and `height` inside `mxGeometry` and re-run the conversion to check the PNG. Aligning elements means matching centers, computed as `y + (height / 2)`. Arrows are the fiddly part: `exitX`/`exitY` do nothing on text elements, so endpoints go in as explicit `sourcePoint` and `targetPoint` coordinates, and the `offset` attribute pushes a label away from its line.

Styling rules come bundled too. Drop `background="#ffffff"` so the diagram adapts to any theme, put arrows on the back layer right after the title, keep at least 20px between a label and an arrow end. For Japanese text it advises 30–40px per character, otherwise lines break in the wrong place. Reference docs cover layout and AWS icons, and `scripts/find_aws_icon.py` looks up an icon by service name. The checklist section cuts off mid-item, so treat it as incomplete.

## Requirements
- Works with: AWS

## Install

### Claude Code (native platform)

1. **claude-code-templates**
```bash
npx claude-code-templates@latest --skill creative-design/draw-io
```

2. **Skills CLI (Vercel)**
```bash
npx skills add davila7/claude-code-templates --skill draw-io -a claude-code
```

3. **Manually: put the files in place**
- File: `~/.claude/skills/draw-io/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/draw-io/

### Codex

**Manually: put the files in place**
- File: `.agents/skills/draw-io/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

**Manually: put the files in place**
- File: `.cursor/skills/draw-io/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install davila7/claude-code-templates draw-io
```

2. **Manually: put the files in place**
- File: `.github/skills/draw-io/SKILL.md`

### Gemini CLI

**Platform CLI**
```bash
gemini skills install https://github.com/davila7/claude-code-templates --path cli-tool/components/skills/creative-design/draw-io
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/draw-io/SKILL.md` — The legacy .windsurf/skills/ path still works

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/davila7/claude-code-templates/tree/HEAD/cli-tool/components/skills/creative-design/draw-io

## When to use it
- build an architecture diagram in `.drawio` and export it to PNG
- fix element coordinates so boxes stop overlapping
- route arrows and labels so lines do not cross the text
- find the right AWS icon by service name
- get a transparent background so the diagram fits any theme

## Example prompts
- fix the box coordinates in assets/architecture.drawio and convert it to PNG
- find the AWS icon for lambda and place it on the diagram
- reroute the arrows, they overlap the labels

## Similar
- [drawio-logical-diagrams](https://affpapa.org/en/nevibecode/skills/drawio-logical-diagrams.md) — skill · 4000 installs
- [aws-architecture-diagram](https://affpapa.org/en/nevibecode/skills/aws-architecture-diagram.md) — skill · 756 installs
- [draw-io-diagram-generator](https://affpapa.org/en/nevibecode/skills/draw-io-diagram-generator.md) — skill · 2800 installs
- [drawio](https://affpapa.org/en/nevibecode/skills/jgraph-drawio.md) — skill · 3200 installs
- [drawio-reconstruction](https://affpapa.org/en/nevibecode/skills/drawio-reconstruction.md) — skill · 509 installs
- [aws-diagrams](https://affpapa.org/en/nevibecode/skills/aws-diagrams.md) — skill · 1200 installs

From the same set: [davila7/claude-code-templates](https://affpapa.org/en/nevibecode/by/davila7/claude-code-templates.md) — 224 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
