Agent skill

Drawio Diagram

by automateyournetwork in automateyournetwork/netclaw

Generate draw.io network diagrams — native .drawio files with CLI export (PNG/SVG/PDF), plus browser-based Mermaid/XML/CSV via MCP server.

Apache-2.0Auto-check passedDevelopment

Install Drawio Diagram

skills CLI
$ npx skills add automateyournetwork/netclaw --skill drawio-diagram -a claude-code

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

GitHub CLI
$ gh skill install automateyournetwork/netclaw drawio-diagram --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/automateyournetwork/netclaw.git skills-src && mkdir -p .claude/skills && cp -r skills-src/workspace/skills/drawio-diagram .claude/skills/drawio-diagram && 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-diagram
GitHub stars
676
Token cost
~2.5k tokens
SKILL.md length
912 words
Files
1
Skills in repo
120
Repo updated
First seen
Licence
Apache-2.0

At a glance

Generate draw.io network diagrams — native .drawio files with CLI export (PNG/SVG/PDF), plus browser-based Mermaid/XML/CSV via MCP server.

  • Works in 3 steps: Physical Topology Diagram → Logical Topology Diagram → Security Zones Diagram
  • Creating network topology diagrams
  • SKILL.md covers Mode 1: Native File Generation…, Mode 2: Browser Editor via MCP…, XML Format Reference and Diagram Types for Network…, plus 3 more sections
  • Calls python3

What it does

Drawio Diagram is an agent skill from automateyournetwork/netclaw. Generate draw.io network diagrams — native .drawio files with CLI export (PNG/SVG/PDF), plus browser-based Mermaid/XML/CSV via MCP server. Use when creating network topology diagrams, generating architecture visuals, exporting diagrams to PNG or PDF, or building draw.io files from discovery data.

Its SKILL.md is about 2.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Diagrams. It works with draw.io, Model Context Protocol and Mermaid. The repository describes itself as: An AI agent that claws through your network. The licence is Apache-2.0.

When your agent uses it

  • Creating network topology diagrams
  • Generating architecture visuals
  • Exporting diagrams to PNG
  • Building draw.io files from discovery data

Example prompts

  • “/drawio-diagram”

Requirements

  • Python 3
  • Node.js

Workflow steps

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

  1. Physical Topology Diagram
  2. Logical Topology Diagram
  3. Security Zones Diagram

What it can do on your machine

Read from SKILL.md and the folder at commit aa90e7d. 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

    Shell commands in SKILL.md call:

    • python3

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

  • Network

    No URLs in SKILL.md.

    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.

Context cost

Drawio Diagram loads about 2.5k tokens when it runs. Until then it costs about 78 tokens; SKILL.md has 912 words of instructions outside code blocks.

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

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); files beside SKILL.md are not scanned.

SKILL.md

The full file from automateyournetwork/netclaw at commit aa90e7d, republished under its Apache-2.0 licence (© automateyournetwork). 912 words, ~2,483 tokens.

