drawio-reconstruction
What it does
This skill turns a picture of a diagram, slide or screenshot into an editable Draw.io file. It is for people who want to change a diagram they only have as an image.
When to use it
- ✓When you have a diagram image and want an editable Draw.io version.
- ✓When you need an architecture diagram, research figure or slide rebuilt as a file.
- ✓When you want a UI screenshot or a folder of images turned into Draw.io XML.
Skill link
https://github.com/HKUSTDial/Supervisor-Skills/blob/main/skills/drawio-reconstruction/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Turn this architecture diagram screenshot into an editable Draw.io file with the same boxes and arrows.”
5 new skills a week. 1 minute to read.
How it works
The AI rebuilds text and simple shapes as native Draw.io parts, and uses images only for complex visuals. It then compares a preview with the original to check that the layout matches.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Draw.io Reconstruction
Use this skill for high-quality reconstruction of diagram images into .drawio files.
Helper Script Location
Resolve SKILL_DIR to the absolute directory containing this SKILL.md before running any bundled helper. Use the resolved skill location provided by the runtime; never assume the skill is installed under ~/.codex, ~/.agents, or any other fixed directory.
All commands below use $SKILL_DIR to mean that resolved absolute directory.
Fidelity Contract
The primary goal is visual fidelity to the reference image. Editability is secondary.
Do not treat semantic equivalence as success. A generic icon, generic curve, generic font size, approximate panel, or approximate background is a defect when the reference has a specific visual style.
Script checks only prove technical validity. A diagram is not complete merely because .drawio opens, exports, or passes check_drawio.py / batch_verify.py. Completion requires visual comparison against the reference at full size.
Work only in the target directory or target files named by the user. Do not repair, overwrite, or improve neighboring diagrams because they look related. If the requested target is ambiguous, inspect and report the ambiguity before editing.
Never silently rewrite the user's content. If the user asks for larger fonts or a more professional PPT style, first distinguish:
- Layout-only refinement: increase font size, resize boxes, improve spacing, align elements, adjust line breaks without changing words.
- Content compression: shorten sentences, remove details, rewrite labels. Ask permission before doing this.
Batch Folder Workflow
Use this workflow when the user provides a directory of images or asks for batch reconstruction.
Batch Intent And Scheduling
Before opening images for detailed visual analysis, decide whether the request is a batch reconstruction task:
- Treat the request as batch reconstruction when it names a folder, multiple image files, a glob/pattern, or any target that resolves to 2 or more image entries.
- Create and review the manifest before detailed per-image work begins.
- When sub-agent tooling is available and useful, use a bounded worker pool no larger than the available concurrency and the number of pending images. Give each active worker exactly one image and an exclusive write set for that image's
.drawio, exported.png, audit file, and private asset/crop directory. Reuse a free slot for the next image instead of trying to start every worker at once. - When sub-agent tooling is unavailable, disabled, capacity-limited, or unnecessary for a small batch, process entries serially in manifest order. Preserve the same inventory, reconstruction, export, check, and visual-audit requirements.
- Tell the user about scheduling limitations only when they materially affect timing or delivery. Do not block a valid batch solely because parallel execution is unavailable.
- The coordinating agent may inspect thumbnails or file metadata to confirm scope, naming, orientation, and shared style constraints before choosing the schedule.
Identify the input directory, output directory, naming convention, and overwrite policy.
Create a batch manifest:
python "$SKILL_DIR/scripts/batch_manifest.py" path/to/images --output-dir path/to/output --writeReview the manifest before editing. Process only entries in the manifest unless the user expands scope.
For each image, define the expected
<stem>.drawio,<stem>.png, and lightweight<stem>.audit.mdoutputs in the target output directory.Choose a bounded parallel schedule or a serial schedule:
- Assign exclusive output files for each active entry.
- Tell workers they are not alone in the codebase and must not revert or edit other workers' outputs.
- Require every entry to follow the same full workflow as a standalone single-image task. Batch mode is only a scheduling strategy; it does not reduce fidelity, inventory, reconstruction, export, check, or visual-audit requirements.
- Apply this quality gate to every entry: produce
.drawio,.png, and<stem>.audit.md; create the complete visible-element inventory; classify non-text visuals; use crops/SVG/native elements according to the normal medium rules; run required checks/exports; visually compare the exported preview against the reference; mark unresolved visual defects instead of claiming completion. - Keep final batch v
FAQ
Will the new file look exactly like the picture?
The skill aims for close visual fidelity. It compares the result with the reference at full size and fixes differences.
Does it change the content?
The skill is set up not to rewrite your content unless you ask for changes.
What do I get at the end?
A Draw.io file that you can open and edit in the Draw.io app.
Details
Original description by the author
Reconstructs reference images into high-fidelity, editable Draw.io files with rendered previews: native Draw.io elements carry text and structure, SVG covers simple icons that match the reference, and cropped or transparent PNGs preserve complex visuals. Use when the user wants a diagram image, research figure, architecture diagram, slide, UI screenshot, or image folder turned into `.drawio` XML; batch requests use a manifest with bounded parallelism when available and a full-fidelity serial fallback otherwise.
Popularity
- GitHub stars
- 11k
- Ranking position
- #11689
- License
- —
- Updated
- 10/16/2026
Comments
- …
More skills from this repository
benchmark-paper-template
11kHelps your agent plan and check a benchmark research paper, from the research gap and dataset build to experiments and a pre-submission checklist.
deep-research
11kHelps your agent run a survey-style literature review on a research topic, with checked citations, a clear taxonomy and an evidence-based report.
figure-designer
11kHelps your agent choose the layout and chart type for the main figures of a research paper, and check them against common quality rules.
idea-evaluator
11kHelps your agent judge a draft research idea for novelty, feasibility and risk, then return a clear verdict before you spend months on it.
Similar skills
gifgrep
394kLets your agent search GIF libraries, preview results, download a GIF, and pull out a still frame or a contact sheet of frames.
meme-maker
394kLets your agent pick a meme template, add your own captions, and create the meme as an SVG or PNG image.
ios-icon-gen
280kLets your agent generate icons for iOS apps. It uses Apple symbols or icons from other sources to create the correct files.