Agent skill

Drawio Skill

by ranxi2001 in ranxi2001/zero2Agent

A skill your agent uses when user requests diagrams, flowcharts, architecture charts, or visualizations.

MITAuto-check passedDevelopment

Install Drawio Skill

skills CLI
$ npx skills add ranxi2001/zero2Agent --skill drawio-skill -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ranxi2001/zero2Agent drawio-skill --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ranxi2001/zero2Agent.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/drawio-skill .claude/skills/drawio-skill && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
drawio-skill
GitHub stars
690
Token cost
~6.6k tokens
SKILL.md length
2,460 words
Files
32 (incl. scripts, assets)
Skills in repo
8
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when user requests diagrams, flowcharts, architecture charts, or visualizations.

  • Works in 3 steps: Self-Check → Review Loop → Final Export
  • User requests diagrams
  • SKILL.md covers Overview, When to Use, Prerequisites and Workflow, plus 4 more sections
  • Calls brew and python3; reaches github.com and viewer.diagrams.net

What it does

Drawio Skill is an agent skill from ranxi2001/zero2Agent. Use when user requests diagrams, flowcharts, architecture charts, or visualizations. Also use proactively when explaining systems with 3+ components, complex data flows, or relationships that benefit from visual representation. Generates .drawio XML files and exports to PNG/SVG/PDF locally using the native draw.io desktop CLI.

Its SKILL.md is about 6.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 35 other files, including scripts and assets (for example `.github/workflows/publish-clawhub.yml`, `README.md` and `README_CN.md`). Compatibility notes: Requires draw.io desktop app CLI on PATH (macOS/Linux/Windows). Self-check step requires a vision-enabled model (e.g., Claude Sonnet/Opus); gracefully skipped…

It sits in Development, covering Diagrams. It works with draw.io. The repository describes itself as: 面向大厂Agent研发岗位求职的agent教程网站,涵盖技术路线与面试八股文. The licence is MIT.

When your agent uses it

  • User requests diagrams
  • Architecture charts

Example prompts

  • “/drawio-skill”

Requirements

  • Compatibility (from SKILL.md): Requires draw.io desktop app CLI on PATH (macOS/Linux/Windows). Self-check step requires a vision-enabled model (e.g., Claude Sonnet/Opus); gracefully skipped if unavailable.

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Self-Check
  2. Review Loop
  3. Final Export

What it can do on your machine

Read from SKILL.md and the folder at commit 472ce78. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/, which the agent can run.

    Shell commands in SKILL.md call:

    • brew
    • python3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • github.com
    • viewer.diagrams.net

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Requires draw.io desktop app CLI on PATH (macOS/Linux/Windows). Self-check step requires a vision-enabled model (e.g., Claude Sonnet/Opus); gracefully skipped if unavailable.

    From compatibility in the SKILL.md frontmatter.

Context cost

Drawio Skill loads about 6.6k tokens when it runs. Until then it costs about 85 tokens; SKILL.md has 2,460 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~85
When it runs · the whole SKILL.md, loaded when a task matches
~6.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from ranxi2001/zero2Agent at commit 472ce78, republished under its MIT licence (© ranxi2001). 2,460 words, ~6,641 tokens.

Download SKILL.mdSave it as .claude/skills/drawio-skill/SKILL.md (or your agent's skills folder). This skill also uses 31 other files; get the full folder from GitHub.
name
drawio-skill
description
Use when user requests diagrams, flowcharts, architecture charts, or visualizations. Also use proactively when explaining systems with 3+ components, complex data flows, or relationships that benefit from visual representation. Generates .drawio XML files and exports to PNG/SVG/PDF locally using the native draw.io desktop CLI.
compatibility
Requires draw.io desktop app CLI on PATH (macOS/Linux/Windows). Self-check step requires a vision-enabled model (e.g., Claude Sonnet/Opus); gracefully skipped if unavailable.
license
MIT
homepage
https://github.com/Agents365-ai/drawio-skill
platforms
macos, linux, windows
metadata.author
Agents365-ai
metadata.version
1.1.0

Draw.io Diagrams

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:

bash
# 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:

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?
  • 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. 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 (output dir same as user's working dir)
  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)
Off-center contentChildren hugging the left side of a container with empty right spaceRecalculate child x offsets: startX = (containerWidth - totalContentWidth) / 2
  • 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

Draw.io XML Structure

File skeleton
xml
<?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
xml
<!-- 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
xml
<!-- 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.

xml
<!-- 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)

Color palette (fillColor / strokeColor)
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
Show full SKILL.md (1,131 more words)Show less
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:

  • Center children inside containers by default: when placing nodes inside a swimlane or group, calculate startX = (containerWidth - totalContentWidth) / 2 so content is visually centered, not left-aligned. This applies to all container types (swimlane, group, custom container).
  • 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
