Guide · Open source
How to use drawio-skill: install, generate and sync diagrams
Updated · written with AI from the project's own documentation and checked against our catalogue data
drawio-skill is an open-source Agent Skill (MIT licence, written in Python) that turns a plain-language description or real system sources into editable .drawio architecture diagrams. This guide covers what you need installed, how to install the skill, how to make your first diagram, and when to pick a different tool. By the end you will be able to generate a diagram, export it, and re-sync it when the source changes.
Quick start
- 1Check prerequisites. Confirm you have an agent that supports Agent Skills, Python, and the draw.io desktop CLI at version 30 or later if possible.
- 2Install the draw.io CLI. On macOS run brew install --cask drawio, then verify with drawio --version.
- 3Install the skill. Run npx skills add Agents365-ai/drawio-skill -g to install into any compatible agent.
- 4Describe or point to a source. Ask the agent for a diagram in plain language, or provide a Terraform, Kubernetes, SQL or OpenAPI file.
- 5Review the output. Open the generated .drawio file and fix any remaining layout issues by hand.
- 6Re-sync when sources change. Run diagramctl sync so updated nodes follow the source while your manual layout stays in place.
What you need before you start
drawio-skill runs inside an AI agent. It needs an agent that supports the Agent Skills format, such as Claude Code or Cursor, and it needs the draw.io desktop CLI. The README treats the CLI as a core requirement, so plan to install it rather than trying to skip it.
Python is also listed as a prerequisite.
- An agent that supports Agent Skills, such as Claude Code or Cursor
- The draw.io desktop CLI, version 30 or later recommended
- Python
Install the draw.io desktop CLI
On macOS the README gives a single Homebrew command. Windows users download the installer from the jgraph drawio-desktop releases page. On Linux you install the .deb or .rpm package from the same releases page, and the README suggests installing xvfb for headless use.
Check the install with drawio --version. Version 30 or later is recommended because it unlocks Mermaid to .drawio conversion and the ELK --layout pass, which are unavailable on version 29 and older. On WSL2 the CLI is the Windows desktop exe reached through /mnt/c, and the skill detects this automatically.
brew install --cask drawio
drawio --versionInstall the skill into your agent
The simplest route is the skills CLI, which the README says works with any agent. Run it once, using the -g flag as shown.
If you prefer a manual install, clone the repository to a persistent path and link the skill subdirectory into your agent's skills folder. The skill lives in skills/drawio-skill/, so SKILL.md must sit directly under the host entry. Do not clone the repository root into a skills directory. Use cp -R instead of ln -s on hosts that do not follow symlinks.
- Updates via the skills CLI: npx skills update drawio-skill -g
- Linked installs update with git pull in your clone
- Copied installs need a manual refresh
npx skills add Agents365-ai/drawio-skill -gMake your first diagram from a description
After installation, describe the system you want in plain language. The README's example asks for a Transformer encoder-decoder, with layer counts, tensor shapes and colour coding. The more specific the description, the closer the first result tends to be.
The skill plans the layout, generates the .drawio XML, exports the diagram, then checks its own PNG for overlaps, clipped labels and stacked edges. The README says it auto-fixes these for up to 2 rounds and accepts up to 5 rounds of your feedback. Expect to make some manual tweaks at the end.
- Name the components and how they connect
- State the diagram type you want, such as architecture or sequence
- Ask for the export format you need: HTML, PowerPoint or Mermaid
Generate diagrams from real sources
Instead of describing a system, you can point the skill at source files. The README lists Terraform, Kubernetes and docker-compose configs, which become diagrams with official AWS, Azure, GCP and Kubernetes icons. It also lists SQL DDL (turned into an ER diagram), OpenAPI or Swagger, AsyncAPI, Protocol Buffers, GraphQL SDL and GitHub Actions or GitLab CI pipelines.
For live infrastructure, the README mentions snapshots from terraform show -json, docker inspect and kubectl get -o json.
- Terraform, Kubernetes and docker-compose files
- SQL DDL to ER diagram
- OpenAPI/Swagger, AsyncAPI, Protocol Buffers, GraphQL SDL
- GitHub Actions and GitLab CI pipelines
terraform show -json
docker inspect
kubectl get -o jsonKeep diagrams in sync and check architecture rules
When the source changes, diagramctl sync updates changed nodes and relations while keeping tuned coordinates, styles and annotations. The README says removals stay reviewable by default, so check them before accepting.
For teams that keep diagrams in version control, the README describes Diagram-as-Test: YAML or JSON architecture rules, such as Internet-to-database access, cycles, orphans and trust boundaries, enforced by an official GitHub Action on each pull request. Drift diffs compare two diagrams or two live snapshots.
- Sync keeps manual layout
- Removals are reviewable by default
- CI rules cover access paths, cycles, orphans and trust boundaries
diagramctl sync
diagramctl testWhat people use it for
- Generate an architecture diagram from existing Terraform or Kubernetes files
- Turn an OpenAPI or GraphQL schema into a visual reference for your API
- Convert a whiteboard photo or legacy PNG into an editable .drawio file
- Check architecture rules, such as internet-to-database access, on every pull request
Frequently asked questions
Is drawio-skill free?
drawio-skill is released under the MIT licence, according to the README. The draw.io desktop CLI is a separate install that the README requires. Check the licence of each tool before you use it commercially.
What do I need to install drawio-skill?
You need an agent that supports Agent Skills, such as Claude Code or Cursor, plus Python and the draw.io desktop CLI. The README recommends draw.io version 30 or later.
How do I install drawio-skill in Claude Code?
Run npx skills add Agents365-ai/drawio-skill -g. The README says this command works with any agent, including Claude Code and Cursor. For a manual install, link the skill subdirectory into your agent's skills folder.
Does drawio-skill work without the draw.io CLI?
The README treats the draw.io desktop CLI as a core requirement. If you do not want to install it, this skill is not a good fit. Consider a GUI editor or a text-based tool instead.
Are the generated diagrams perfect?
No. The README describes automated layout with self-checks, not perfect results. Plan to make manual touch-ups in draw.io after generation.
How does drawio-skill compare to Mermaid, PlantUML, Structurizr or Graphviz?
Those projects are the comparable tools named in our analysis. drawio-skill differs in that it outputs editable draw.io files and can generate them from infrastructure and schema sources. Mermaid is also supported as an input format and export target.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
drawio-skill suits developers and teams who already work in an AI coding agent and want diagrams generated from Terraform, Kubernetes, SQL or API files, kept current in version control. It is a poor choice if you do not want to install the draw.io CLI or only need a standalone diagram editor. Expect to touch up layouts by hand.
Install options & downloads