npx skills add ...
npx skills add softaworks/agent-toolkit --skill draw-io
draw.io diagram creation, editing, and review. Use for .drawio XML editing, PNG conversion, layout adjustment, and AWS icon usage.
npx skills add softaworks/agent-toolkit --skill draw-io
.drawio files.drawio.png files.drawio.png by pre-commit hook in slidesFor diagrams used in Quarto slides,
specify defaultFontFamily in mxGraphModel tag:
Also explicitly specify fontFamily in each text element's style attribute:
See conversion script at scripts/convert-drawio-to-png.sh.
Internal command used:
| Option | Description |
|---|---|
-x | Export mode |
-f png | PNG format output |
-s 2 | 2x scale (high resolution) |
-t | Transparent background |
-o | Output file path |
.drawio file in text editor (plain XML format)mxCell for element to adjust (search by value attribute for text)mxGeometry tag
x: Position from lefty: Position from topwidth: Widthheight: Heighty + (height / 2)Separate complex systems into staged diagrams:
| Diagram Type | Purpose |
|---|---|
| Context Diagram | System overview from external perspective |
| System Diagram | Main components and relationships |
| Component Diagram | Technical details and integration points |
| Deployment Diagram | Infrastructure configuration |
| Data Flow Diagram | Data flow and transformation |
| Sequence Diagram | Time-series interactions |
Include title, description, last updated, author, and version in diagrams.
background="#ffffff"For text elements, exitX/exitY don't work, so use explicit coordinates:
Adjust offset attribute to distance arrow labels from arrows:
<br> tag for line breaksWhen placing elements inside background frames (grouping boxes), ensure sufficient margin.
rounded=1) and stroke widthCoordinate calculation verification:
Bad example (may overflow):
Good example (sufficient margin):
AWS icon search examples:
Add auto-stretch: false to YAML header:
This ensures correct image display on mobile devices.*