Agent skill

Draw.io Diagram Studio

by Agents365-ai in 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.

MITAuto-check: notesDevelopment

Install Draw.io Diagram Studio

skills CLI
$ npx skills add Agents365-ai/drawio-skill --skill drawio-skill -a claude-code

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

GitHub CLI
$ gh skill install Agents365-ai/drawio-skill 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/Agents365-ai/drawio-skill.git skills-src && mkdir -p .claude/skills && cp -r skills-src/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
10k
Token cost
~2.4k tokens
SKILL.md length
838 words
Files
82 (incl. scripts, references)
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

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

  • Works in 7 steps: Infer the diagram type, audience, scope,… → Select the authoring route from the… → Resolve an explicitly named style… → …
  • Creating an editable draw.io architecture, UML, ERD, BPMN or network diagram
  • SKILL.md covers Choose the workflow, Unified CLI, Creation workflow and Export invariants, plus 2 more sections
  • Calls python3

What it does

The skill produces editable .drawio files instead of flattened pictures. Its main entry point, scripts/diagramctl.py, unifies generation, incremental sync, multi-view projection, semantic queries, tests and reviews, failure analysis and accessible publishing over a shared diagram representation. A routing table picks the workflow: natural-language diagrams are authored as XML, ordinary flowcharts and mind maps can be converted from Mermaid, large graphs go through an autolayout script, and code, Terraform, Kubernetes, compose files, SQL, OpenAPI, AsyncAPI, Protocol Buffers and GraphQL schemas go through a build command.

Other routes cover live infrastructure state, updating a generated diagram without losing manual layout, executive, deployment, data-flow and security views, architecture policy checks, MCP registration for hosts such as Claude Desktop, Cursor and VS Code, CI gates in GitHub Actions, before-and-after images for PR comments, exports to HTML, PowerPoint, Mermaid and Markdown, and metro-style maps for pipelines. It prefers Mermaid or PlantUML when diagrams-as-code is enough.

When your agent uses it

  • Creating an editable draw.io architecture, UML, ERD, BPMN or network diagram
  • Generating a diagram from Terraform, Kubernetes, SQL or OpenAPI sources
  • Updating a generated diagram without losing manual layout
  • Enforcing architecture rules or diagram diffs in CI

Example prompts

  • “Draw an architecture diagram of our services from the Terraform files in infra/ as an editable .drawio file.”
  • “Create an ERD from schema.sql in draw.io.”
  • “Update architecture.drawio from the latest code without moving the shapes I arranged by hand.”

Requirements

  • draw.io or diagrams.net, to open and edit the files
  • Python, to run the bundled scripts
  • Pre-approved tools (allowed-tools): Bash, Read, Write, WebFetch

Workflow steps

7 steps, taken from the first numbered list in SKILL.md.

  1. Infer the diagram type, audience, scope, output format, and location from the
  2. Select the authoring route from the table above. For a data-backed diagram,
  3. Resolve an explicitly named style preset, or the user's default preset, as
  4. Generate the .drawio, then run structural validation
  5. Export a draft PNG without embedded XML and inspect it visually. Fix obvious
  6. Show the draft and apply targeted edits. Preserve existing geometry for
  7. After approval, create final requested formats and report both editable

What it can do on your machine

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

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash
    • Read
    • Write
    • WebFetch

    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:

    • 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

Draw.io Diagram Studio loads about 2.4k tokens when it runs, and up to ~40k if it reads all its reference files. Until then it costs about 111 tokens; SKILL.md has 838 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~111
When it runs · the whole SKILL.md, loaded when a task matches
~2.4k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~40k

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

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Bash, Read, Write, WebFetch

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 Agents365-ai/drawio-skill at commit 88fd923, republished under its MIT licence (© Agents365-ai). 838 words, ~2,426 tokens.