Download SKILL.mdSave it as .claude/skills/drawio-diagram/SKILL.md (or your agent's skills folder).
name
drawio-diagram
description
Generate draw.io network diagrams — native .drawio files with CLI export (PNG/SVG/PDF), plus browser-based Mermaid/XML/CSV via MCP server. Use when creating network topology diagrams, generating architecture visuals, exporting diagrams to PNG or PDF, or building draw.io files from discovery data.
license
Apache-2.0
user-invocable
true

Draw.io Network Diagrams

Generate network diagrams using two approaches:

  1. Native File Mode — Generate .drawio XML files on disk with optional PNG/SVG/PDF export via the draw.io desktop CLI (official jgraph skill-cli)
  2. Browser Mode — Open diagrams in the Draw.io browser editor via the @drawio/mcp MCP server (Mermaid, XML, or CSV input)

Mode 1: Native File Generation (Official Skill-CLI)

Generate native .drawio files directly. Optionally export to PNG, SVG, or PDF with the diagram XML embedded (so the exported file remains editable in draw.io).

How to Create a Diagram
  1. Generate draw.io XML in mxGraphModel format for the requested diagram
  2. Write the XML to a .drawio file in the current working directory using the Write tool
  3. If the user requested an export format (png, svg, pdf), export using the draw.io CLI with --embed-diagram, then delete the source .drawio file
  4. Open the result — the exported file if exported, or the .drawio file otherwise
Choosing the Output Format

Check the user's request for a format preference:

  • /drawio create a flowchart → flowchart.drawio
  • /drawio png flowchart for login → login-flow.drawio.png
  • /drawio svg: ER diagram → er-diagram.drawio.svg
  • /drawio pdf architecture overview → architecture-overview.drawio.pdf

If no format is mentioned, write the .drawio file and open it. The user can ask to export later.

Supported Export Formats
FormatEmbed XMLNotes
pngYes (-e)Viewable everywhere, editable in draw.io
svgYes (-e)Scalable, editable in draw.io
pdfYes (-e)Printable, editable in draw.io
jpgNoLossy, no embedded XML support

PNG, SVG, and PDF all support --embed-diagram — the exported file contains the full diagram XML, so opening it in draw.io recovers the editable diagram.

draw.io CLI

The draw.io desktop app includes a command-line interface for exporting.

Locating the CLI

Try drawio first (works if on PATH), then fall back to the platform-specific path:

  • macOS: /Applications/draw.io.app/Contents/MacOS/draw.io
  • Linux: drawio (typically on PATH via snap/apt/flatpak)
  • Windows: "C:\Program Files\draw.io\draw.io.exe"

Use which drawio (or where drawio on Windows) to check if it's on PATH before falling back.

Export Command
bash
drawio -x -f <format> -e -b 10 -o <output> <input.drawio>

Key flags:

  • -x / --export: export mode
  • -f / --format: output format (png, svg, pdf, jpg)
  • -e / --embed-diagram: embed diagram XML in the output (PNG, SVG, PDF only)
  • -o / --output: output file path
  • -b / --border: border width around diagram (default: 0)
  • -t / --transparent: transparent background (PNG only)
  • -s / --scale: scale the diagram size
  • --width / --height: fit into specified dimensions (preserves aspect ratio)
  • -a / --all-pages: export all pages (PDF only)
  • -p / --page-index: select a specific page (1-based)
Opening the Result
  • macOS: open <file>
  • Linux: xdg-open <file>
  • Windows: start <file>
File Naming
  • Use a descriptive filename based on the diagram content (e.g., login-flow, database-schema)
  • Use lowercase with hyphens for multi-word names
  • For export, use double extensions: name.drawio.png, name.drawio.svg, name.drawio.pdf — this signals the file contains embedded diagram XML
  • After a successful export, delete the intermediate .drawio file — the exported file contains the full diagram

Mode 2: Browser Editor via MCP Server

Open diagrams directly in the Draw.io browser editor using the @drawio/mcp MCP server. Supports three input formats.

Mermaid Diagrams (best for quick topology graphs)
bash
python3 $MCP_CALL "npx -y @drawio/mcp" open_drawio_mermaid '{"content":"graph TD\n  A --> B"}'
XML Diagrams (best for detailed, styled diagrams with precise positioning)
bash
python3 $MCP_CALL "npx -y @drawio/mcp" open_drawio_xml '{"content":"<mxGraphModel>...</mxGraphModel>"}'
CSV Diagrams (best for device inventories)
bash
python3 $MCP_CALL "npx -y @drawio/mcp" open_drawio_csv '{"content":"## label: %name%\nname,refs\nA,B\nB,C"}'

All three tools accept optional "lightbox": true for read-only view and "dark": "auto"|"true"|"false" for dark mode.

The tool returns a Draw.io URL. Share it directly — the diagram opens in the browser editor where it can be edited, exported, or saved.


Show full SKILL.md (360 more words)Show less

XML Format Reference

A .drawio file is native mxGraphModel XML. Always generate XML directly — Mermaid and CSV formats require server-side conversion and cannot be saved as native files.

Basic Structure

Every diagram must have this structure:

xml
<mxGraphModel>
  <root>
    <mxCell id="0"/>
    <mxCell id="1" parent="0"/>
    <!-- Diagram cells go here with parent="1" -->
  </root>
</mxGraphModel>
  • Cell id="0" is the root layer
  • Cell id="1" is the default parent layer
  • All diagram elements use parent="1" unless using multiple layers
Common Styles

Rounded rectangle:

xml
<mxCell id="2" value="Label" style="rounded=1;whiteSpace=wrap;" vertex="1" parent="1">
  <mxGeometry x="100" y="100" width="120" height="60" as="geometry"/>
</mxCell>

Diamond (decision):

xml
<mxCell id="3" value="Condition?" style="rhombus;whiteSpace=wrap;" vertex="1" parent="1">
  <mxGeometry x="100" y="200" width="120" height="80" as="geometry"/>
</mxCell>

Arrow (edge):

xml
<mxCell id="4" value="" style="edgeStyle=orthogonalEdgeStyle;" edge="1" source="2" target="3" parent="1">
  <mxGeometry relative="1" as="geometry"/>
</mxCell>

Labeled arrow:

xml
<mxCell id="5" value="Yes" style="edgeStyle=orthogonalEdgeStyle;" edge="1" source="3" target="6" parent="1">
  <mxGeometry relative="1" as="geometry"/>
</mxCell>
Useful Style Properties
PropertyValuesUse for
rounded=10 or 1Rounded corners
whiteSpace=wrapwrapText wrapping
fillColor=#dae8fcHex colorBackground color
strokeColor=#6c8ebfHex colorBorder color
fontColor=#333333Hex colorText color
shape=cylinder3shape nameDatabase cylinders
shape=mxgraph.flowchart.documentshape nameDocument shapes
ellipsestyle keywordCircles/ovals
rhombusstyle keywordDiamonds
edgeStyle=orthogonalEdgeStylestyle keywordRight-angle connectors
edgeStyle=elbowEdgeStylestyle keywordElbow connectors
dashed=10 or 1Dashed lines
swimlanestyle keywordSwimlane containers

Diagram Types for Network Engineering

1. Physical Topology Diagram

Shows devices, physical links, interface names, IP addresses, and link speeds.

bash
python3 $MCP_CALL "npx -y @drawio/mcp" open_drawio_mermaid '{"content":"graph TD\n  R1[\"R1\\nCore Router\\n10.255.255.1\"]\n  R2[\"R2\\nCore Router\\n10.255.255.2\"]\n  SW1[\"SW1\\nDist Switch\\n10.255.255.3\"]\n  R1 -->|\"Gi0/0 -- Gi0/0\\n10.1.1.0/30\"| R2\n  R1 -->|\"Gi0/1 -- Gi0/1\\n10.1.2.0/30\"| SW1\n  R2 -->|\"Gi0/1 -- Gi0/1\\n10.1.3.0/30\"| SW1"}'
2. Logical Topology Diagram

Shows routing protocol relationships, areas, AS numbers, VRFs.

bash
python3 $MCP_CALL "npx -y @drawio/mcp" open_drawio_mermaid '{"content":"graph TD\n  subgraph \"OSPF Area 0\"\n    R1[\"R1 ABR\"]\n    R2[\"R2 ABR\"]\n  end\n  subgraph \"OSPF Area 1\"\n    R3[\"R3\"]\n  end\n  R1 --- R2\n  R1 --- R3"}'
3. Security Zones Diagram

Shows firewalls, DMZs, trust boundaries, ACL enforcement points.

bash
python3 $MCP_CALL "npx -y @drawio/mcp" open_drawio_mermaid '{"content":"graph LR\n  subgraph \"Untrusted\"\n    INET((Internet))\n  end\n  subgraph \"DMZ\"\n    WEB[\"Web Server\"]\n  end\n  subgraph \"Trusted\"\n    CORE[\"Core Switch\"]\n  end\n  INET --> FW[\"Firewall\"]\n  FW --> WEB\n  FW --> CORE"}'

CRITICAL: XML Well-Formedness

  • NEVER use double hyphens (--) inside XML comments. -- is illegal inside <!-- --> per the XML spec and causes parse errors. Use single hyphens or rephrase.
  • Escape special characters in attribute values: &amp;, &lt;, &gt;, &quot;
  • Always use unique id values for each mxCell

When to Use Each Mode

ScenarioModeWhy
Generate .drawio file for version controlNative FileProduces actual file on disk
Export PNG/SVG/PDF for documentationNative FileCLI export with embedded XML
Quick topology preview from discovery dataBrowserInstant visual in browser
CSV-based inventory diagramBrowserCSV format only available via MCP
Mermaid syntax diagramBrowserMermaid conversion only via MCP
Offline/air-gapped environmentNative FileNo network needed
Sharing a link to the diagramBrowserReturns shareable URL

Integration with Other Skills

  • Use pyats-topology to discover the network, then generate diagrams from the data
  • Use netbox-reconcile to color-code links by reconciliation status (documented/undocumented/missing)
  • Use markmap-viz for hierarchical views alongside Draw.io for topology views
  • Use aci-fabric-audit data to generate ACI fabric topology diagrams
  • Use gait-session-tracking to record diagram generation with source data references

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

Files

Just SKILL.md in workspace/skills/drawio-diagram of automateyournetwork/netclaw.

Open the folder on GitHubat commit aa90e7d

Compare with similar skills

Drawio Diagram 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 Diagram compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Drawio Diagram this skillautomateyournetwork/netclaw676—~2.5kAutomated safety check: PassApache-2.0
Drawiobahayonghang/drawio-skills287—~4.1kAutomated safety check: NotesMIT
Drawio MCP Diagrammingthomast1906/github-copilot-agent-skills202—~6.6kAutomated safety check: PassNone
Diagram Designcathrynlavery/diagram-design49k1 repos~7.6kAutomated safety check: PassMIT
Draw.io Diagram StudioAgents365-ai/drawio-skill10k—~2.4kAutomated safety check: NotesMIT
Excalidraw Skillyctimlin/mcp_excalidraw2.5k—~4.6kAutomated safety check: PassMIT

Similar skills

  • Drawio

    bahayonghang/drawio-skills

    Create, edit, replicate, import, and export draw.io diagrams with an offline YAML-first workflow: architecture, network topologies, flowcharts, UML/ER, org charts, Mermaid/CSV conversion, existing…

    287 GitHub stars~4.1k tokensUpdated 1 mo ago
    DevelopmentAuto-check: notes
  • Drawio MCP Diagramming

    thomast1906/github-copilot-agent-skills

    Create and edit diagrams using the Draw.io MCP server — any shape, any vendor.

    202 GitHub stars~6.6k tokensUpdated 3 days ago
    DevelopmentAuto-check passed
  • 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.

    49k GitHub starsUsed in 1 repo~7.6k 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 today
    DevelopmentAuto-check: notes
  • Excalidraw Skill

    yctimlin/mcp_excalidraw

    Excalidraw canvas toolkit for creating, editing, and refining diagrams on a live canvas.

    2.5k GitHub stars~4.6k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • GitDiagram Repository Overview

    ahmedkhaleel2004/gitdiagram

    Explains the architecture of a public GitHub repository through GitDiagram: how the code is organized, the main components with paths, and a Mermaid diagram.

    18k GitHub stars~427 tokensUpdated yesterday
    DevelopmentAuto-check passed

More from automateyournetwork/netclaw

All 120 skills in this repo
  • EVE-NG Lab Topology Design

    automateyournetwork/netclaw

    Entry point for designing EVE-NG network labs: classifies the request, gathers missing requirements, proposes options and validates the resulting topology.

    677 GitHub stars~612 tokensUpdated today
    Auto-check passed
  • ACI Policy Change Deployment

    automateyournetwork/netclaw

    Deploys Cisco ACI policy changes only behind an approved ServiceNow Change Request, capturing pre and post-change fault baselines and rolling back automatically on a fault delta.

    677 GitHub stars~4.2k tokensUpdated today
    Auto-check passed
  • Cisco ACI Fabric Health Audit

    automateyournetwork/netclaw

    Runs a phased health audit of a Cisco ACI fabric through MCP tools: node status, links, tenant and policy review, faults and endpoint learning.

    677 GitHub stars~2.9k tokensUpdated today
    Auto-check passed
  • Anta Validation

    automateyournetwork/netclaw

    Validate Arista EOS network state against ANTA's pre-built 208-test catalogue, with structured pass/fail verdicts.

    677 GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Arista Cvp

    automateyournetwork/netclaw

    Arista CloudVision Portal (CVP) automation via REST API — device inventory, events, connectivity monitoring, tag management (4 tools).

    677 GitHub stars~2.2k tokensUpdated today
    Auto-check: notes
  • AWS Cloud Monitoring

    automateyournetwork/netclaw

    AWS CloudWatch monitoring — metrics, alarms, log queries, VPC flow log analysis, network performance.

    677 GitHub stars~1k tokensUpdated today
    Auto-check passed

Categories

Questions about Drawio Diagram

What does Drawio Diagram do?

Generate draw.io network diagrams — native .drawio files with CLI export (PNG/SVG/PDF), plus browser-based Mermaid/XML/CSV via MCP server. Drawio Diagram is an agent skill from automateyournetwork/netclaw.drawio files with CLI export (PNG/SVG/PDF), plus browser-based Mermaid/XML/CSV via MCP server.

When should I use Drawio Diagram?

Drawio Diagram fits situations like: creating network topology diagrams; generating architecture visuals; exporting diagrams to PNG; building draw.io files from discovery data.

How do I install Drawio Diagram in Claude Code?

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

How do I install Drawio Diagram in Codex?

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

Can I use Drawio Diagram 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 automateyournetwork/netclaw --skill drawio-diagram -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-diagram, .gemini/skills/drawio-diagram, .github/skills/drawio-diagram and .opencode/skills/drawio-diagram in your project.

What does Drawio Diagram need to run?

Going by SKILL.md and its folder, Drawio Diagram needs the command-line tools its instructions call (python3). Our summary lists: Python 3; Node.js.

Does Drawio Diagram access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Drawio Diagram 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. Review the folder before installing.

What licence does Drawio Diagram use?

Drawio Diagram is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Drawio Diagram use?

About 2.5k tokens (SKILL.md is roughly 9.9k 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 Diagram?

Skills that share tags, products or a category with Drawio Diagram: Drawio (bahayonghang/drawio-skills, 287 stars), Drawio MCP Diagramming (thomast1906/github-copilot-agent-skills, 202 stars), Diagram Design (cathrynlavery/diagram-design, 49k stars) and Draw.io Diagram Studio (Agents365-ai/drawio-skill, 10k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Drawio Diagram?

automateyournetwork (a GitHub user) maintains it in automateyournetwork/netclaw, which has 676 GitHub stars. The repository holds 120 skills in this directory. The repository was last updated on October 9, 2026.

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