Remote OpenClaw
Menu
SkillsMCPPluginsFree guideDigestSubmit MCPSkillPluginMCPMCP, plugin, or skillAdvertise
Remote OpenClaw
SkillsMCPPluginsFree guideDigestSubmit MCPSkillPluginMCPMCP, plugin, or skillAdvertise

Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger →
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger →
Turn any website into LLM-ready data with Firecrawl logoTurn any website into LLM-ready data with Firecrawl

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits plus 10% off through our link.

Try Firecrawl free →
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now →
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free →
Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger →
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger →
Turn any website into LLM-ready data with Firecrawl logoTurn any website into LLM-ready data with Firecrawl

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits plus 10% off through our link.

Try Firecrawl free →
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now →
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free →
Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger →
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger →
Turn any website into LLM-ready data with Firecrawl logoTurn any website into LLM-ready data with Firecrawl

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits plus 10% off through our link.

Try Firecrawl free →
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now →
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free →
Skills/bahayonghang/drawio-skills/drawio
drawio logo

drawio

bahayonghang/drawio-skills
5K installs
Run it on Hostinger →up to 70% off + an extra 10% with code ZACAARON10Free API →

Installation

npx skills add https://github.com/bahayonghang/drawio-skills --skill drawio

Summary

Generate .drawio XML files and export to PNG/SVG/PDF/JPG locally using the native draw.io desktop app CLI.

SKILL.md

Pure Draw.io Skill — vendored upstream reference

Vendored reference, not an active skill in this repository. Source: Agents365-ai/drawio-skill, v1.4.0 (MIT). Kept only for the direct-xml exception path. This repository's default is YAML-first authoring through the Draw.io Base Skill CLI (see docs/adr/0006-yaml-first-authoring-remains-default.md); reach for this XML-first, Desktop-CLI material only for tiny one-off handoffs or exact mxGraph control.

Overview

Generate .drawio XML files and export to PNG/SVG/PDF/JPG locally using the native draw.io desktop app CLI.

Supported formats: PNG, SVG, PDF, JPG — no browser automation needed.

PNG, SVG, and PDF exports support --embed-diagram (-e) — the exported file contains the full diagram XML, so opening it in draw.io recovers the editable diagram. Use double extensions (name.drawio.png) to signal embedded XML.

When to Use

Explicit triggers: user says "diagram", "visualize", "flowchart", "draw", "architecture diagram", "process flow", "ER diagram", "UML", "sequence diagram", "class diagram", "neural network", "model architecture"

Proactive triggers:

  • Explaining a system with 3+ interacting components
  • Describing a multi-step process or decision tree
  • Comparing architectures or approaches side by side

Skip when: a simple list or table suffices, or user is in a quick Q&A flow

Prerequisites

The draw.io desktop app must be installed and the CLI accessible:

# macOS (Homebrew — recommended)
brew install --cask drawio
draw.io --version

# macOS (full path if not in PATH)
/Applications/draw.io.app/Contents/MacOS/draw.io --version

# Windows
"C:\Program Files\draw.io\draw.io.exe" --version

# Linux
draw.io --version

Install draw.io desktop if missing:

  • macOS: brew install --cask drawio or download from https://github.com/jgraph/drawio-desktop/releases
  • Windows: download installer from https://github.com/jgraph/drawio-desktop/releases
  • Linux: download .deb/.rpm from https://github.com/jgraph/drawio-desktop/releases

Workflow

Before starting the workflow, assess whether the user's request is specific enough. If key details are missing, ask 1-3 focused questions:

  • Diagram type — which preset? (ERD, UML, Sequence, Architecture, ML/DL, Flowchart, or general)
  • Output format — PNG (default), SVG, PDF, or JPG?
  • Output location — default is the user's working dir; honor any explicit path the user gives (e.g. "put it in ./artifacts/"). Don't ask if they didn't mention one.
  • Scope/fidelity — how many components? Any specific technologies or labels?

Skip clarification if the request already specifies these details or is clearly simple (e.g., "draw a flowchart of X").

  1. Auto-update (first use per conversation) — silently keep the skill current. Check the timestamp of <this-skill-dir>/.last_update. If the file is missing or older than 24 hours, run:
   git -C <this-skill-dir> pull --ff-only && date +%s > <this-skill-dir>/.last_update

If the pull fails (offline, conflict, not a git checkout, etc.), ignore the error and continue normally. Do not mention the update to the user unless they ask.

Step 0.5 — Resolve active preset. Determine which (if any) user-defined style preset applies to this generation.

  • Scan the user's message for a phrase that clearly names a style preset: "use my <name> style", "with my <name> style", "in <name> mode", "in the style of <name>". A bare with <name> does not count — "draw a diagram with redis" names a component, not a style. If a clear match is found → active preset = <name>.
  • Else, check ~/.drawio-skill/styles/ for any file with "default": true. If found → active preset = that one.
  • Else → no preset active; fall through to the built-in color/shape/edge conventions for the rest of the workflow.

