/project-documenter:drawiofrom project-documenter
Creates .drawio diagram files in mxGraphModel XML format and exports to PNG, SVG, or PDF with embedded XML for editability in draw.io/diagrams.net.
Ships in project-documenter. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Create native .drawio files in mxGraphModel format, apply consistent diagram styles, and export to PNG, SVG, or PDF with embedded XML so the result remains editable in draw.io / diagrams.net.
.drawio source as the canonical artifact.scripts folder when needed.png, svg, and pdf so exported files remain editable.| Step | Required action |
|---|---|
| Generate XML | Create valid draw.io XML in mxGraphModel format. |
| Save source | Write the XML to a .drawio file. |
| Export | Use the bundled exporter or draw.io CLI to create PNG/SVG/PDF. |
| Verify | Open or validate the source and confirm exported file exists. |
The bundled scripts/drawio-to-png.mjs (drawio-to-png.mjs) has two rendering backends:
| Renderer | When used | Notes |
|---|---|---|
| draw.io CLI | Automatically when draw.io desktop CLI is installed. | Pixel-perfect and fastest. |
| Official draw.io viewer in headless browser | Fallback when CLI is unavailable. | Pixel-perfect; needs Chromium/Edge through puppeteer-core. |
auto | Default. | Try CLI first, then viewer. |
# Install dependencies once, from the scripts folder
cd skills/drawio/scripts && npm install
# Export a single diagram
node skills/drawio/scripts/drawio-to-png.mjs <input.drawio> [output.png]
# Export all .drawio files in a directory
node skills/drawio/scripts/drawio-to-png.mjs --dir <directory>
# Force a specific renderer
node skills/drawio/scripts/drawio-to-png.mjs --renderer=cli|viewer|auto <input.drawio>
| Format | Embed XML | Notes |
|---|---|---|
png | Yes | Viewable everywhere and editable in draw.io. |
svg | Yes | Scalable and editable in draw.io. |
pdf | Yes | Printable and editable in draw.io. |
Use these mxGraph style strings for consistent professional diagrams.
<!-- Primary service (highlighted) -->
<mxCell style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;strokeWidth=2;arcSize=12;shadow=1;" />
<!-- External system -->
<mxCell style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#666666;" />
<!-- Success/processing stage -->
<mxCell style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" />
<!-- Warning/quality gate -->
<mxCell style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" />
<!-- Error/failure path -->
<mxCell style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;" />
<!-- Data store (cylinder) -->
<mxCell style="shape=cylinder3;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" />
<!-- Arrow -->
<mxCell style="edgeStyle=orthogonalEdgeStyle;rounded=1;strokeColor=#6c8ebf;strokeWidth=2;" />
Try drawio from PATH first, then common desktop locations.
| Platform | Candidate |
|---|---|
| Windows | "C:\Program Files\draw.io\draw.io.exe" |
| macOS | /Applications/draw.io.app/Contents/MacOS/draw.io |
| Linux | drawio from snap, apt, or flatpak |
drawio -x -f png -e -b 10 -o <output.png> <input.drawio>
Flags: -x exports, -f selects format, -e embeds diagram XML, -b sets border, and -o sets the output path.
mxGraphModel XML and save it as <name>.drawio.scripts/drawio-to-png.mjs or the draw.io CLI.scripts/drawio-to-png.mjs: Node.js exporter with CLI and headless viewer renderers.scripts/package.json: script dependencies including puppeteer-core.The skill folder contains SKILL.md, scripts/drawio-to-png.mjs, and scripts/package.json. Use create/edit tooling to write diagram source. Install dependencies one-time for the exporter. Both renderers are pixel-perfect; Linux installs may come from snap/apt/flatpak.
## Draw.io diagram result
**Status:** complete | blocked | failed
**Source:** `<diagram>.drawio`
**Exports:** `<diagram>.png` | `<diagram>.svg` | `<diagram>.pdf`
### Diagram contents
| Element | Count | Notes |
| --- | --- | --- |
| Nodes | <count> | <main groups> |
| Edges | <count> | <routing/labels> |
### Validation
- `.drawio` source written: pass | fail
- Export command: `<command>`
- Exported file exists: pass | fail
- Embedded XML requested: pass | fail
.drawio file containing valid mxGraphModel XML.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
2 skills in this plugin
npx claudepluginhub gbb-acelerators/awesome-harness-primitives --plugin project-documenterOther plugins' skills for the same job