Download SKILL.mdSave it as .claude/skills/drawio-skill/SKILL.md (or your agent's skills folder). This skill also uses 81 other files; get the full folder from GitHub.
name
drawio-skill
description
Create and edit draw.io/diagrams.net diagrams as editable `.drawio` files. Covers architecture, UML/ERD/sequence, BPMN, network, and swimlane views authored from a description or converted from code, IaC, SQL, and API schemas, plus sync, query, test, review, export, and publish of existing diagrams. Use when the user asks for draw.io/diagrams.net or an editable diagram; prefer Mermaid/PlantUML when diagrams-as-code is enough.
allowed-tools
Bash, Read, Write, WebFetch
disable-model-invocation
true
license
MIT
metadata.author
Agents365-ai
metadata.version
3.4.0
metadata.homepage
https://github.com/Agents365-ai/drawio-skill
metadata.compatibility
Core IR, XML, sync, query, test, review, and Story workflows need Python 3 only; native export needs draw.io; Graphviz is optional.
metadata.platforms
macos, linux, windows

Draw.io Architecture Studio

Produce editable .drawio artifacts, not flattened pictures. The preferred entrypoint is scripts/diagramctl.py, which unifies generation, incremental sync, multi-view projection, semantic queries/tests/reviews, failure analysis, and accessible publishing over a shared Diagram IR.

Choose the workflow

RequestRoute
Natural-language diagram with precise stylingRead references/diagram-types.md, then references/xml-authoring.md and author XML
Standard flowchart/mindmap/gantt/timeline/etc. with no special stylingIf draw.io >=30, read references/mermaid-authoring.md and convert Mermaid to native .drawio
Large graph (~15+ nodes) that needs automatic layoutUse autolayout.py; read references/autolayout.md before passing any --layout value
Code, Terraform, K8s, compose, SQL, OpenAPI, AsyncAPI, or CI sourceUse diagramctl.py build; read references/diagram-ir.md
Protocol Buffers schema (.proto)Use protoimports.py or diagramctl.py build; read references/toolbox.md
GraphQL SDL schema (.graphql/.gql) or introspection JSONUse graphqlerd.py or diagramctl.py build; read references/toolbox.md
Running cluster/stack/cloud (actual state, not declared config)Read references/live-infra.md, then use tfstate.py, dockerimports.py, or k8simports.py -
Update a generated diagram without losing manual layoutUse diagramctl.py sync; read references/diagram-ir.md
Executive/system/deployment/data-flow/security viewsUse diagramctl.py views; read references/diagram-ir.md
Query, architecture policy, review, what-if, or guided walkthroughRead references/semantic-workflows.md
MCP host (Claude Desktop, Cursor, VS Code, Codex) should call these workflowsRegister scripts/diagramctl_mcp.py; read references/mcp.md
Prompt phrasing for a diagram type or semantic workflowRead references/cookbook.md
Enforce architecture rules or visual diffs in GitHub Actions CIRead references/ci-gate.md
Rendered before/after/diff images as a PR review commentUse prdiff.py; read references/pr-bot.md
Existing .drawio to HTML/PPTX/Mermaid/Markdown/animation/runbookRead references/toolbox.md; diagramctl.py transform exposes the existing tools
Pipeline, journey, or subsystem map drawn as a metro/subway mapUse tubemap.py; read references/tubemap.md
Shape, cloud/vendor, AI, or Databricks iconRead references/shapes.md or references/databricks.md; never guess shape names
Learn/apply/manage a visual styleRead references/style-presets.md
Extract a reusable style from an existing diagram or themeRead references/style-extraction.md
Existing image to editable diagram (screenshot, whiteboard photo, legacy PNG)Read references/derasterize.md
Export/platform problemRead references/troubleshooting.md; for access/network questions read references/security.md

Unified CLI

Run from this skill directory, or replace scripts/ with the absolute path to this skill's scripts directory:

bash
python3 scripts/diagramctl.py doctor
python3 scripts/diagramctl.py build model.json --from ir -o architecture.drawio
python3 scripts/diagramctl.py build ./infra --from terraform --group \
  --ir-output architecture.ir.json -o architecture.drawio
python3 scripts/diagramctl.py sync architecture.drawio ./infra --from terraform \
  -o architecture.next.drawio
python3 scripts/diagramctl.py views architecture.ir.json \
  --views executive,system,deployment,dataflow,security -o views.drawio
python3 scripts/diagramctl.py test architecture.drawio --rules policy.yml
python3 scripts/diagramctl.py review architecture.drawio -o review.md
python3 scripts/diagramctl.py query architecture.drawio --from internet --to orders-db
python3 scripts/diagramctl.py whatif architecture.ir.json --fail kafka \
  --drawio kafka-failure.drawio -o impact.json
python3 scripts/diagramctl.py story architecture.ir.json -o walkthrough.html

doctor does not launch GUI tools unless --probe is passed. Core semantic commands are offline and stdlib-only.

Creation workflow

  1. Infer the diagram type, audience, scope, output format, and location from the request. Ask only when a missing choice materially changes the result; default to PNG plus .drawio in the working directory.

  2. Select the authoring route from the table above. For a data-backed diagram, prefer Diagram IR and preserve provenance. For a large graph, use an importer or autolayout.py; do not hand-place more than roughly fifteen nodes.

  3. Resolve an explicitly named style preset, or the user's default preset, as documented in references/style-presets.md. Structural diagram conventions and visual presets compose; they do not replace each other.

  4. Generate the .drawio, then run structural validation:

    bash
    python3 scripts/validate.py diagram.drawio --score

    When semantic metadata or an architecture policy is in scope, also run diagramctl.py test. Do not present inferred semantic findings as verified runtime facts.

  5. Export a draft PNG without embedded XML and inspect it visually. Fix obvious overlap, clipping, disconnected edges, edge-through-node routing, stacked edges, and unreadable labels. Stop automatic vision repair after two rounds. When the drawio binary is unavailable or a visual check is inconclusive, verify the renderer's own DOM instead (--dump-dom on the viewer URL, see references/troubleshooting.md): read each edge's <path> segments and label anchor coordinates directly — vision alone both misses geometry defects and hallucinates new ones.

  6. Show the draft and apply targeted edits. Preserve existing geometry for local changes. Use sync for source-backed changes and write a reviewable output; use --prune only when deletion was requested.

  7. After approval, create final requested formats and report both editable source and export paths.

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

Export invariants

Resolve the available binary once (drawio, draw.io, the macOS app path, or the Windows executable) and use that exact binary for the run.

bash
# Draft for visual inspection: never use -e here
drawio -x -f png --width 2000 -o diagram.png diagram.drawio

# Final editable PNG
drawio -x -f png -e -s 2 -o diagram.drawio.png diagram.drawio
python3 scripts/repair_png.py diagram.drawio.png

# Final editable SVG/PDF
drawio -x -f svg -e --embed-svg-images -o diagram.svg diagram.drawio
drawio -x -f pdf -e -o diagram.pdf diagram.drawio

Do not combine --width and -s. Embedded PNG exports require repair_png.py; draft PNGs used by vision must not use -e. On Linux headless, follow references/troubleshooting.md rather than improvising Electron flags. If the CLI crashes in a macOS sandbox, try one permitted escalated run, then use encode_drawio_url.py or deliver XML; do not repeatedly launch it.

Editing and identity

  • Use stable semantic IDs and never reuse reserved IDs 0 or 1.
  • Every edge requires <mxGeometry relative="1" as="geometry"/>.
  • For a local edit, change the matching cell only; for a global direction change, regenerate/re-layout the page.
  • Keep provenance, data-model-id, semantic properties, manual geometry, and manual styles intact unless the user requests otherwise.
  • When reconciling, retain removals as reviewable faded elements by default.
  • For edges stacked at a boundary, run edgeports.py; add waypoints when an edge still crosses an unrelated shape. There is no CLI-only edge rerouter that preserves node positions.

Quality and trust

An attractive diagram can still be wrong. Prefer source-backed relationships, show provenance where useful, distinguish exact extraction from AI inference, and keep architecture review findings framed as prompts. Story HTML must remain self-contained, keyboard usable, and include a text alternative. Never include secrets in node properties or provenance because they are embedded in outputs.

For all focused scripts and composition patterns, read references/toolbox.md; load only the task-specific reference needed for the current request.

© Agents365-ai, 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 81 other files (scripts, references) in skills/drawio-skill of Agents365-ai/drawio-skill.

  • SKILL.md
  • LICENSE
  • agents/openai.yaml
  • data/SHAPE-INDEX-NOTICE.md
  • data/databricks-icons.json
  • data/diagram-ir.schema.json
  • data/lobe-icons.json
  • data/shape-index.json.gz
  • references/autolayout.md
  • references/ci-gate.md
  • references/cookbook.md
  • references/databricks.md
  • references/derasterize.md
  • references/diagram-ir.md
  • references/diagram-types.md
  • references/live-infra.md
  • references/mcp.md
  • references/mermaid-authoring.md
  • … and 64 more

Open the folder on GitHubat commit 88fd923

Compare with similar skills

Draw.io Diagram Studio 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.

Draw.io Diagram Studio compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Draw.io Diagram Studio this skillAgents365-ai/drawio-skill10k—~2.4kAutomated safety check: NotesMIT
Drawio Skillyuanchen-home/cumcm-step-review319—~11kAutomated safety check: PassMIT
Diagram Designcathrynlavery/diagram-design48k1 repos~7.6kAutomated safety check: PassMIT
Generating Documentationancoleman/ai-design-components525—~3kAutomated safety check: PassMIT
Engineer Design Diagramjeremylongshore/tons-of-skills-marketplace2.8k—~4.5kAutomated safety check: PassMIT
Documd Visualsmarkdown-viewer/skills3.4k—~3.3kAutomated safety check: PassCC-BY-4.0

Similar skills

  • Drawio Skill

    yuanchen-home/cumcm-step-review

    A skill your agent uses when the user requests diagrams, flowcharts, architecture diagrams, ER diagrams, UML / sequence / class diagrams, SysML / MBSE diagrams (block definition, internal block…

    319 GitHub stars~11k tokensUpdated 1 mo 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.

    48k GitHub starsUsed in 1 repo~7.6k tokens
    DevelopmentAuto-check passed
  • Generating Documentation

    ancoleman/ai-design-components

    Generate comprehensive technical documentation including API docs (OpenAPI/Swagger), code documentation (TypeDoc/Sphinx), documentation sites (Docusaurus/MkDocs), Architecture Decision Records…

    525 GitHub stars~3k tokensUpdated 10 mo ago
    DevelopmentAuto-check passed
  • Engineer Design Diagram

    jeremylongshore/tons-of-skills-marketplace

    Generate production-grade engineering design diagrams (architecture, sequence, delta, drift) as self-contained dark-themed HTML files with accessible inline SVG.

    2.8k GitHub stars~4.5k tokensUpdated today
    DevelopmentAuto-check passed
  • Documd Visuals

    markdown-viewer/skills

    Create text-driven visuals in Markdown: charts, diagrams, cards, architecture and page layouts.

    3.4k GitHub stars~3.3k tokensUpdated 5 days ago
    Data & AnalyticsAuto-check passed
  • Vibex

    Raja0sama/vibex

    Diagrams and checkable docs from a codebase. An agent skill from Raja0sama/vibex.

    388 GitHub stars~7.8k tokensUpdated 4 days ago
    Backend & APIsAuto-check passed

Questions about Draw.io Diagram Studio

What does Draw.io Diagram Studio do?

Creates and edits editable draw.io diagrams from descriptions, code, infrastructure files, SQL and API schemas, with sync, review, test and export tools. drawio files instead of flattened pictures.py, unifies generation, incremental sync, multi-view projection, semantic queries, tests and reviews, failure analysis and accessible publishing over a shared diagram representation.

When should I use Draw.io Diagram Studio?

Draw.io Diagram Studio fits situations like: creating an editable draw.io architecture, UML, ERD, BPMN or network diagram; generating a diagram from Terraform, Kubernetes, SQL or OpenAPI sources; updating a generated diagram without losing manual layout; enforcing architecture rules or diagram diffs in CI.

How do I install Draw.io Diagram Studio in Claude Code?

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

How do I install Draw.io Diagram Studio in Codex?

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

Can I use Draw.io Diagram Studio 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 Agents365-ai/drawio-skill --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 Draw.io Diagram Studio need to run?

Going by SKILL.md and its folder, Draw.io Diagram Studio needs the command-line tools its instructions call (python3). Our summary lists: draw.io or diagrams.net, to open and edit the files; Python, to run the bundled scripts. Its frontmatter pre-approves these tools: Bash, Read, Write, WebFetch.

Does Draw.io Diagram Studio 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 Draw.io Diagram Studio safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. 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 Draw.io Diagram Studio use?

Draw.io Diagram Studio 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 Draw.io Diagram Studio use?

About 2.4k tokens (SKILL.md is roughly 9.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 37k tokens, read only when the agent opens those files.

What are the alternatives to Draw.io Diagram Studio?

Skills that share tags, products or a category with Draw.io Diagram Studio: Drawio Skill (yuanchen-home/cumcm-step-review, 319 stars), Diagram Design (cathrynlavery/diagram-design, 48k stars), Generating Documentation (ancoleman/ai-design-components, 525 stars) and Engineer Design Diagram (jeremylongshore/tons-of-skills-marketplace, 2.8k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Draw.io Diagram Studio?

Agents365-ai (a GitHub user) maintains it in Agents365-ai/drawio-skill, which has 10,042 GitHub stars. The repository was last updated on October 2, 2026.

Source: Agents365-ai/drawio-skill on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.