drawio-diagram

Create editable draw.io research figures with PNG export and visual QA.

52|Updated Apr 24, 2026
One-click install
npx skills add https://github.com/Immortalqx/my_codex_skills --skill drawio-diagram-immortalqx
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: drawio-diagram
Source: https://github.com/Immortalqx/my_codex_skills/tree/main/drawio-diagram
Command: npx skills add https://github.com/Immortalqx/my_codex_skills --skill drawio-diagram-immortalqx

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires PyMuPDF, pypdf, Pillow, and includes scripts (resource) components.

What problem does it solve? Producing paper figures, posters, and concept diagrams that remain editable in draw.io is tedious, and headless drawio exports often hang or produce broken visuals without anyone noticing. This Skill enforces a gated pipeline that reuses source paper assets, builds a clean editable .drawio draft, exports a PNG under a hard 60-second timeout, and visually inspects the result before declaring it ready. ## Core Features & Use Cases - Asset-first workflow: Inventories images, PDFs, and slides from source materials with inventory_assets.py, renders PDF pages to PNG via render_pdf_pages.py, and reuses real paper figures instead of redrawing from scratch. - Cross-platform export: Ships PowerShell and bash scripts that auto-discover the drawio CLI on Windows, macOS, and Linux, then export PNG only with a hard 60s timeout and partial-file cleanup. - Mandatory visual QA loop: Requires opening the exported PNG, checking a clipping/overlap/readability checklist, recording results in qa_notes.md, and iterating until every gate passes. - Use Case: Given a research paper PDF and its figures, produce a 16:9 poster draft with the method diagram and result plots embedded, exported as sketch.png and verified visually. ## Quick Start Use the drawio-diagram skill to build an editable draw.io poster from my paper PDF in this folder, reusing its figures, and export a QA-checked PNG into image_draft/.

Frequently Asked Questions about drawio-diagram

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I export a draw.io diagram to PNG from the command line?

Run the export script for your platform: export_drawio.ps1 on Windows or export_drawio.sh on macOS/Linux, passing the .drawio input and output directory. The script auto-discovers the drawio binary and exports PNG at scale 1.5 with a 60-second timeout.

How do I create an editable research poster in draw.io from a paper PDF?

Inventory the paper's images and documents with inventory_assets.py, render key PDF pages with render_pdf_pages.py, then build a .drawio draft that embeds the real method and result figures. Export to PNG and visually inspect it before declaring it ready.

Does the drawio export script work on macOS and Linux?

Yes, export_drawio.sh supports macOS and Linux, locating drawio via DRAWIO_EXE, PATH, the /Applications .app bundle, snap, or AppImage scans. Windows uses the separate export_drawio.ps1 PowerShell script.

Why does headless drawio hang when exporting SVG or PDF?

Headless drawio frequently hangs on SVG and PDF exports, so this pipeline exports PNG only under a hard 60-second timeout. On timeout the process is killed, partial files are deleted, and the script exits with code 5.

What happens if the drawio CLI is not installed?

The find_drawio discovery script exits non-zero and prints platform-specific install hints such as winget, brew, snap, or AppImage download. The workflow surfaces these instructions instead of silently failing or returning a stub PNG.