draw-io_skill
- Python
273
GitHub Stars
2
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill softaworks/agent-toolkit --skill draw-io- README.md7.7 KB
- SKILL.md7.4 KB
Overview
This skill provides precise tools and guidance for creating, editing, and reviewing draw.io (.drawio) diagrams with production-quality PNG exports and AWS icon support. It enforces safe editing rules, layout conventions, and export commands to ensure consistent, accessible diagrams for slides and documentation. Use it to automate PNG conversion, adjust coordinates in XML, and validate visual rules before publishing.
How this skill works
The skill operates on .drawio XML files only — it edits mxCell and mxGeometry tags to adjust positions, sizes, and styles, and it runs drawio CLI commands to produce high-resolution transparent PNGs. It includes scripts and pre-commit hooks for bulk or per-file conversion, a small AWS icon search script, and a checklist to validate layout, fonts, arrows, and margins. It also codifies design principles and coordinate calculation techniques to align elements precisely.
When to use it
- Converting .drawio files to high-resolution PNGs for slides or docs
- Adjusting element coordinates, sizes, or layering directly in .drawio XML
- Enforcing consistent fonts, icon versions, and accessibility rules across diagrams
- Preparing diagrams for reveal.js slides or PDF export with correct sizing
- Validating that arrows, labels, and internal margins meet publishing standards
Best practices
- Edit only .drawio files; never edit generated .drawio.png files
- Specify defaultFontFamily and explicit fontFamily in each text style for consistent rendering
- Use drawio CLI with -x -f png -s 2 -t -o for high-resolution transparent PNGs
- Keep arrows on the back layer, avoid overlap with labels, and keep at least 20px clearance
- Ensure internal elements have at least 30px margin from background frames and account for rounded corners
- Remove unnecessary decorative elements and use official, up-to-date AWS icons
Example use cases
- Batch convert all .drawio diagrams to PNGs before a release or presentation
- Manually nudge a box by editing mxGeometry x/y/width/height to fix overlap or line breaks
- Search and insert the official AWS icon for a service using the included find_aws_icon.py helper
- Adjust arrow source/target points in XML for precise routing around labels
- Verify diagram accessibility: increase font size, ensure contrast, and add patterns for color-blind viewers
FAQ
No. Never edit generated .drawio.png files. Edit the source .drawio XML and regenerate the PNG using the provided scripts.
How do I get a high-resolution transparent PNG?
Use the drawio CLI export: drawio -x -f png -s 2 -t -o output.drawio.png input.drawio or the provided conversion scripts or pre-commit hook.