Skip to main content
skill

draw-io — Claude Code skill: draw.io diagrams from XML

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

Install into Claude Code · claude-code-templates All methods and platforms ↓
npx claude-code-templates@latest --skill creative-design/draw-io
Open on GitHub

What draw-io 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.

What it helps with

  • 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 for the agent

  • 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

How to install draw-io

1claude-code-templates

npx claude-code-templates@latest --skill creative-design/draw-io

2Skills CLI (Vercel)

npx skills add davila7/claude-code-templates --skill draw-io -a claude-code

3Manually: put the files in place

~/.claude/skills/draw-io/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/draw-io/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about draw-io

How do I install draw-io in Claude?

Use the templates command: npx claude-code-templates@latest --skill creative-design/draw-io. Or install with npx skills add davila7/claude-code-templates --skill draw-io -a claude-code. The skill file then lives at ~/.claude/skills/draw-io/SKILL.md.

What does draw-io do?

It edits .drawio XML, converts diagrams to PNG and helps with layout: element coordinates, arrows, labels. It also covers searching for AWS icons.

Can I edit .drawio.png files directly?

No, the skill works on .drawio files only. The PNG is generated automatically, for example by a pre-commit hook, and is not edited in place.

Similar skills

Everything for Design →

From the same set205

The whole set →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor