Skip to content

Draw.io Diagram CLI

Lets an agent create, edit and export Draw.io diagrams through a command-line tool.

Stars
58,084
Licence
Apache-2.0
Files
1 file

What it does

This skill teaches an AI agent to work with Draw.io diagrams by running a command-line tool called cli-anything-drawio. 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. Output can be returned as structured JSON so the agent can read the results reliably.

Great for

  • Developers who want an agent to generate or edit architecture or flowchart diagrams from text instructions
  • Designers or documentation writers who need repeatable diagram exports without opening the Draw.io app
  • Teams automating diagram updates as part of a build or documentation workflow

Skip it if

  • Users who need a quick one-off drawing and would be faster in the Draw.io web app (setup adds overhead)
  • Environments where the drawio desktop application cannot be installed, since the prerequisite is required

Try asking

  • “Create a new Draw.io project and add three boxes labelled Web, API and Database, then connect them”
  • “Export my project.json diagram to PDF with overwrite enabled”
  • “Move the shape with ID 4 to the right and change its fill colour to blue”
  • “List all pages in this diagram and rename page 2 to Deployment”
Step-by-step guide: how to use Draw.io Diagram CLIInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 1 original files, the Apache-2.0 licence and an attribution note.

    cli-anything-drawio.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip cli-anything-drawio.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip cli-anything-drawio.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Ask the agent to use the --json flag so it can parse results reliably
  • Use absolute file paths for project and export files, as the skill recommends
  • Save the project file regularly with save or save-state, since undo history is limited to 50 levels and may not survive a crash

What's inside

  • SKILL.md

Redistributed unmodified from HKUDS/CLI-Anything under the Apache-2.0 licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.