draw-io▌
davila7/claude-code-templates · updated Apr 8, 2026
MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.
Direct XML editing and PNG conversion for draw.io diagrams with layout control and AWS icon support.
- ›Edit .drawio XML files directly; PNG exports are auto-generated via pre-commit hook with 2x scaling and transparent backgrounds
- ›Coordinate-based layout adjustment for precise element positioning, with guidance on alignment, margins, and overflow prevention
- ›Design principles covering clarity, consistency, accessibility, and progressive disclosure across context, system, component, depl
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:
<mxGraphModel defaultFontFamily="Noto Sans JP" ...>
Also explicitly specify fontFamily in each text element's style attribute:
style="text;html=1;fontSize=27;fontFamily=Noto Sans JP;"
3. Conversion Commands
See conversion script at scripts/convert-drawio-to-png.sh.
# Convert all .drawio files
mise exec -- pre-commit run --all-files
# Convert specific .drawio file
mise exec -- pre-commit run convert-drawio-to-png --files assets/my-diagram.drawio
# Run script directly (using skill's script)
bash ~/.claude/skills/draw-io/scripts/convert-drawio-to-png.sh assets/diagram1.drawio
Internal command used:
drawio -x -f png -s 2 -t -o output.drawio.png input.drawio
| 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
mxGeometrytagx: 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
<!-- For 10-character text, allow 300-400px -->
<mxGeometry x="140" y="60" width="400" height="40" />
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
<!-- Title -->
<mxCell id="title" value="..." .../>
<!-- Arrows (back layer) -->
<mxCell id="arrow1" style="edgeStyle=..." .../>
<!-- Other elements (front layer) -->
<mxCell id="box1" .../>
6.5. Arrow Connection to Text Labels
For text elements, exitX/exitY don't work, so use explicit coordinates:
<!-- Good: Explicit coordinates with sourcePoint/targetPoint -->
<mxCell id="arrow" style="..." edge="1" parent="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="1279" y="500" as="sourcePoint"/>
<mxPoint x="119" y="500" as="targetPoint"/>
<Array as="points">
<mxPoint x="1279" y="560"/>
<mxPoint x="119" y="560"/>
</Array>
</mxGeometry>
</mxCell>
6.6. edgeLabel Offset Adjustment
Adjust offset attribute to distance arrow labels from arrows:
<!-- Place above arrow (negative value to distance) -->
<mxPoint x="0" y="-40" as="offset"/>
<!-- Place below arrow (positive value to distance) -->
<mxPoint x="0" y="40" as="offset"/>
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:
Background frame: y=20, height=400 -> range is y=20-420
Internal element top: frame y + 30 or more (e.g., y=50)
Internal element bottom: frame y + height - 30 or less (e.g., up to y=390)
Bad example (may overflow):
<!-- Background frame -->
<mxCell id="bg" style="rounded=1;strokeWidth=3;...">
<mxGeometry x="500" y="20" width="560" height="400" />
</mxCell>
<!-- Text: y=30 is too close to frame top (y=20) -->
<mxCell id="label" value="Title" style="text;...">
<mxGeometry x="510" y="30" width="540" height="35" />
</mxCell>
Good example (sufficient margin):
<!-- Background frame -->
<mxCell id="bg" style="rounded=1;strokeWidth=3;...">
How to use draw-io on Cursor
AI-first code editor with Composer
Prerequisites
Before installing skills in Cursor, ensure your development environment meets these requirements:
- ›Cursor installed and configured on your development machine
- ›Node.js version 16.0+ with npm package manager (verify with
node --version) - ›Active project directory or workspace where you want to add draw-io
Execute installation command
Execute the skills CLI command in your project's root directory to begin installation:
The skills CLI fetches draw-io from GitHub repository davila7/claude-code-templates and configures it for Cursor.
Select Cursor when prompted
The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:
Verify installation
Confirm successful installation by checking the skill directory location:
Reload or restart Cursor to activate draw-io. Access the skill through slash commands (e.g., /draw-io) or your agent's skill management interface.
Security & Verification Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.
List & Monetize Your Skill
Submit your Claude Code skill and start earning
Use Cases▌
User Story & Requirements Generation
Create detailed user stories, acceptance criteria, and feature specs
Example
Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios
Reduce spec writing time by 50%, ensure comprehensive coverage
Competitive Analysis
Research competitors, compare features, identify gaps
Example
Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities
Complete competitive research in 2 hours instead of 2 days
Roadmap Prioritization
Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs
Example
Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale
Make data-driven prioritization decisions faster
Stakeholder Communication
Draft PRDs, status updates, and stakeholder presentations
Example
Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement
Save 3-5 hours/week on communication overhead
Implementation Guide▌
Prerequisites
- ›Claude Desktop or compatible AI client
- ›Access to product documentation and roadmap tools (Jira, Notion, etc.)
- ›Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
- ›Stakeholder contact information and communication channels
Time Estimate
30-60 minutes to see productivity improvements
Installation Steps
- 1.Install product management skill
- 2.Start with user story generation for known feature
- 3.Progress to competitive analysis: research 2-3 competitors
- 4.Use for roadmap prioritization: apply RICE/ICE scoring
- 5.Draft stakeholder communications and refine based on feedback
- 6.Build template library for recurring PM tasks
- 7.Share effective prompts with product team
Common Pitfalls
- ⚠Not validating competitive research—verify facts before sharing
- ⚠Accepting user stories without involving engineering team
- ⚠Over-relying on frameworks without qualitative judgment
- ⚠Not customizing outputs to company culture and communication style
- ⚠Skipping stakeholder validation of generated requirements
Best Practices▌
✓ Do
- +Validate research and competitive analysis with real data
- +Collaborate with engineering when generating technical requirements
- +Customize frameworks and templates to your company context
- +Use skill for first drafts, refine with stakeholder input
- +Document successful prompt patterns for PM tasks
- +Combine AI efficiency with human judgment and intuition
✗ Don't
- −Don't publish competitive analysis without fact-checking
- −Don't finalize user stories without engineering review
- −Don't make prioritization decisions solely on AI scoring
- −Don't skip customer validation of generated requirements
- −Don't ignore company-specific context and culture
💡 Pro Tips
- ★Provide context: company goals, constraints, customer feedback
- ★Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
- ★Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
- ★Use skill for 70% generation + 30% customization to company needs
When to Use This▌
✓ Use When
Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.
✗ Avoid When
Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.
Learning Path▌
- 1Basic: user stories, feature specs, status updates
- 2Intermediate: competitive analysis, prioritization frameworks, PRDs
- 3Advanced: product strategy, go-to-market planning, OKR setting
- 4Expert: product vision, market positioning, business model innovation
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
Ratings
4.5★★★★★41 reviews- ★★★★★Dev Haddad· Dec 20, 2024
draw-io has been reliable in day-to-day use. Documentation quality is above average for community skills.
- ★★★★★Meera Jackson· Dec 16, 2024
Registry listing for draw-io matched our evaluation — installs cleanly and behaves as described in the markdown.
- ★★★★★Chaitanya Patil· Dec 12, 2024
Useful defaults in draw-io — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- ★★★★★Kofi Rao· Dec 4, 2024
draw-io fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- ★★★★★Rahul Santra· Nov 27, 2024
Registry listing for draw-io matched our evaluation — installs cleanly and behaves as described in the markdown.
- ★★★★★Nia Sethi· Nov 23, 2024
draw-io is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
- ★★★★★Advait Sharma· Nov 15, 2024
draw-io reduced setup friction for our internal harness; good balance of opinion and flexibility.
- ★★★★★Neel Lopez· Nov 11, 2024
Useful defaults in draw-io — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- ★★★★★Piyush G· Nov 3, 2024
draw-io has been reliable in day-to-day use. Documentation quality is above average for community skills.
- ★★★★★Shikha Mishra· Oct 22, 2024
Solid pick for teams standardizing on skills: draw-io is focused, and the summary matches what you get after install.
showing 1-10 of 41