Load the preset JSON from ~/.drawio-skill/styles/<name>.json, falling back to <this-skill-dir>/styles/built-in/<name>.json. If the named preset exists in neither location, tell the user the name is unknown, list the available presets (user dir + built-in), and stop — do not silently fall back to defaults.

When a preset loads successfully, mention it in the first line of the reply: _"Using preset <name> (confidence: <level>)."_ See the Applying a preset subsection below for how the preset changes color/shape/edge/font decisions.

  1. Check deps — verify draw.io --version succeeds; note platform for correct CLI path
  2. Plan — identify shapes, relationships, layout (LR or TB), group by tier/layer
  3. Generate — write .drawio XML file to disk. Default output dir is the user's working dir; if the user specified an output path or directory (e.g. ./artifacts/, docs/images/), use that instead — mkdir -p the target dir first. Apply the same dir choice to PNG/SVG/PDF exports in steps 4 and 7.
  4. Export draft — run CLI to produce PNG for preview
  5. Self-check — use the agent's built-in vision capability to read the exported PNG, catch obvious issues, auto-fix before showing user (requires a vision-enabled model such as Claude Sonnet/Opus)
  6. Review loop — show image to user, collect feedback, apply targeted XML edits, re-export, repeat until approved
  7. Final export — export approved version to all requested formats, report file paths

Step 5: Self-Check

After exporting the draft PNG, use the agent's vision capability (e.g., Claude's image input) to read the image and check for these issues before showing the user. If the agent does not support vision, skip self-check and show the PNG directly:

CheckWhat to look forAuto-fix action
Overlapping shapesTwo or more shapes stacked on top of each otherShift shapes apart by ≥200px
Clipped labelsText cut off at shape boundariesIncrease shape width/height to fit label
Missing connectionsArrows that don't visually connect to shapesVerify source/target ids match existing cells
Off-canvas shapesShapes at negative coordinates or far from the main groupMove to positive coordinates near the cluster
Edge-shape overlapAn edge/arrow visually crosses through an unrelated shapeAdd waypoints (<Array as="points">) to route around the shape, or increase spacing between shapes
Stacked edgesMultiple edges overlap each other on the same pathDistribute entry/exit points across the shape perimeter (use different exitX/entryX values)
  • Max 2 self-check rounds — if issues remain after 2 fixes, show the user anyway
  • Re-export after each fix and re-read the new PNG

Step 6: Review Loop

After self-check, show the exported image and ask the user for feedback.

Targeted edit rules — for each type of feedback, apply the minimal XML change:

User requestXML edit action
Change color of XFind mxCell by value matching X, update fillColor/strokeColor in style
Add a new nodeAppend a new mxCell vertex with next available id, position near related nodes
Remove a nodeDelete the mxCell vertex and any edges with matching source/target
Move shape XUpdate x/y in the mxGeometry of the matching mxCell
Resize shape XUpdate width/height in the mxGeometry of the matching mxCell
Add arrow from A to BAppend a new mxCell edge with source/target matching A and B ids
Change label textUpdate the value attribute of the matching mxCell
Change layout directionFull regeneration — rebuild XML with new orientation

Rules:

  • For single-element changes: edit existing XML in place — preserves layout tuning from prior iterations
  • For layout-wide changes (e.g., swap LR↔TB, "start over"): regenerate full XML
  • Overwrite the same {name}.png each iteration — do not create v1, v2, v3 files
  • After applying edits, re-export and show the updated image
  • Loop continues until user says approved / done / LGTM
  • Safety valve: after 5 iteration rounds, suggest the user open the .drawio file in draw.io desktop for fine-grained adjustments

Step 7: Final Export

Once the user approves:

  • Export to all requested formats (PNG, SVG, PDF, JPG) — default to PNG if not specified
  • Report file paths for both the .drawio source file and exported image(s)
  • Auto-launch: offer to open the .drawio file in draw.io desktop for fine-tuning — open diagram.drawio (macOS), xdg-open (Linux), start (Windows)
  • Confirm files are saved and ready to use

Style Presets

A style preset is a named JSON file that captures a user's visual preferences — palette, shape vocabulary, fonts, edge style. When a preset is active, it fully replaces the built-in conventions described in the ### Applying a preset subsection below (under ## Draw.io XML Structure).

Locations, in lookup order:

  1. ~/.drawio-skill/styles/<name>.json — user presets (survive git pull).
  2. <this-skill-dir>/styles/built-in/<name>.json — built-ins shipped with the skill (default, corporate, handdrawn).

A user preset shadows a built-in of the same name.

Only user presets can have "default": true. When the user says _"make <built-in-name> my default"_, copy the built-in JSON to ~/.drawio-skill/styles/<name>.json first, then set default: true on the copy — leave the shipped built-in untouched.

