← Back to Skills Marketplace
thincher

drawio-generator

by 要啥自行车 · GitHub ↗ · v1.0.0
cross-platform ✓ Security Clean
955
Downloads
1
Stars
7
Active Installs
1
Versions
Install in OpenClaw
/install drawio-generator
Description
Generate draw.io diagrams from Mermaid, XML, or CSV code. Use this skill when the user requests any visual diagram including flowcharts, UML diagrams, ERD, a...
README (SKILL.md)

Draw.io Diagram Generator

Generate interactive draw.io diagrams that users can open and edit in their browser.

Supported Diagram Types

Draw.io supports virtually any diagram type:

  • Standard: Flowcharts, org charts, mind maps, timelines, Venn diagrams
  • Software: UML (class, sequence, activity, use case), ERD, architecture diagrams
  • Cloud/Infrastructure: AWS, Azure, GCP, Kubernetes, network topology
  • Engineering: Electrical circuits, digital logic, P&ID, floor plans
  • Business: BPMN, value streams, customer journeys, SWOT
  • UI/UX: Wireframes, mockups, sitemaps
  • And more: Infographics, data flows, decision trees, etc.

Format Selection Guide

Format Best For
Mermaid Flowcharts, sequences, ERD, Gantt, state diagrams, class diagrams
CSV Hierarchical data (org charts), bulk import from spreadsheets
XML Complex layouts, precise positioning, custom styling, icons, shapes

How to Use

Step 1: Determine the best format for the diagram

  • Use Mermaid for most standard diagrams (flowcharts, sequence diagrams, ERD)
  • Use CSV for hierarchical data like org charts
  • Use XML when you need precise control over positioning or custom shapes

Step 2: Generate the diagram code

Write the diagram code in the chosen format (see examples below).

Step 3: Execute the Python script

Run the script scripts/generate_drawio_url.py (relative to this SKILL.md file) to create the markdown link.

Format Templates

Mermaid

graph TD
    A[Start] --> B{Decision}
    B -->|Yes| C[Action]
    B -->|No| D[End]

XML (draw.io native)

\x3CmxGraphModel>
  \x3Croot>
    \x3CmxCell id="0"/>
    \x3CmxCell id="1" parent="0"/>
    \x3CmxCell id="2" value="Box" style="rounded=1;fillColor=#d5e8d4;" vertex="1" parent="1">
      \x3CmxGeometry x="100" y="100" width="120" height="60" as="geometry"/>
    \x3C/mxCell>
  \x3C/root>
\x3C/mxGraphModel>

CSV (hierarchical data)

# label: %name%
# style: rounded=1;whiteSpace=wrap;html=1;
# connect: {"from":"manager","to":"name","invert":true}
# layout: auto
name,manager
CEO,
CTO,CEO
CFO,CEO

CRITICAL: XML Well-Formedness

When generating draw.io XML, the output must be well-formed XML:

  • NEVER use double hyphens (--) inside XML comments. Use single hyphens or rephrase (e.g., \x3C!-- Order 1 to OrderItem --> not \x3C!-- Order 1 --- OrderItem -->)
  • Escape special characters in attribute values (&, <, >, ")

Script Usage

The script generate_drawio_url.py is located in the scripts/ subdirectory relative to this SKILL.md file. Execute it with command-line arguments:

python scripts/generate_drawio_url.py -t mermaid -c "graph TD\
    A --> B"
python scripts/generate_drawio_url.py --type xml --code "\x3CmxGraphModel>...\x3C/mxGraphModel>"
python scripts/generate_drawio_url.py -t csv -c "name,manager\
CEO,\
CTO,CEO"

Arguments:

  • -t, --type: Diagram type (required), choices: mermaid, xml, csv
  • -c, --code: Diagram code content (required)

The script outputs a markdown link: [点击查看图表](\x3CURL>)

Present the markdown link directly to the user.

Usage Guidance
This skill appears to be what it says: it builds a draw.io URL that embeds your diagram data and prints a markdown link. Before using it, consider: (1) The generated URL encodes your diagram content and when opened will send that content to app.diagrams.net — avoid embedding sensitive data in diagrams if you don't want it transmitted to a third party. (2) You can inspect or run the small Python script locally to verify behavior; it only encodes/compresses the input and constructs a URL. (3) Be cautious clicking links from untrusted sources; if you prefer not to send content to the web, use the draw.io desktop app or export diagrams locally.
Capability Analysis
Type: OpenClaw Skill Name: drawio-generator Version: 1.0.0 The skill is designed to generate draw.io URLs from user-provided diagram code (Mermaid, XML, CSV). The `SKILL.md` instructions guide the agent to execute a local Python script (`scripts/generate_drawio_url.py`) with the diagram type and code as arguments. The Python script uses standard libraries (`argparse`, `urllib.parse.quote`, `zlib`, `base64`, `json`) to safely encode and compress the diagram code before embedding it into a `diagrams.net` URL. There is no evidence of data exfiltration, unauthorized command execution, persistence mechanisms, or prompt injection attempts against the agent within the `SKILL.md` or the Python code. All operations are aligned with the stated purpose and use secure practices for URL construction.
Capability Assessment
Purpose & Capability
Name/description match the contained script and instructions. The included Python script takes diagram text, compresses and encodes it, and constructs a draw.io URL — exactly what the skill claims to do.
Instruction Scope
SKILL.md instructs only to choose a format, write diagram code, and run the provided script. The instructions do not ask the agent to read unrelated files, access credentials, or transmit data to unexpected endpoints. The only external endpoint referenced is app.diagrams.net, consistent with the skill purpose.
Install Mechanism
No install spec (instruction-only with one script). No downloads, no package managers, and nothing is written to disk beyond the provided script. Low installation risk.
Credentials
The skill requires no environment variables, no credentials, and no config paths. The script does not access secrets or system configuration — proportional to the declared function.
Persistence & Privilege
always is false and the skill does not request elevated or persistent privileges. It does not modify other skills or system settings.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install drawio-generator
  3. After installation, invoke the skill by name or use /drawio-generator
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
- Initial release of drawio-generator. - Generate draw.io diagrams from Mermaid, XML, or CSV code. - Supports a wide range of diagrams: flowcharts, UML, ERD, architecture, org charts, network topology, wireframes, and more. - Provides guidance on selecting the appropriate format (Mermaid, XML, CSV) for different diagram types. - Includes usage instructions and format templates. - Outputs a markdown link that opens the diagram directly in draw.io for editing.
Metadata
Slug drawio-generator
Version 1.0.0
License
All-time Installs 8
Active Installs 7
Total Versions 1
Frequently Asked Questions

What is drawio-generator?

Generate draw.io diagrams from Mermaid, XML, or CSV code. Use this skill when the user requests any visual diagram including flowcharts, UML diagrams, ERD, a... It is an AI Agent Skill for Claude Code / OpenClaw, with 955 downloads so far.

How do I install drawio-generator?

Run "/install drawio-generator" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is drawio-generator free?

Yes, drawio-generator is completely free (open-source). You can download, install and use it at no cost.

Which platforms does drawio-generator support?

drawio-generator is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created drawio-generator?

It is built and maintained by 要啥自行车 (@thincher); the current version is v1.0.0.

💬 Comments