pi-drawio
Pi skill for generating native draw.io diagrams and exports
Package details
Install pi-drawio from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-drawio- Package
pi-drawio- Version
0.1.0- Published
- May 2, 2026
- Downloads
- not available
- Author
- ethanolivertroy
- License
- MIT
- Types
- skill
- Size
- 27.8 KB
- Dependencies
- 0 dependencies · 0 peers
Pi manifest JSON
{
"skills": [
"./skills"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-drawio
A Pi package that adds a drawio skill for generating native draw.io diagrams as .drawio files and optionally exporting them to PNG, SVG, PDF, or JPG.
PNG, SVG, and PDF exports use draw.io Desktop's CLI with embedded diagram XML, so exported files remain editable in draw.io.
Install
Recommended: install as a Pi package from npm:
pi install npm:pi-drawio
Then restart Pi or run /reload in an existing Pi session.
For a project-local install, add -l from the project directory:
pi install -l npm:pi-drawio
To try it for one run without adding it to settings:
pi -e npm:pi-drawio
You can also install directly from GitHub:
pi install git:github.com/ethanolivertroy/pi-drawio
After install, use the skill command:
/skill:drawio create a flowchart for password reset
/skill:drawio png architecture diagram for a web app with CDN, API, queue, workers, and Postgres
/skill:drawio svg ER diagram for users, teams, projects, and tasks
You can also ask naturally; Pi should load the skill when your request mentions diagrams, draw.io, .drawio, PNG/SVG/PDF export, architecture diagrams, ER diagrams, flowcharts, mockups, and related tasks.
Manual clone alternative
If you prefer not to use pi install, clone into a skill discovery directory:
git clone https://github.com/ethanolivertroy/pi-drawio ~/.pi/agent/skills/pi-drawio
Pi recursively discovers skills/drawio/SKILL.md from that checkout.
What it does
- Generates native draw.io
mxGraphModelXML. - Writes
.drawiofiles directly; no server-side conversion required. - Optionally exports with draw.io Desktop CLI.
- Embeds diagram XML into PNG, SVG, and PDF exports.
- Opens the result when possible.
- Includes layout quality guidance to reduce clipping, label collisions, and messy edge routing.
- Includes helper scripts for layout checks, export, opening, and optional post-processing.
Optional requirements
Exporting requires draw.io Desktop to be installed. The skill still works without it by producing .drawio files you can open manually.
CLI locations checked by the helper:
drawioordraw.ioonPATH- macOS:
/Applications/draw.io.app/Contents/MacOS/draw.io - WSL2 default and per-user Windows install paths
Package structure
package.json Pi package manifest
skills/drawio/SKILL.md Skill instructions
skills/drawio/scripts/ Export/open/check helpers
skills/drawio/references/ XML and layout references
Update or remove
pi update git:github.com/ethanolivertroy/pi-drawio
pi remove git:github.com/ethanolivertroy/pi-drawio
License
MIT