Guide · Agent skill
How to use the Draw.io Diagram CLI agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
The cli-anything-drawio skill teaches an AI agent to create, edit and export Draw.io diagrams by running a command-line tool. This guide is for people who have never used agent skills and want to set one up, trigger it with normal requests, and understand what it needs before they start. By the end you will know how to install the skill, what the agent can do with it, and where its limits are.
Quick start
- 1Check prerequisites. Confirm Python 3.10 or newer and the drawio desktop application are installed.
- 2Install the pip package. Run pip install cli-anything-drawio so the command is available.
- 3Add the skill folder. Download the ZIP from this page and unzip it into ~/.claude/skills/ or a project's .claude/skills/ folder, or upload it under Settings → Capabilities → Skills in the Claude apps.
- 4Ask for a diagram. Describe the diagram you want in plain language and name the output file.
- 5Export and verify. Ask the agent to export to PNG, PDF or SVG, then confirm the output file exists.
What an agent skill is and what this one does
An agent skill is a folder containing a SKILL.md file that tells an AI agent how to perform a particular task. This skill, named cli-anything-drawio, covers working with Draw.io diagrams through a command-line tool of the same name.
Once installed, the agent can create a new diagram project, add shapes and connectors, move or restyle them, manage pages, undo or redo changes, and export the result to PNG, PDF or SVG. It can also return output as structured JSON so it can read results reliably.
Check the requirements before installing
The skill needs Python 3.10 or newer, the drawio desktop application installed on your system, and the pip package cli-anything-drawio. The drawio desktop application is a required prerequisite, so the skill will not work without it.
The skill runs scripts. It is listed as not using the network, so the CLI works on local files.
- Python 3.10+
- drawio desktop application installed on the system
- pip package cli-anything-drawio
pip install cli-anything-drawioInstall the skill for Claude
Download the ZIP for this skill from this page and unzip it into your personal skills folder at ~/.claude/skills/. To limit it to one project, unzip it into that project's .claude/skills/ folder instead.
If you use the Claude apps, you can instead upload the skill under Settings → Capabilities → Skills.
Install the pip package separately, since the skill depends on the cli-anything-drawio command being available.
Trigger the skill with natural requests
You do not need special syntax. Describe the diagram you want in plain language, such as an architecture diagram or a flowchart, and mention that you want it made or changed as a Draw.io file. The agent uses the skill when the request matches what it does.
Good requests name the output and the file. For example, ask for a project file to be created, then ask for shapes and connectors to be added, then ask for a PNG or PDF export. Named files make it easier for the agent to find and check its own work.
- Create a new Draw.io project file for a three-tier web architecture and save it to a named file.
- Add a flowchart with a start, two decision steps and an end, then connect them.
- Move the database shape to the right and change its colour.
- Export the finished diagram to PDF and confirm the file exists.
Know the main command groups
The CLI is organised into groups. Project handles new, open, save, info, xml and presets. Shape handles add, remove, list, label, move, resize, style, info and types. Connect handles connectors, including edge styles. Page handles add, remove, rename and list. Export handles render and formats. Session handles status, undo, redo, save-state and list.
Undo and redo keep up to 50 levels of history. Projects are saved and loaded as JSON.
- Output is human-readable by default and machine-readable with the --json flag.
- Interactive REPL mode starts when you run the command with no subcommand, with tab-completion and history.
cli-anything-drawio --json project info -p project.jsonSafety notes and tips
The skill runs scripts on your machine and the source lists no network use, so review the SKILL.md and any scripts before you install it, especially if you share a skills folder. Keep the agent working on files you can afford to lose, and check exported output yourself.
The source gives these rules for agents: always use the --json flag, check return codes (0 means success), parse stderr for errors, use absolute paths, and verify outputs exist after export.
- Use absolute paths for all file operations.
- Check that the export file exists after every render.
- Read the README.md and TEST.md in the package for more detail.
What people use it for
- Generating architecture diagrams from a written description of services and their connections.
- Producing flowcharts from process notes, then exporting them to PDF for documentation.
- Updating an existing diagram by moving, restyling or relabelling shapes.
- Regenerating diagram exports as part of a build or documentation workflow.
Frequently asked questions
How do I install the cli-anything-drawio skill?
Download the skill ZIP from this page and unzip it into ~/.claude/skills/ for personal use, or into a project's .claude/skills/ folder. In the Claude apps you can upload it under Settings → Capabilities → Skills. You also need to install the pip package cli-anything-drawio.
What are the requirements for cli-anything-drawio?
You need Python 3.10 or newer, the drawio desktop application installed on your system, and the pip package cli-anything-drawio. The drawio desktop application is a required prerequisite.
Is cli-anything-drawio free to use?
The skill is listed under the Apache-2.0 licence. Check the licence in the source repository for the exact terms before you use or redistribute it.
Does the skill need an internet connection?
The listing says it does not use the network. It does run scripts, so review the files before installing.
What can the agent export?
The export group renders diagrams to PNG, PDF or SVG. You can list the available formats with the formats command.
When should I use the Draw.io web app instead?
If you need a quick one-off drawing, the Draw.io web app will be faster because this skill adds setup overhead. It also suits environments where the drawio desktop application cannot be installed, since that is required.
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
This skill suits developers, designers and documentation writers who want an agent to build or update Draw.io diagrams and export them repeatedly. It is a poor fit for a single quick drawing, or for machines where the drawio desktop application cannot be installed, in which case the Draw.io web app is simpler.
Download the skill