/drawio replicate)Use /drawio replicate when you want to recreate an uploaded image, screenshot, or reference diagram as a structured draw.io bundle.
Use drawio-academic-skills when the reference is a paper/thesis/manuscript figure or publication constraints matter.
meta.source: replicated and meta.canvas when source coordinates matter/drawio editWhen a diagram was already extracted into structured JSON by a model or a human, the raster-extraction adapter turns that trusted JSON into a canonical spec offline. It does not read images, run OCR, invoke a model, or claim extraction accuracy.
node skills/drawio/scripts/cli.js extraction.json final/redraw.drawio --input-format raster-extraction --validate
The input requires schemaVersion: 1, a non-empty nodes array, an edges array, and caller-provided safe, unique IDs. Geometry is all-or-none: if every node supplies x/y/w/h, all top-left bounds are preserved; if any node omits geometry, all source bounds are dropped and JavaScript ELK places the whole graph. Plain text nodes always render with transparent fill and stroke. Malformed JSON, unknown fields, unsafe values, duplicates, dangling edges, invalid colors, or partial geometry fail with ADAPTER_PARSE; unsupported schema versions fail with ADAPTER_UNSUPPORTED. After the adapter, the normal validateSpec → JavaScript ELK → renderer → validateXml path and sidecars apply.
When the source is publication-facing, the overlay adds:
meta.profile: academic-papermeta.figureType: architecture, roadmap, or workflow.drawio + 300dpi .png delivery, with SVG fallback when Desktop is unavailable and .spec.yaml + .arch.json in a project-local work directoryThe overlay still executes through the sibling base CLI at ../drawio/scripts/cli.js.
When the source image depends on typography or placement, replication should capture:
meta.canvas: WIDTHxHEIGHT when coordinates are copied from the reference;Do not satisfy a rebuild by placing the whole reference image as the final draw.io page. The final .drawio should use native editable shapes, text, connectors, modules/groups, waypoints, and styles. Validation flags full-page embedded image cells; small icons or motif images are still allowed when they are not the whole diagram.
For self-checking, compare the source and export for:
| Mode | Default | Behavior |
|---|---|---|
preserve-original |
Yes | Preserve source background and dominant palette through explicit style overrides |
theme-first |
No | Normalize the redraw to the selected theme and treat source colors as hints |
Replicated specs should usually record:
meta.source: replicatedmeta.canvas when source coordinates mattermeta.replication.colorModemeta.replication.backgroundmeta.replication.palette| Domain | Recommended theme |
|---|---|
| software architecture | tech-blue |
| business process | tech-blue |
| research workflow | academic |
| environmental / lifecycle | nature |
| accessibility-first review | high-contrast |
| presentation slides | dark |
Replication should pause for confirmation when semantics are uncertain.
The review draft should include:
/drawio replicate
Color mode: preserve-original
[upload image]
Keep the warm nodes and dark connectors instead of normalizing everything to tech-blue
/drawio-academic-skills replicate
[upload paper figure]
Redraw this for IEEE submission, keep it grayscale-safe, deliver an editable .drawio plus a submission PDF, and keep sidecars in a work directory
/drawio replicate with dark theme
[upload architecture screenshot]
Redraw this for a keynote slide
Base replication should produce the final editable and visual-check artifacts:
.drawio.svgWork-dir sidecars:
.spec.yaml.arch.jsonOptional outputs:
.drawio fileSwitch to theme-first if you want brand or paper normalization instead of source-color fidelity.
Stay on preserve-original and make sure the extracted palette summary is accepted before rendering.
Split the figure into sub-diagrams or reduce the redraw scope before regeneration.
Add or adjust labelOffset for the affected edge labels, then re-render and compare again.