Name normalisation: always lowercase the user-provided name before writing or looking up files (the preset schema enforces lowercase; uppercase names will fail validation).

Learn flow

Triggers: "learn my style from <path> as <name>", "save this as <name> style", "remember this style as <name>".

Dispatch by file extension:

  • .drawio, .xml → XML path
  • .png, .jpg, .jpeg, .svg (rasterized flat image) → image path

Steps:

  1. Load the extraction reference. Read ../docs/style-extraction.md into context.
  2. Extract following the XML path or image path procedure in the reference.
  3. Normalize and build candidate. Convert the user-provided preset name to lowercase. Use this normalized name for ALL file paths in this flow. Build the candidate preset JSON and write it to /tmp/drawio-preset-<name>.json (where <name> is the already-normalized name). Do not save to ~/.drawio-skill/styles/<name>.json yet.
  4. Render a sample using the sample-diagram skeleton in ../docs/style-extraction.md, parameterized by the candidate preset. Export PNG to ./preset-<name>-sample.png using the same draw.io -x -f png -e -s 2 -o ./preset-<name>-sample.png /tmp/drawio-preset-<name>.drawio command the main workflow uses.
  5. Show the user:
  • Preset summary table (palette hex values, shapes per role, font, edge style, extras).
  • The sample PNG path (and embed the image if the environment supports it).
  • Provenance line: source.type, source.path, extracted_at, confidence.
  1. Wait for approval:
  • "save" / "looks good" → write candidate to ~/.drawio-skill/styles/<name>.json. Create ~/.drawio-skill/styles/ if it doesn't exist. Delete tempfile and sample PNG.
  • "change <field> to <value>" → edit the in-memory candidate, re-render, re-ask.
  • "cancel" / "abort" / "no" → delete tempfile and sample PNG; nothing saved.

Error behavior:

FailureBehavior
Source path does not existStop; report path not found.
XML parse failsStop; report the parse error; suggest opening the file in drawio desktop to repair.
Image vision unavailableStop; tell user to re-run on a vision-capable model or provide the .drawio file.
Extraction yields 0 vertices / shapesStop; refuse to save.
Extraction yields <3 distinct color pairsContinue; mark confidence: "low" (image) or "medium" (XML); warn in summary.
Preset name collides with existing user presetAsk: overwrite, or pick a new name.
Preset name collides with a built-in presetSave to user dir (shadows the built-in); warn once.
Sample render failsStill show summary; note "could not render sample — saving on your OK anyway". Do not block.

Management operations

All operations are natural language — no slash commands.

_Apply name normalisation (lowercase) to all <name>, <a>, <b> arguments before any file operation._

User saysAgent does
"list my styles", "what styles do I have", "show me my style presets"Read ~/.drawio-skill/styles/ and <this-skill-dir>/styles/built-in/. Print a table: name, location (user/built-in), source.type, confidence, default flag. Built-ins shadowed by a user preset are marked so.
"show my <name> style", "what's in <name>"Print the preset JSON (pretty-printed) + a one-line summary (source, confidence, is-default).
"make <name> the default", "set <name> as default"If <name> is a user preset: set default: true on it; clear default on any other user preset that had it; save both files. If <name> is a built-in: copy <this-skill-dir>/styles/built-in/<name>.json → ~/.drawio-skill/styles/<name>.json first, then set default: true on the copy. Never mutate the shipped built-in.
"remove default", "unset default"Clear default: true from whichever user preset has it.
"delete <name>", "remove <name>"Confirm first. Then rm ~/.drawio-skill/styles/<name>.json. Refuse to delete files under <this-skill-dir>/styles/built-in/ — suggest shadowing with a user preset of the same name.
"rename <a> to <b>"mv ~/.drawio-skill/styles/<a>.json ~/.drawio-skill/styles/<b>.json, then update the name field inside. Fails if <a> is a built-in (offer to copy-then-rename instead).
"learn my style from <path> as <name>"Dispatch to the Learn flow above.

Preset file validation

When loading any preset (for generation or management), do a lightweight structural check:

  • Required top-level fields present (name, version, palette, roles, shapes, font, edges).
  • version === 1.
  • Every populated palette slot has both fillColor and strokeColor as #RRGGBB.
  • confidence ∈ {"low", "medium", "high"} if present.

On validation failure:

  • During generation: warn the user, fall back to built-in conventions for this one diagram, do not mutate the file.
  • During learn: refuse to save the candidate; report which field failed.

Draw.io XML Structure

File skeleton

<?xml version="1.0" encoding="UTF-8"?>
<mxfile host="drawio" version="26.0.0">
  <diagram name="Page-1">
    <mxGraphModel>
      <root>
        <mxCell id="0" />
        <mxCell id="1" parent="0" />
        <!-- user shapes start at id="2" -->
      </root>
    </mxGraphModel>
  </diagram>
</mxfile>

