drawio-diagram
Skill54 starsChanged 5 months agoMITView on GitHub
Use when creating research figures, paper posters, academic presentation visuals, or conceptual diagrams as an editable draw.io/diagrams.net draft plus PNG export that passes strict visual QA. Especially for paper figures/posters where Codex must read source materials, reuse extracted paper images or plots when useful, and produce an editable draw.io draft + PNG export the user can keep editing directly in draw.io. Cross-platform (Windows, macOS, Linux). PNG export has a hard 60s timeout.
- Installs packages
7 other projects use a version of this.
Adopted by
Most recently taken up by
- cjh-solver/MathModeling-Skills-Arsenaltheir own version, first seen Nov 8, 2026
- hua695/MathModeling-Skills-Arsenaltheir own version, first seen Oct 25, 2026
- dev-vpandey/vpandey-skillstheir own version, first seen May 23, 2026
- b1mango/Agent-Skillstheir own version, first seen Apr 26, 2026
- LaoK2017/Agent-Skillstheir own version, first seen Mar 10, 2026
- xstongxue/best-skillstheir own version, first seen Mar 5, 2026
Used with
Projects with it also use codegen-diagram, codegen-doc and 6 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
xstongxueSkillcodegen-diagram
基于当前项目/代码生成 Draw.io 图表,支持技术栈图、系统架构图、数据结构图、E-R 图四种类型。输出符合 Draw.io 语法的 .drawio 文件(mxGraph XML),可直接导入 Draw.io 编辑。当用户提到技术栈、系统架构、数据结构、E-R 图时使用。
Also in 3 projects that use this
xstongxueSkillcodegen-doc
基于当前项目/代码生成各类文档,支持论文章节、项目梳理、重点问题、简历项目描述四种类型。当用户提到生成论文章节、项目梳理、技术难点、简历项目描述时使用。要给新同事看的上手文档(新人文档、架构文档、代码导读、onboarding)用 project-docs。
Also in 3 projects that use this
garfield-bbSkillwechat-article-writer
公众号文章自动化写作流程。支持资料搜索、文章撰写、爆款标题生成、排版优化。当用户提到写公众号、微信文章、自媒体写作、爆款文章、内容创作时使用此 skill。
Also in 3 projects that use this
LaoK2017Skillweb-access
所有联网操作必须通过此 skill 处理,包括:搜索、网页抓取、登录后操作、网络交互等。触发场景:用户要求搜索信息、查看网页内容、访问需要登录的网站、操作网页界面、抓取社交媒体内容(小红书、微博、推特等)、读取动态渲染页面、以及任何需要真实浏览器环境的网络任务。
Also in 4 projects that use this
BlockSkillfrontend-design
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
Also in 3 projects that use this
- +3 more from xstongxue
Other versions7 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 7
- xstongxue/best-skills★ 2.9ksame name
- cjh-solver/MathModeling-Skills-Arsenal★ 14same name
- hua695/MathModeling-Skills-Arsenal★ 12same name
- b1mango/Agent-Skills★ 4same name
- dev-vpandey/vpandey-skills★ 4same name
- catsonkeyboard/skills★ 0same name
- LaoK2017/Agent-Skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository27 other files it gives its agents.
- alphaxivSkill
- arxivSkill
- doc-coauthoringSkill
- docxSkill
- figure-descriptionSkill
- formula-derivationSkill
- grant-proposalSkill
- mmx-cliSkill
- mock-reviewSkill
- novelty-checkSkill
- paper-readingSkill
- pdfSkill
- phd-benchmark-paper-templateSkill
- phd-figure-designerSkill
- phd-idea-evaluatorSkill
- phd-intro-drafterSkill
- phd-pre-submission-reviewerSkill
- phd-tech-paper-templateSkill
- phd-vibe-research-workflowSkill
- pptxSkill
- proof-writerSkill
- research-litSkill
- research-survey-loopSkill
- research-wikiSkill
- theme-factorySkill
- update-source-mapSkill
- xlsxSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
32 rules. 0 are common, 21 are distinctive, and 11 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
21
Distinctive
This author's own choices. Worth a look.
11
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 18
Do not declare a figure ready until all gates pass:
- Very specific: line 20
Asset gate: If the task is based on a paper, poster, PDF, slides, Markdown notes, or experiment folder, inspect available …
- Distinctive: line 22
Discovery gate: Verify the drawio CLI is installed and locatable on this host.
- Distinctive: line 25
No-blind-export gate: Never say the PNG is ready just because files exist.
- Distinctive: line 27
If any gate fails, repair the draw.io draft first.
- Distinctive: line 33
Never store API keys, tokens, auth JSON contents, private URLs, or user secrets inside the skill or generated figure files.
- Distinctive: line 41
Before invoking the exporter, run the discovery script for this host.
- Distinctive: line 58
If the discovery script exits non-zero, install drawio via the host's package manager and re-run discovery:
- Very specific: line 67
If installation is impossible, ask the user to confirm an alternative path or hand back the editable .drawio only (no PNG, no claim of …
- Very specific: line 71
Use image_draft/ by default.
- Very specific: line 84
If image_draft/ already exists, create a versioned subfolder such as image_draft/run_002/ unless the user asks to overwrite.
- Very specific: line 90
Read the paper/PDF/slides/notes enough to identify the actual method, problem setting, main claim, experimental evidence, and available …
- Distinctive: line 91
Treat user-provided screenshots/images in the conversation as source assets too: inspect them and reuse them when they contain useful paper …
- Very specific: line 92
Search local folders for .pdf, .pptx, .md, .png, .jpg, .jpeg, .svg, .webp, and figure asset folders.
- Very specific: line 93
Run or manually create an asset inventory before sketching.
- Very specific: line 101
Put reused assets under image_draft/assets/.
- Distinctive: line 104
If the source paper includes figures that communicate the method, robot/camera setup, dataset, results, ablations, or qualitative examples, …
- Distinctive: line 105
Keep figure assets as movable draw.io image objects where possible.
- Very specific: line 106
Use scripts/render_pdf_pages.py when possible.
- Distinctive: line 114
No text under shapes, arrows, image crops, icons, badges, or panel borders.
- Distinctive: line 115
No text clipping or overflow.
- Very specific: line 117
No title/body/media collisions.
- Distinctive: line 118
All panels must have enough internal padding.
- Distinctive: line 119
All labels must be concise and editable.
- Distinctive: line 120
Use real extracted paper figures/images where useful.
- Distinctive: line 121
Do not create a generic diagram if the paper already provides relevant visual evidence.
- Distinctive: line 122
Keep the draft independent: no "according to the paper", "from PDF", or "adapted from notes" in the visible figure.
- Distinctive: line 135
After every draw.io export:
- Distinctive: line 138
Check at full-image scale and zoomed into dense regions.
- Very specific: line 140
If fail, fix the .drawio, re-export, and inspect again.
- Distinctive: line 157
Only after every item passes may the figure be declared ready.
- Distinctive: line 216
If visual QA did not pass, stop and report that the figure is not ready and describe what was fixed in the latest iteration.
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Draw.io Research Figure Pipeline
Purpose
This skill produces research visuals as a single deliverable:
- An editable, readable
.drawiodraft plus one PNG export that passes strict visual QA. SVG/PDF are not exported (they cause unpredictable hangs in headless drawio).
The draw.io draft is not disposable. It must be good enough for the user to keep editing directly in draw.io and to use as a paper or poster figure on its own.
Non-Negotiable Gates
Do not declare a figure ready until all gates pass:
- Asset gate: If the task is based on a paper, poster, PDF, slides, Markdown notes, or experiment folder, inspect available figures/images/tables first and reuse useful visual assets instead of redrawing everything from scratch. This is mandatory, not optional.
- Editable draft gate: Produce a
.drawiothat is meaningful and editable by itself. The user must be able to continue editing it in draw.io. - Discovery gate: Verify the drawio CLI is installed and locatable on this host. If not found, run the discovery script and surface install instructions (do not silently fail).
- Export gate: Export PNG from the
.drawiowith a hard 60s timeout. SVG/PDF exports are intentionally skipped — headless drawio frequently hangs on those, and the PNG is sufficient for visual QA. - Visual QA gate: Open the exported PNG and inspect it visually. If text is clipped, occluded, distorted, overlapped, unreadable, misaligned, too small, or blocked by icons/shapes, fix the
.drawio, re-export, and inspect again. - No-blind-export gate: Never say the PNG is ready just because files exist. The visual preview must be checked.
If any gate fails, repair the draw.io draft first. Do not declare the figure ready.
For research posters and paper figures, the asset gate must produce an asset_manifest.md before drawing begins. If relevant visual assets exist but are not used, qa_notes.md must explain why each was rejected.
Privacy Rule
Never store API keys, tokens, auth JSON contents, private URLs, or user secrets inside the skill or generated figure files. Scripts may read credentials at runtime from environment variables or existing local Codex auth files, but must not print them.
Discovery & Setup
The drawio CLI must be present on the host before any export. This skill is cross-platform: Windows uses PowerShell scripts, macOS and Linux use bash scripts. The skill ships two discovery helpers and two exporters that share the same lookup logic.
Mandatory preflight
Before invoking the exporter, run the discovery script for this host. If it returns a non-zero status, surface the install hint to the user — do not silently fall back to other skills, and do not hand back a stub PNG.
| Host | Discovery | Exporter |
| Windows | scripts/find_drawio.ps1 | scripts/export_drawio.ps1 |
| macOS / Linux | bash scripts/find_drawio.sh | bash scripts/export_drawio.sh |
Lookup order (all scripts)
$DRAWIO_EXEenvironment variable (absolute path to the drawio binary).PATHlookup via the platform-native command (Get-Command/command -v).- Per-OS common install locations (see script sources for the full list).
- For Linux, a best-effort AppImage scan under
$HOMEand/opt. - For Windows, a best-effort scan under
%LOCALAPPDATA%\Microsoft\WinGet\Packages.
Installing drawio
If the discovery script exits non-zero, install drawio via the host's package manager and re-run discovery:
| Platform | Install command | Notes |
| Windows | winget install drawio or choco install drawio or download from https://www.drawio.com/ | Installer places draw.io.exe in %LOCALAPPDATA%\Programs\draw.io\. |
| macOS | brew install --cask drawio or download .dmg from https://www.drawio.com/ | Binary lives inside the .app bundle; the discovery script handles it. |
| Ubuntu / Debian | Download AppImage from https://www.drawio.com/ and chmod +x, or sudo snap install drawio | Recommended path: put the AppImage in ~/.local/bin/ and symlink as drawio. |
| Other Linux | yay -S drawio (Arch), flatpak install drawio | Same logic — the script's PATH and AppImage scan will pick them up. |
If installation is impossible, ask the user to confirm an alternative path or hand back the editable .drawio only (no PNG, no claim of completion).
Default Output Folder
Use image_draft/ by default. Never choose a generic test folder unless the user explicitly names it.
Recommended structure:
image_draft/
assets/ # extracted paper images, plots, screenshots
asset_manifest.md # inventory of usable source visuals
sketch.drawio # editable semantic draft
sketch.png # visual QA preview (the only raster export)
qa_notes.md # visual QA checklist and fixesIf image_draft/ already exists, create a versioned subfolder such as image_draft/run_002/ unless the user asks to overwrite.
Source Material Workflow
For research tasks, first build content from source materials:
- Read the paper/PDF/slides/notes enough to identify the actual method, problem setting, main claim, experimental evidence, and available figures.
- Treat user-provided screenshots/images in the conversation as source assets too: inspect them and reuse them when they contain useful paper figures, layouts, plots, or visual examples.
- Search local folders for
.pdf,.pptx,.md,.png,.jpg,.jpeg,.svg,.webp, and figure asset folders. - Run or manually create an asset inventory before sketching. Use
scripts/inventory_assets.pywhen possible. - Extract or reuse relevant visual material:
- method diagrams
- robot/camera setup images
- pipeline screenshots
- result plots/tables
- qualitative examples
- ablation charts
- Put reused assets under
image_draft/assets/. - Insert useful assets into draw.io when they improve fidelity. Do not replace real paper figures with weak hand-drawn substitutes.
- For a paper poster, at least one relevant method/result/setup/qualitative asset should be inserted when such assets exist. If none are inserted, justify this explicitly in
qa_notes.md. - If the source paper includes figures that communicate the method, robot/camera setup, dataset, results, ablations, or qualitative examples, those figures have priority over newly invented icons or generic boxes.
- Keep figure assets as movable draw.io image objects where possible. If programmatic insertion is unreliable, use draw.io desktop or the draw.io browser editor to insert the images, then re-export and inspect.
- Use
scripts/render_pdf_pages.pywhen possible.
Draw.io Draft Requirements
The draft must be clean:
- Fixed canvas size appropriate to the task, usually 16:9 for posters or
1536x1024-like landscape. - Stable grid: columns, rows, and section titles must align.
- No text under shapes, arrows, image crops, icons, badges, or panel borders.
- No text clipping or overflow.
- No ambiguous arrows.
- No title/body/media collisions.
- All panels must have enough internal padding.
- All labels must be concise and editable.
- Use real extracted paper figures/images where useful; embed or reference them in draw.io so the user can move/replace them.
- Do not create a generic diagram if the paper already provides relevant visual evidence. Use the paper's method figure, setup figure, result chart, or qualitative examples as visual anchors.
- Keep the draft independent: no "according to the paper", "from PDF", or "adapted from notes" in the visible figure.
For academic posters, prefer:
- A strong title band.
- 3-4 main sections.
- Method/architecture in the center.
- Real result numbers/plots on the right or bottom.
- Key takeaways in a dedicated strip.
- Paper images/robot setup/qualitative examples as visual anchors when available.
Mandatory Visual QA Loop
After every draw.io export:
- Open
sketch.pngwith an image viewer orview_image. - Check at full-image scale and zoomed into dense regions.
- Record pass/fail in
qa_notes.md. - If fail, fix the
.drawio, re-export, and inspect again.
QA checklist:
- [ ] Title is readable and not clipped.
- [ ] Every panel title has a fixed area and does not overlap body text.
- [ ] Body text fits inside its box with padding.
- [ ] No image, icon, arrow, badge, or crop covers text.
- [ ] No text extends outside panel boundaries.
- [ ] All arrows point in the intended direction.
- [ ] Extracted figures/images are visible and not distorted.
- [ ] Relevant source assets were inserted, or each unused relevant asset is justified in `qa_notes.md`.
- [ ] Result numbers/axis labels are readable when included.
- [ ] The draft is useful as a standalone editable draw.io artifact, with all labels and structure understandable without external context.Only after every item passes may the figure be declared ready.
Export
Exports PNG only, with a hard 60s timeout. SVG and PDF exports are deliberately omitted — headless drawio frequently hangs on those, and the PNG is sufficient for visual QA of the raster preview. The editable .drawio stays the source of truth. Override the timeout via -TimeoutSeconds (PowerShell) or -t (bash) when justified.
Windows (PowerShell)
powershell -ExecutionPolicy Bypass -File scripts/export_drawio.ps1 `
-DrawioPath "<image_draft>/sketch.drawio" `
-OutDir "<image_draft>"Flags:
| Flag | Default | Notes |
-DrawioPath | required | Input .drawio file. |
-OutDir | input's directory | Where the PNG is written. |
-Scale | 1.5 | PNG render scale. |
-TimeoutSeconds | 60 | Hard kill after this many seconds. Exit code 5 on timeout. |
-DrawioExe | auto-discovered | Explicit path to draw.io.exe. |
-EmbedPngDiagram | off | Embed diagram XML inside the PNG (large output). |
macOS / Linux (bash)
bash scripts/export_drawio.sh \
-i "<image_draft>/sketch.drawio" \
-o "<image_draft>"Flags:
| Flag | Default | Notes |
-i | required | Input .drawio file. |
-o | input's directory | Where the PNG is written. |
-s | 1.5 | PNG render scale. |
-t | 60 | Hard timeout in seconds. Exit code 5 on timeout. Uses GNU timeout when available; otherwise runs an internal watchdog. |
Behavior on timeout
If the export exceeds the timeout, the exporter kills the drawio process, deletes any partial PNG, and exits with code 5. The agent should report timeout as a hard failure and either re-export with -TimeoutSeconds / -t raised, or hand back the editable .drawio only and explicitly flag that visual QA could not run.
Discovered locations
Both exporters read $DRAWIO_EXE first, then search PATH and common install locations (see "Discovery & Setup" above). On Linux the AppImage is auto-discovered under $HOME and /opt.
Final Response
Report:
.drawio,.png, andqa_notes.mdpaths.- Whether source figures/images were reused.
- Whether visual QA passed.
- Whether the PNG export completed within the 60s timeout budget (if it timed out, say so explicitly).
If visual QA did not pass, stop and report that the figure is not ready and describe what was fixed in the latest iteration.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

