drawio

Manage draw.io diagrams programmatically via Playwright CDP and Python XML.

185|14|Updated Jan 6, 2026
One-click install
npx skills add https://github.com/xlang-ai/CUA-Gym --skill drawio-xlang-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: drawio
Source: https://github.com/xlang-ai/CUA-Gym/tree/main/.claude/skills/drawio
Command: npx skills add https://github.com/xlang-ai/CUA-Gym --skill drawio-xlang-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires playwright, xml.etree.ElementTree, and includes scripts (resource) and assets (resource) components.

What problem does it solve?

This Skill simplifies the process of setting up, manipulating, and verifying draw.io diagrams programmatically using Python and Playwright CDP.

Core Features & Use Cases

  • Programmatic Diagram Setup: Automatically set up draw.io diagrams by injecting initial XML.
  • Diagram Verification: Verify diagram state after agent actions for consistency and accuracy.
  • Use Case: Imagine you need to verify the state of a complex draw.io diagram generated by an agent. This Skill can automatically read and verify the diagram's state, ensuring it matches the expected output.

Quick Start

Use the drawio skill to inject an initial diagram XML into the draw.io editor and then verify the diagram's state after an agent's actions.

Frequently Asked Questions about drawio

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

FAQPage Schema
How do I programmatically manipulate and verify draw.io diagrams?

You can programmatically manipulate and verify draw.io diagrams by injecting initial XML and checking diagram state using Python XML handling combined with Playwright CDP for browser automation.

How does Playwright CDP apply to draw.io diagram verification?

Playwright CDP applies to draw.io diagram verification by managing the draw.io editor programmatically, allowing you to read and verify the diagram's state after an agent performs actions.

Can I use Python to set up draw.io diagrams with initial XML?

Yes, you can use Python to set up draw.io diagrams by injecting initial XML into the editor, utilizing the xml.etree.ElementTree module to handle the XML manipulation.

Do I need Playwright and xml.etree.ElementTree to automate draw.io testing?

Yes, you need Playwright and xml.etree.ElementTree to automate draw.io testing, as they manage browser automation via CDP and perform the underlying XML manipulation respectively.

What is the best way to verify a complex draw.io diagram generated by an agent?

The best way to verify a complex draw.io diagram generated by an agent is to automatically read and verify the diagram's state after actions, ensuring it matches expected output for consistency.

Are there limitations when using Python XML handling for draw.io diagram manipulation?

Limitations of using Python XML handling for draw.io diagram manipulation include relying strictly on xml.etree.ElementTree for XML parsing and requiring a Playwright CDP environment to manage the editor.