drawio

Generate draw.io diagrams from code using mxGraphModel XML.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/botterYosuke/The-Trader-Was-Replaced --skill drawio-botteryosuke
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: drawio
Source: https://github.com/botterYosuke/The-Trader-Was-Replaced/tree/main/.claude/skills/drawio
Command: npx skills add https://github.com/botterYosuke/The-Trader-Was-Replaced --skill drawio-botteryosuke

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and assets (resource) components.

What problem does it solve?

The Skill simplifies the process of creating and managing draw.io diagrams by enabling diagram generation through code, eliminating the need for manual creation or editing of draw.io files.

Core Features & Use Cases

  • Diagram Generation: Automatically create diagrams in draw.io native format from code.
  • File Export: Export diagrams in various formats (PNG, SVG, PDF) with embedded diagram XML for easy editing.
  • Use Case: Ideal for documenting processes, software architecture, and flowcharts in code, reducing manual efforts and ensuring consistency across all documents.

Quick Start

Use the drawio skill to generate a diagram of a simple process, saved as 'process_flow.drawio', with the following XML:

<mxGraphModel>
  <root>
    <mxCell id="0"/>
    <mxCell id="1" value="Start" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="0"/>
    <mxCell id="2" value="Process 1" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="0"/>
    <mxCell id="3" value="End" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" vertex="1" parent="0"/>
    <mxCell id="4" value="" style="edgeStyle=orthogonalEdgeStyle;html=1;" edge="1" source="1" target="2" parent="0"/>
    <mxCell id="5" value="" style="edgeStyle=orthogonalEdgeStyle;html=1;" edge="1" source="2" target="3" parent="0"/>
  </root>
</mxGraphModel>

Frequently Asked Questions about drawio

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate draw.io diagrams automatically using code?

You can generate draw.io diagrams automatically by writing native mxGraphModel XML code, which the Skill processes to create diagram files without manual editing. This ensures consistent diagram creation for software architecture and flowcharts.

Can I export draw.io diagrams to PNG, SVG, or PDF?

Yes, you can export generated draw.io diagrams to PNG, SVG, and PDF formats. These exports embed the original diagram XML, allowing you to easily edit the visual output later without rebuilding the diagram from scratch.

Do I need to know mxGraphModel to create draw.io diagrams?

Yes, familiarity with mxGraphModel and draw.io native XML is required to create accurate diagrams. This prerequisite knowledge ensures the generated code structures the nodes and edges correctly for your system design.

What is the best way to document software architecture in draw.io?

The best way to document software architecture is by defining the structure as mxGraphModel XML code. This approach eliminates manual file editing, reduces effort, and ensures visual consistency across all your process documentation.

Why use code to generate draw.io diagrams instead of manual editing?

Using code to generate draw.io diagrams eliminates manual creation and editing of diagram files. This automation reduces manual efforts, ensures consistency across documents, and allows you to manage complex system designs efficiently.

Are there limitations when automating draw.io diagram generation?

The main limitation is the requirement for drawing skills and familiarity with mxGraphModel XML. Without this technical knowledge, generating accurate diagrams for software development or educational purposes becomes difficult.