bash
# 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

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 (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:

bash
# Encode .drawio XML into a diagrams.net URL
python3 -c "
import zlib, base64, urllib.parse, sys
xml = open(sys.argv[1]).read()
compressed = zlib.compress(xml.encode('utf-8'), 9)
encoded = base64.urlsafe_b64encode(compressed).decode('utf-8')
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
bash
# 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

© ranxi2001, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 31 other files (scripts, assets) in .agents/skills/drawio-skill of ranxi2001/zero2Agent.

  • SKILL.md
  • .github/workflows/publish-clawhub.yml
  • README.md
  • README_CN.md
  • agents/openai.yaml
  • assets/demo-erd.drawio
  • assets/demo-layered-cn.drawio
  • assets/demo-layered-cn.png
  • assets/demo-layered.drawio
  • assets/demo-layered.png
  • assets/demo-ml.drawio
  • assets/demo-ring-cn.drawio
  • assets/demo-ring-cn.png
  • assets/demo-ring.drawio
  • assets/demo-ring.png
  • assets/demo-sequence.drawio
  • assets/demo-star-cn.drawio
  • … and 15 more

Open the folder on GitHubat commit 472ce78

Compare with similar skills

Drawio Skill next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Drawio Skill compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Drawio Skill this skillranxi2001/zero2Agent690—~6.6kAutomated safety check: PassMIT
Diagram Designcathrynlavery/diagram-design45k1 repos~7.5kAutomated safety check: PassMIT
Draw.io Diagram StudioAgents365-ai/drawio-skill10k—~2.4kAutomated safety check: NotesMIT
Draw.io Diagram ReconstructionHKUSTDial/Supervisor-Skills8.5k—~5.4kAutomated safety check: PassMIT
Scibox Diagramjihe520/sci-box2481 repos~983Automated safety check: NotesNone
Drawio Diagram BuilderWill-hxw/drawio-diagram-builder412—~5.9kAutomated safety check: PassMIT

Similar skills

  • Diagram Design

    cathrynlavery/diagram-design

    Creates branded diagrams, from architecture, flowchart and sequence to charts and maps, as self-contained HTML with inline SVG, with import from draw.io, Mermaid and Excalidraw.

    45k GitHub starsUsed in 1 repo~7.5k tokens
    DevelopmentAuto-check passed
  • Draw.io Diagram Studio

    Agents365-ai/drawio-skill

    Creates and edits editable draw.io diagrams from descriptions, code, infrastructure files, SQL and API schemas, with sync, review, test and export tools.

    10k GitHub stars~2.4k tokensUpdated 6 days ago
    DevelopmentAuto-check: notes
  • Draw.io Diagram Reconstruction

    HKUSTDial/Supervisor-Skills

    Rebuilds a reference diagram image as an editable, high-fidelity Draw.io file, mixing native elements, SVG icons and cropped PNGs, with a batch workflow for a folder of images.

    8.5k GitHub stars~5.4k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Scibox Diagram

    jihe520/sci-box

    制作与修改可编辑的 draw.io / diagrams.net 示意图(.drawio XML),产出 .drawio + PNG/PDF。三条路径:套用内置模板(五带技术路线图、三栏研究框架图、三栏阶段流程图、横版任务流水线图)、从零手写…

    248 GitHub starsUsed in 1 repo~983 tokens
    DevelopmentAuto-check: notes
  • Drawio Diagram Builder

    Will-hxw/drawio-diagram-builder

    Create, edit, replicate, and iteratively refine editable research and technical diagrams in diagrams.net/draw.io (.drawio XML) from prompts, papers, repositories, screenshots, or existing diagrams.

    412 GitHub stars~5.9k tokensUpdated 3 mo ago
    DevelopmentAuto-check passed
  • Drawio Azure

    sparklabx/drawio-ai-kit

    A skill your agent uses when the user asks for an Azure architecture diagram — VNet/networking, App Service, AKS, landing zone, multi-region, or any diagram built with Azure service icons.

    652 GitHub starsUsed in 1 repo~1.6k tokens
    DevelopmentAuto-check passed

More from ranxi2001/zero2Agent

All 8 skills in this repo
  • Classify Interview Questions

    ranxi2001/zero2Agent

    将批量面经或零散面试题逐题去重并分发:Agent/LLM/AI工程题写入 zero2Agent 的 learn-agent-interview,传统后端八股写入相邻 zero2Leetcode 的夏季八股。大批量输入使用 gpt-5.6-luna API 逐篇并发抽题和语义召回,再审查、去重和写答案;不新建面经实录文章。

    690 GitHub stars~2.6k tokensUpdated yesterday
    Auto-check passed
  • Chinese Quotes Fix

    ranxi2001/zero2Agent

    Check and fix Chinese quote pairing in Markdown files generated by ClaudeCode or other agents, while preserving Markdown syntax and protected blocks.

    690 GitHub stars~735 tokensUpdated yesterday
    Auto-check passed
  • New Article

    ranxi2001/zero2Agent

    在 zero2Agent 项目中创建新的学习文章。当用户说"写一篇新文章"、"创建文章"、"新建文章"、"在某模块下添加一篇关于X的文章"、"帮我起草一篇讲XX的内容"、"整理面经"时触发。适用于所有模块下新建内容,包括面试维度拆解文章和面经实录。即使用户没有明确说"文章",只要涉及给 zero2Agent 项目增加教学内容,也应当触发此技能。

    690 GitHub stars~693 tokensUpdated yesterday
    Auto-check passed
  • New Module

    ranxi2001/zero2Agent

    在 zero2Agent 项目中创建新的学习模块。当用户说"新建模块"、"添加模块"、"创建一个新的学习章节"、"我想增加一个关于X的模块"时触发。负责创建模块目录结构、index.md,并同步更新主页 index.html 和 layouts/default.html 的导航。即使用户只是说"我想增加一个讲XX的章节",也应当触发此技能。

    690 GitHub stars~489 tokensUpdated yesterday
    Auto-check passed
  • Scrape Nowcoder

    ranxi2001/zero2Agent

    基于 CDP 原生 WebSocket 抓取牛客网面经文章。当用户说"抓牛客"、"爬牛客面经"、"nowcoder 抓取"、"抓取面经列表"时触发。通过 Chrome 调试端口直接连接已登录的浏览器会话,支持首页、话题、搜索分页和详情全文抓取,输出 Markdown。

    690 GitHub stars~1.7k tokensUpdated yesterday
    Auto-check passed
  • Content Review

    ranxi2001/zero2Agent

    审查 zero2Agent 项目中的文章内容质量。当用户说"审查文章"、"review内容"、"检查这篇文章写得怎么样"、"看看这篇符不符合项目风格"、"帮我看看内容质量"时触发。负责对照项目风格标准进行结构化评审,输出具体的改进建议。即使用户只是说"帮我看看写得怎么样",只要涉及 zero2Agent 的 Markdown 文章,也应当触发此技能。

    690 GitHub stars~385 tokensUpdated yesterday
    Auto-check passed

Works with

Categories

Questions about Drawio Skill

What does Drawio Skill do?

A skill your agent uses when user requests diagrams, flowcharts, architecture charts, or visualizations. Drawio Skill is an agent skill from ranxi2001/zero2Agent. Use when user requests diagrams, flowcharts, architecture charts, or visualizations.

When should I use Drawio Skill?

Drawio Skill fits situations like: user requests diagrams; architecture charts.

How do I install Drawio Skill in Claude Code?

Run `npx skills add ranxi2001/zero2Agent --skill drawio-skill -a claude-code`. Or copy the skill folder (.agents/skills/drawio-skill in ranxi2001/zero2Agent) into .claude/skills/drawio-skill in your project. Claude Code loads it when a task matches its description.

How do I install Drawio Skill in Codex?

Run `npx skills add ranxi2001/zero2Agent --skill drawio-skill -a codex`. Or copy the skill folder (.agents/skills/drawio-skill in ranxi2001/zero2Agent) into .agents/skills/drawio-skill in your project. Codex loads it when a task matches its description.

Can I use Drawio Skill in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ranxi2001/zero2Agent --skill drawio-skill -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/drawio-skill, .gemini/skills/drawio-skill, .github/skills/drawio-skill and .opencode/skills/drawio-skill in your project.

What does Drawio Skill need to run?

Going by SKILL.md and its folder, Drawio Skill needs the command-line tools its instructions call (brew and python3). Compatibility (from SKILL.md): Requires draw.io desktop app CLI on PATH (macOS/Linux/Windows). Self-check step requires a vision-enabled model (e.g., Claude Sonnet/Opus); gracefully skipped if unavailable..

Does Drawio Skill access the network?

SKILL.md names 2 domains. In commands or code: github.com and viewer.diagrams.net; the agent is likely to contact these when it follows the instructions. This is read from the text; nothing was executed.

Is Drawio Skill safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Drawio Skill use?

Drawio Skill is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Drawio Skill use?

About 6.6k tokens (SKILL.md is roughly 27k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Drawio Skill?

Skills that share tags, products or a category with Drawio Skill: Diagram Design (cathrynlavery/diagram-design, 45k stars), Draw.io Diagram Studio (Agents365-ai/drawio-skill, 10k stars), Draw.io Diagram Reconstruction (HKUSTDial/Supervisor-Skills, 8.5k stars) and Scibox Diagram (jihe520/sci-box, 248 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Drawio Skill?

ranxi2001 (a GitHub user) maintains it in ranxi2001/zero2Agent, which has 690 GitHub stars. The repository holds 8 skills in this directory. The repository was last updated on October 7, 2026.

Source: ranxi2001/zero2Agent on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.