xml-generation

Generate draw.io diagrams programmatically using XML and mxGraphModel structures.

18|2|Updated Dec 12, 2025
One-click install
npx skills add https://github.com/markus41/claude --skill xml-generation-markus41
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: xml-generation
Source: https://github.com/markus41/claude/tree/main/plugins/drawio-diagramming/skills/xml-generation
Command: npx skills add https://github.com/markus41/claude --skill xml-generation-markus41

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a comprehensive reference for programmatically generating draw.io diagrams using XML, enabling automated diagram creation and integration into workflows.

Core Features & Use Cases

  • XML Structure Reference: Detailed guide on mxfile, mxGraphModel, mxCell, and mxGeometry elements.
  • Shape and Style Definitions: Comprehensive lists of available shapes, styles, colors, and arrow types.
  • Use Case: Automatically generate an AWS architecture diagram based on cloud resource configurations, or create a UML class diagram from code annotations.

Quick Start

Use the xml-generation skill to create a simple flowchart with start, process, and end nodes.

Frequently Asked Questions about xml-generation

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

FAQPage Schema
How do I generate draw.io diagrams programmatically using XML?

Generate draw.io diagrams programmatically by writing XML to define the mxGraphModel structure, specifying mxCell and mxGeometry elements to create flowcharts, architecture diagrams, and UML diagrams automatically.

What is the mxGraphModel structure needed for draw.io code generation?

The mxGraphModel structure for draw.io code generation consists of nested XML elements: mxfile as the root, mxGraphModel for the canvas, and mxCell with mxGeometry to define individual shapes, connections, and layout positions.

Can I automate architecture diagram creation from code or cloud configurations?

Automate architecture diagram creation by mapping cloud resource configurations or code annotations to mxGraphModel XML elements, generating draw.io files that represent flowcharts, UML, or AWS architecture diagrams without manual drawing.

How do I apply styles, colors, and shape definitions in draw.io XML?

Apply styles, colors, and shape definitions in draw.io XML by setting attributes on mxCell elements, utilizing available shape libraries and style properties to customize the visual appearance of nodes and arrow connections.

Do I need any external libraries to create draw.io files with XML?

No external libraries are required to create draw.io files with XML, as the skill provides a self-contained reference for mxGraphModel structure and shape definitions, allowing you to output valid diagram files directly from your code.

What are the limitations of generating draw.io diagrams with XML?

Generating draw.io diagrams with XML requires manual coordinate calculation for mxGeometry elements and lacks a visual editor's drag-and-drop convenience, making complex layouts labor-intensive to code and debug without rendering previews.