Rules:

  • id="0" and id="1" are required root cells — never omit them
  • User shapes start at id="2" and increment sequentially
  • All shapes have parent="1" (unless inside a container — then use container's id)
  • All text uses html=1 in style for proper rendering
  • Never use -- inside XML comments — it's illegal per XML spec and causes parse errors
  • Escape special characters in attribute values: &amp;, &lt;, &gt;, &quot;
  • Multi-line text in labels: use &#xa; for line breaks inside value attributes (not literal \n). Example: value="Line 1&#xa;Line 2"

Shape types (vertex)

Style keywordUse for
rounded=0plain rectangle (default)
rounded=1rounded rectangle — services, modules
ellipse;circles/ovals — start/end, databases
rhombus;diamond — decision points
shape=mxgraph.aws4.resourceIcon;AWS icons
shape=cylinder3;cylinder — databases
swimlane;group/container with title bar

Required properties

<!-- Rectangle / rounded box -->
<mxCell id="2" value="Label" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="1">
  <mxGeometry x="100" y="100" width="160" height="60" as="geometry" />
</mxCell>

<!-- Cylinder (database) -->
<mxCell id="3" value="DB" style="shape=cylinder3;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#666666;fontColor=#333333;" vertex="1" parent="1">
  <mxGeometry x="350" y="100" width="120" height="80" as="geometry" />
</mxCell>

<!-- Diamond (decision) -->
<mxCell id="4" value="Check?" style="rhombus;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" vertex="1" parent="1">
  <mxGeometry x="100" y="220" width="160" height="80" as="geometry" />
</mxCell>

Containers and groups

For architecture diagrams with nested elements, use draw.io's parent-child containment — do not just place shapes on top of larger shapes.

TypeStyleWhen to use
Group (invisible)group;pointerEvents=0;No visual border needed, container has no connections
Swimlane (titled)swimlane;startSize=30;Container needs a visible title bar, or container itself has connections
Custom containerAdd container=1;pointerEvents=0; to any shapeAny shape acting as a container without its own connections

Key rules:

  • Add pointerEvents=0; to container styles that should not capture connections between children
  • Children set parent="containerId" and use coordinates relative to the container
<!-- Swimlane container -->
<mxCell id="svc1" value="User Service" style="swimlane;startSize=30;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="1">
  <mxGeometry x="100" y="100" width="300" height="200" as="geometry"/>
</mxCell>
<!-- Child inside container — coordinates relative to parent -->
<mxCell id="api1" value="REST API" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="svc1">
  <mxGeometry x="20" y="40" width="120" height="60" as="geometry"/>
</mxCell>
<mxCell id="db1" value="Database" style="shape=cylinder3;whiteSpace=wrap;html=1;" vertex="1" parent="svc1">
  <mxGeometry x="160" y="40" width="120" height="60" as="geometry"/>
</mxCell>

Connector (edge)

CRITICAL: Every edge mxCell must contain a <mxGeometry relative="1" as="geometry" /> child element. Self-closing edge cells (<mxCell ... edge="1" ... />) are invalid and will not render. Always use the expanded form.

<!-- Directed arrow — always include rounded, orthogonalLoop, jettySize for clean routing -->
<mxCell id="10" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="2" target="3">
  <mxGeometry relative="1" as="geometry" />
</mxCell>

<!-- Arrow with label + explicit entry/exit points to control direction -->
<mxCell id="11" value="HTTP/REST" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="2" target="4">
  <mxGeometry relative="1" as="geometry" />
</mxCell>

<!-- Arrow with waypoints — use when edge must route around other shapes -->
<mxCell id="12" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="3" target="5">
  <mxGeometry relative="1" as="geometry">
    <Array as="points">
      <mxPoint x="500" y="50" />
    </Array>
  </mxGeometry>
</mxCell>

Edge style rules:

  • Animated connectors: add flowAnimation=1; to any edge style to show a moving dot animation along the arrow. Works in SVG export and draw.io desktop — ideal for data-flow and pipeline diagrams. Example: style="edgeStyle=orthogonalEdgeStyle;flowAnimation=1;rounded=1;..."
  • Always include rounded=1;orthogonalLoop=1;jettySize=auto — these enable smart routing that avoids overlaps
  • Pin exitX/exitY/entryX/entryY on every edge when a node has 2+ connections — distributes lines across the shape perimeter
  • Add <Array as="points"> waypoints when an edge must detour around an intermediate shape
  • Leave room for arrowheads: the final straight segment between the last bend and the target shape must be ≥20px long. If too short, the arrowhead overlaps the bend and looks broken. Fix by increasing node spacing or adding explicit waypoints

Distributing connections on a shape

When multiple edges connect to the same shape, assign different entry/exit points to prevent stacking:

PositionexitX/entryXexitY/entryYUse when
Top center0.50connecting to node above
Top-left0.2502nd connection from top
Top-right0.7503rd connection from top
Right center10.5connecting to node on right
Bottom center0.51connecting to node below
Left center00.5connecting to node on left

Rule: if a shape has N connections on one side, space them evenly (e.g., 3 connections on bottom → exitX = 0.25, 0.5, 0.75)

Applying a preset

When the Workflow's step _Resolve active preset_ identified a preset, it fully replaces the built-in palette, shape keywords, edge defaults, and font for this diagram — do not mix values from the built-in color table below.

Color lookup. For each role a shape plays (service / database / queue / gateway / error / external / security), resolve preset.roles[role] to a slot name, then preset.palette[<slot>] to the (fillColor, strokeColor) pair. If roles[role] is unset or the resolved slot is null, follow this fallback ladder:

  1. Try the role's canonical slot (service→primary, database→success, queue→warning, gateway→accent, error→danger, external→neutral, security→secondary).
  2. If that slot is also empty, pick the most-populated non-null slot in the preset.
  3. Never reach into the built-in color table below — the preset is authoritative.

Decision and container shapes are not in preset.roles — they have shape vocabulary (preset.shapes.decision, preset.shapes.container) but no role-to-slot mapping. Pick their colors as follows:

  • Decision (rhombus) → use preset.palette.warning (the canonical yellow slot in the built-in conventions). If warning is empty, apply the slot-fallback ladder above starting from warning.
  • Container (swimlane) → use the palette slot matching the tier/grouping the container represents (e.g., a "Services" tier container uses primary; a "Data" tier uses success). If no tier signal is available, default to primary.

Shape keywords. Use preset.shapes[role] as the prefix of the vertex style string (before whiteSpace=wrap;html=1;...). Example: for a database role, if preset.shapes.database = "shape=cylinder3", the vertex style starts shape=cylinder3;whiteSpace=wrap;html=1;fillColor=.... The six named shape keys are service, database, queue, decision, external, container. Roles gateway, error, and security reuse preset.shapes.service unless the preset explicitly populates a key with their name.

Edges. Use preset.edges.style as the base edge style string. Append preset.edges.arrow. Per-edge routing keys (exitX/exitY/entryX/entryY/...) are still added by the usual routing rules in the rest of this document. If the flow between two shapes matches a token from preset.edges.dashedFor (either because the user's prompt used that word, or because one end of the edge plays a role whose typical relation is "optional"), append ;dashed=1 to the edge style.

Fonts. Append fontFamily=<preset.font.fontFamily>;fontSize=<preset.font.fontSize> to every vertex style. Container headers and swimlane titles additionally get fontSize=<preset.font.titleFontSize>;fontStyle=1 when preset.font.titleBold is true.

Extras.

  • preset.extras.sketch === true → append sketch=1 to every vertex style and every edge style.
  • preset.extras.globalStrokeWidth !== 1 (any value other than the drawio default of 1, including 0.5) → append strokeWidth=<n> to every vertex style and every edge style.

Interaction with diagram-type presets (ERD / UML / Sequence / ML / Flowchart). Diagram-type presets earlier in this document set structural style keywords that the user preset must preserve (e.g., ERD tables rely on shape=table;startSize=30;container=1;childLayout=tableLayout;...). The rule: keep the diagram-type preset's structural keywords, then layer the user preset's color / font / edge / extras on top. When a diagram-type preset hardcodes a color (fillColor=#dae8fc, etc.) that conflicts with the user preset, the user preset's color wins. Exception: fillColor=none is structural — do not replace it with a palette color.

Color palette (fillColor / strokeColor)

_Used only when no preset is active (see "Applying a preset" above)._

Color namefillColorstrokeColorUse for
Blue#dae8fc#6c8ebfservices, clients
Green#d5e8d4#82b366success, databases
Yellow#fff2cc#d6b656queues, decisions
Orange#ffe6cc#d79b00gateways, APIs
Red/Pink#f8cecc#b85450errors, alerts
Grey#f5f5f5#666666external/neutral
Purple#e1d5e7#9673a6security, auth

Layout tips

Spacing — scale with complexity:

Diagram complexityNodesHorizontal gapVertical gap
Simple≤5200px150px
Medium6–10280px200px
Complex>10350px250px

Routing corridors: between shape rows/columns, leave an extra ~80px empty corridor where edges can route without crossing shapes. Never place a shape in a gap that edges need to traverse.

Grid alignment: snap all x, y, width, height values to multiples of 10 — this ensures shapes align cleanly on draw.io's default grid and makes manual editing easier.

General rules:

  • Plan a grid before assigning x/y coordinates — sketch node positions on paper/mentally first
  • Group related nodes in the same horizontal or vertical band
  • Use swimlane cells for logical grouping with visible borders
  • Place heavily-connected "hub" nodes centrally so edges radiate outward instead of crossing
  • To force straight vertical connections, pin entry/exit points explicitly on edges:

exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0

  • Always center-align a child node under its parent (same center x) to avoid diagonal routing
  • Event bus pattern: place Kafka/bus nodes in the center of the service row, not below — services on either side can reach it with short horizontal arrows (exitX=1 left side, exitX=0 right side), eliminating all line crossings
  • Horizontal connections (exitX=1 or exitX=0) never cross vertical nodes in the same row; use them for peer-to-peer and publish connections

Avoiding edge-shape overlap:

  • Before finalizing coordinates, trace each edge path mentally — if it must cross an unrelated shape, either move the shape or add waypoints
  • For tree/hierarchical layouts: assign nodes to layers (rows), connect only between adjacent layers to minimize crossings
  • For star/hub layouts: place the hub center, satellites around it — edges stay short and radial
  • When an edge must span multiple rows/columns, route it along the outer corridor, not through the middle of the diagram

Export

Commands

# macOS — Homebrew (draw.io in PATH)
draw.io -x -f png -e -s 2 -o diagram.drawio.png input.drawio

# macOS — full path (if not in PATH)
/Applications/draw.io.app/Contents/MacOS/draw.io -x -f png -e -s 2 -o diagram.drawio.png input.drawio

# Windows
"C:\Program Files\draw.io\draw.io.exe" -x -f png -e -s 2 -o diagram.drawio.png input.drawio

# Linux (headless — requires xvfb-run)
xvfb-run -a draw.io -x -f png -e -s 2 -o diagram.drawio.png input.drawio

# SVG export
draw.io -x -f svg -o diagram.svg input.drawio

# PDF export
draw.io -x -f pdf -o diagram.pdf input.drawio

# Custom output directory (e.g. CI artifacts dir) — create if missing, then export there
mkdir -p ./artifacts && draw.io -x -f png -e -s 2 -o ./artifacts/diagram.drawio.png input.drawio

Key flags:

  • -x — export mode (required)
  • -f — format: png, svg, pdf, jpg
  • -e — embed diagram XML in output (PNG, SVG, PDF only) — exported file remains editable in draw.io
  • -s — scale: 1, 2, 3 (2 recommended for PNG)
  • -o — output file path; accepts any directory (e.g. ./artifacts/diagram.drawio.png) — mkdir -p the target dir first. Use .drawio.png double extension when embedding.
  • -b — border width around diagram (default: 0, recommend 10)
  • -t — transparent background (PNG only)
  • --page-index 0 — export specific page (default: all)

Browser fallback (no CLI needed)

When the draw.io desktop CLI is unavailable, generate a browser-editable URL by deflate-compressing and base64-encoding the XML:

# Encode .drawio XML into a diagrams.net URL
python3 -c "
import zlib, base64, urllib.parse, sys
xml = open(sys.argv[1]).read()
# Raw deflate (no zlib header) — diagrams.net uses mxGraph's raw inflate
c = zlib.compressobj(9, zlib.DEFLATED, -zlib.MAX_WBITS)
compressed = c.compress(xml.encode('utf-8')) + c.flush()
# Standard base64 (atob rejects url-safe -/_); strip any newlines
encoded = base64.b64encode(compressed).decode('utf-8').replace('\n', '')
print('https://viewer.diagrams.net/?tags=%7B%7D&lightbox=1&edit=_blank#R' + urllib.parse.quote(encoded, safe=''))
" input.drawio

This produces a client-side URL that opens the diagram in the browser for viewing and editing. No data is uploaded to any server — the entire diagram XML is encoded in the URL fragment (after #), which is never sent to the server. Useful when the user cannot install the desktop app.

Fallback chain

When tools are unavailable, degrade gracefully:

ScenarioBehavior
draw.io CLI missing, Python availableUse browser fallback (diagrams.net URL)
draw.io CLI missing, Python missingGenerate .drawio XML only; instruct user to open in draw.io desktop or diagrams.net manually
Vision unavailable for self-checkSkip self-check (step 5); proceed directly to showing user the exported PNG
Export fails (Chromium/display issues)On Linux, retry with xvfb-run -a; if still failing, deliver .drawio XML and suggest manual export

Checking if draw.io is in PATH

# Try short command first
if command -v draw.io &>/dev/null; then
  DRAWIO="draw.io"
elif [ -f "/Applications/draw.io.app/Contents/MacOS/draw.io" ]; then
  DRAWIO="/Applications/draw.io.app/Contents/MacOS/draw.io"
else
  echo "draw.io not found — install from https://github.com/jgraph/drawio-desktop/releases"
fi

Common Mistakes

MistakeFix
Missing id="0" and id="1" root cellsAlways include both at the top of <root>
Shapes not connectedsource and target on edge must match existing shape id values
Export command not found on macOSTry full path /Applications/draw.io.app/Contents/MacOS/draw.io
Linux: blank/error output headlesslyPrefix command with xvfb-run -a
PDF export failsEnsure Chromium is available (draw.io bundles it on desktop)
Background color wrong in CLI exportKnown CLI bug; add --transparent flag or set background via style
Overlapping shapesScale spacing with complexity (200–350px); leave routing corridors
Edges crossing through shapesAdd waypoints, distribute entry/exit points, or increase spacing
Special characters in valueUse XML entities: &amp; &lt; &gt; &quot;
Iteration loop never endsAfter 5 rounds, suggest user open .drawio in draw.io desktop for fine-tuning
Self-closing edge mxCellAlways use expanded form with <mxGeometry> child — self-closing edges won't render
-- inside XML commentsIllegal per XML spec — use single hyphens or rephrase
Arrowhead overlaps bendFinal edge segment before target must be ≥20px — increase spacing or add waypoints
Literal \n in label textUse &#xa; for line breaks in value attributes

Diagram Type Presets

When the user requests a specific diagram type, apply the matching preset below for shapes, styles, and layout conventions.

ERD (Entity-Relationship Diagram)

ElementStyleNotes
Tableshape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;strokeColor=#6c8ebf;fillColor=#dae8fc;Each table is a container
Row (column)shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;fontSize=12;Child of table, parent=tableId
PK columnBold text: fontStyle=1 on the rowMark with PK prefix or key icon
FK relationshipDashed edge: dashed=1;endArrow=ERmandOne;startArrow=ERmandOne;Use ER notation arrows
LayoutTB, tables spaced 300px apartGroup related tables vertically

UML Class Diagram

ElementStyleNotes
Class boxswimlane;fontStyle=1;align=center;startSize=26;html=1;3-section: title / attributes / methods
Separatorline;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=10;rotatable=0;labelPosition=left;points=[];portConstraint=eastwest;Between sections
InheritanceendArrow=block;endFill=0;Hollow triangle arrow
ImplementationendArrow=block;endFill=0;dashed=1;Dashed + hollow triangle
CompositionendArrow=diamondThin;endFill=1;Filled diamond
AggregationendArrow=diamondThin;endFill=0;Hollow diamond
LayoutTB, classes 250px apartInterfaces above implementations

Sequence Diagram

ElementStyleNotes
Actor/Objectshape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=1;collapsible=0;recursiveResize=0;outlineConnect=0;portConstraint=eastwest;Lifeline with dashed vertical line
Sync messagehtml=1;verticalAlign=bottom;endArrow=block;Solid line, filled arrowhead
Async messagehtml=1;verticalAlign=bottom;endArrow=open;dashed=1;Dashed line, open arrowhead
Return messagehtml=1;verticalAlign=bottom;endArrow=open;dashed=1;strokeColor=#999999;Grey dashed
Activation boxshape=umlFrame;whiteSpace=wrap; on the lifelineNarrow rectangle on lifeline
LayoutLR, lifelines spaced 200px apartTime flows top to bottom

Architecture Diagram

ElementStyleNotes
Layer/tierswimlane;startSize=30;Containers for grouping: Client / API / Service / Data
Servicerounded=1;whiteSpace=wrap;html=1; + tier colorUse color palette by tier
Databaseshape=cylinder3;whiteSpace=wrap;html=1;Green palette
Queue/Busrounded=1;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;Yellow — place centrally for hub pattern
Gateway/LBshape=mxgraph.aws4.resourceIcon; or rounded=1; with orangeOrange palette
Externalrounded=1;dashed=1;fillColor=#f5f5f5;strokeColor=#666666;Dashed border for external systems
LayoutTB or LR by tier count; ≥4 tiers → TBHub nodes centered

ML / Deep Learning Model Diagram

For neural network architecture diagrams — ideal for papers targeting NeurIPS, ICML, ICLR.

ElementStyleNotes
Layer blockrounded=1;whiteSpace=wrap;html=1; + type colorMain building block
Input/OutputfillColor=#d5e8d4;strokeColor=#82b366;Green
Conv / PoolingfillColor=#dae8fc;strokeColor=#6c8ebf;Blue
Attention / TransformerfillColor=#e1d5e7;strokeColor=#9673a6;Purple
RNN / LSTM / GRUfillColor=#fff2cc;strokeColor=#d6b656;Yellow
FC / LinearfillColor=#ffe6cc;strokeColor=#d79b00;Orange
Loss / ActivationfillColor=#f8cecc;strokeColor=#b85450;Red/Pink
Skip connectiondashed=1;endArrow=block;curved=1;Dashed curved arrow
Tensor shape labelAdd shape annotation as secondary label: value="Conv2D&#xa;(B, 64, 32, 32)"Use &#xa; for multi-line
LayoutTB (data flows top→bottom), layers 150px apartGroup encoder/decoder as swimlanes

Tensor shape convention: annotate each layer with input/output tensor dimensions in (B, C, H, W) or (B, T, D) format. Place dimensions as the second line of the label using &#xa;.

Flowchart (enhanced)

ElementStyleNotes
Start/Endellipse;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;Green oval
Processrounded=0;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;Blue rectangle
Decisionrhombus;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;Yellow diamond
I/Oshape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;Orange parallelogram
Subprocessrounded=0;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6; + double borderPurple
Yes/No labelsvalue="Yes" / value="No" on decision edgesAlways label decision branches
LayoutTB, 200px vertical gapDecisions branch LR, merge back to center

Score

0–100
69/ 100

Grade

C

Popularity21/30

5,069 installs — solid traction.

Completeness27/30

Documented: full SKILL.md body, description, one-line install. Missing: category/license metadata.

Trust15/25

Community skill with a public GitHub source repository you can review.

Freshness6/15

No update timestamp is tracked for this skill in our catalog.

Scored automatically from popularity, completeness, trust, and freshness — computed only from data in our catalog, never fabricated.

Proud of your score? Add this badge to your README.

Paste a snippet into your GitHub README. The badge updates automatically and links back to this page.

Drawio skill score badge previewScore badge

Markdown

[![Drawio skill](https://www.remoteopenclaw.com/skills/bahayonghang/drawio-skills/drawio/badges/score.svg)](https://www.remoteopenclaw.com/skills/bahayonghang/drawio-skills/drawio)

HTML

<a href="https://www.remoteopenclaw.com/skills/bahayonghang/drawio-skills/drawio"><img src="https://www.remoteopenclaw.com/skills/bahayonghang/drawio-skills/drawio/badges/score.svg" alt="Drawio skill"/></a>

Drawio FAQ

How do I install the Drawio skill?

Run “npx skills add https://github.com/bahayonghang/drawio-skills --skill drawio” in your terminal. The skill is added to your agent's skills directory and picked up automatically on the next run — no restart or extra configuration needed.

What does the Drawio skill do?

Generate .drawio XML files and export to PNG/SVG/PDF/JPG locally using the native draw.io desktop app CLI. The full SKILL.md on this page shows the exact instructions the skill gives your agent.

Is the Drawio skill free?

Yes. Drawio is a free, open-source skill published from bahayonghang/drawio-skills. As with any third-party skill, review the source repository before installing it into an agent with sensitive access.

Does Drawio work with Claude Code and OpenClaw?

Yes. Skills use the portable SKILL.md format, so Drawio works with Claude Code, OpenClaw, Codex, Hermes, and any other agent that reads SKILL.md skills.

Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger →
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger →
Turn any website into LLM-ready data with Firecrawl logoTurn any website into LLM-ready data with Firecrawl

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits plus 10% off through our link.

Try Firecrawl free →
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now →
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free →
Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger →
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger →
Turn any website into LLM-ready data with Firecrawl logoTurn any website into LLM-ready data with Firecrawl

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits plus 10% off through our link.

Try Firecrawl free →
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now →
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free →
Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger →
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger →
Turn any website into LLM-ready data with Firecrawl logoTurn any website into LLM-ready data with Firecrawl

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits plus 10% off through our link.

Try Firecrawl free →
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now →
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free →

Categories

External DownloadsCommand Execution
View on GitHub

Recommended skills

Browse all →
find-skills logo

find-skills

vercel-labs/skills

2.7M installsInstall
frontend-design logo

frontend-design

anthropics/skills

720K installsInstall
grill-me logo

grill-me

mattpocock/skills

701K installsInstall
agent-browser logo

agent-browser

vercel-labs/agent-browser

596K installsInstall
grill-with-docs logo

grill-with-docs

mattpocock/skills

594K installsInstall
vercel-react-best-practices logo

vercel-react-best-practices

vercel-labs/agent-skills

591K installsInstall

Browse

Skills by category

Frontend250Git198Data154Testing120Design105Docs103Security96Automation87Backend76Devops37Productivity29Mcp23

Related guides

Hand-picked reading to help you choose, install, and use agent skills.

GuideBest Openclaw Skills 2026GuideHow To Evaluate Openclaw Skill Before InstallingGuideOpenclaw Skills Complete Guide

Remote OpenClaw

AI agent skills directory, marketplace, and workflow hub for OpenClaw, Hermes Agent, Claude Code, Codex, and MCP-powered operator stacks.

The Agent Stack: weekly agent tooling digest, free.

Explore

  • Home
  • Skills Directory
  • Claude Code Skills
  • Codex Skills
  • MCP Clients
  • Marketplace
  • Hermes Ecosystem
  • Free guide
  • Learn
  • OpenClaw for Creators
  • OpenClaw for Founders
  • Blog
  • The Agent Stack (Digest)

More

  • Submit a Tool
  • Advertise
  • Playbook
  • Free Tools
  • API
  • Shipping
  • Contact
  • Terms
  • Privacy

Know a company that should advertise here? Refer them and earn 10% — up to $300 per referral.

© 2026 Remote OpenClaw
Fazier badgeFeatured on Twelve ToolsFeatured on Wired BusinessRemote OpenClaw - Featured on AI Agents DirectoryListed on Turbo0Featured on Uneed