alffei/skill_share/draw-io
Claude Code and agent skill by alffei/skill_share
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
draw.io diagram creation, editing, and review. Use for .drawio XML editing, PNG conversion, layout adjustment, and AWS icon usage.
Install
npx vskill@latest install alffei/skill_share/draw-ioSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
draw.io Diagram Skill
1. Basic Rules
- Edit only
.drawiofiles - Do not directly edit
.drawio.pngfiles - Use auto-generated
.drawio.pngby pre-commit hook in slides
2. Font Settings
For diagrams used in Quarto slides, specify defaultFontFamily in mxGraphModel tag:
Also explicitly specify fontFamily in each text element's style attribute:
3. Conversion Commands
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 |
4. Layout Adjustment
4.1. Coordinate Adjustment Steps
- Open
.drawiofile in text editor (plain XML format) - Find
mxCellfor element to adjust (search byvalueattribute for text) - Adjust coordinates in
mxGeometrytag
x: Position from lefty: Position from topwidth: Widthheight: Height
- Run conversion and verify
4.2. Coordinate Calculation
- Element center coordinate =
y + (height / 2) - To align multiple elements, calculate and match center coordinates
5. Design Principles
5.1. Basic Principles
- Clarity: Create simple, visually clean diagrams
- Consistency: Unify colors, fonts, icon sizes, line thickness
- Accuracy: Do not sacrifice accuracy for simplification
5.2. Element Rules
- Label all elements
- Use arrows to indicate direction
(prefer 2 unidirectional arrows over bidirectional)
- Use latest official icons
- Add legend to explain custom symbols
5.3. Accessibility
- Ensure sufficient color contrast
- Use patterns in addition to colors
5.4. Progressive Disclosure
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 |
5.5. Metadata
Include title, description, last updated, author, and version in diagrams.
6. Best Practices
6.1. Background Color
- Remove
background="#ffffff" - Transparent background adapts to various themes
6.2. Font Size
- Use 1.5x standard font size (around 18px) for PDF readability
6.3. Japanese Text Width
- Allow 30-40px per character
- Insufficient width causes unintended line breaks
6.4. Arrow Placement
- Always place arrows at back (position in XML right after Title)
- Position arrows to avoid overlapping with labels
- Keep arrow start/end at least 20px from label bottom edge
6.5. Arrow Connection to Text Labels
For text elements, exitX/exitY don't work, so use explicit coordinates:
6.6. edgeLabel Offset Adjustment
Adjust offset attribute to distance arrow labels from arrows:
6.7. Remove Unnecessary Elements
- Remove decorative icons irrelevant to context
- Example: If ECR exists, separate Docker icon is unnecessary
6.8. Labels and Headings
- Service name only: 1 line
- Service name + supplementary info: 2 lines with line break
- Redundant notation (e.g., ECR Container Registry): shorten to 1 line
- Use
<br>tag for line breaks
6.9. Background Frame and Internal Element Placement
When placing elements inside background frames (grouping boxes), ensure sufficient margin.
- YOU MUST: Internal elements must have at least 30px margin from frame boundary
- YOU MUST: Account for rounded corners (
rounded=1) and stroke width - YOU MUST: Always visually verify PNG output for overflow
Coordinate calculation verification:
Bad example (may overflow):
Good example (sufficient margin):
7. Reference
AWS icon search examples:
8. Checklist
- [ ] No background color set (page="0")
- [ ] Font size appropriate (larger recommended)
- [ ] Arrows placed at back layer
- [ ] Arrows not overlapping labels (verify in PNG)
- [ ] Arrow start/end sufficiently distant from labels (at least 20px)
- [ ] Arrows not penetrating boxes or icons (verify in PNG)
- [ ] Internal elements not overflowing background frame (verify in PNG)
- [ ] 30px+ margin between background frame and internal elements
- [ ] AWS service names are official names/correct abbreviations
- [ ] AWS icons are latest version (mxgraph.aws4.*)
- [ ] No unnecessary elements remaining
- [ ] Visually verified PNG conversion
9. Image Display in reveal.js Slides
Add auto-stretch: false to YAML header:
This ensures correct image display on mobile devices.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingdraw-io/SKILL.md
Popularity
- Repository stars
- 69
- Repository forks
- 18
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/alffei/skill_share/draw-io)