Visio Safe Diagrams
Paste the following prompt into your AI chat to install this skill:
Install @user_6c3897e4/visio-safe-diagrams into your AI assistant using https://skillhub.cn/install/skillhub.md.
About this skill
Problem
Architecture diagrams generated from Visio or Draw.io often suffer from text spilling outside boxes, edge endpoints drifting, unstable CJK/English label wrapping, and SVGs that render as broken images in browsers or image pipelines. visio-safe-diagrams treats .drawio as the editable master, generates a stable SVG from that master, and validates both files before handoff.
Workflow
Core steps:
- Create or repair the .drawio file first, keeping it uncompressed and inline. Avoid storing raw XML as text inside a cell, and avoid base64/deflate unless using Draw.io's own exporter.
- For line layouts that must match a reference drawing, use fixed-point edges with explicit geometry instead of relying on source/target auto-routing.
- Order elements as root cells 0 and 1, title/background rectangles, edges and edge labels, then device/component boxes to keep the diagram readable and export-stable.
- Generate SVG with scripts/drawio_to_svg.py. The script copies fixed-point edges, separates label text, applies clipPath per box, uses conservative wrapping for mixed Chinese/English labels, and writes UTF-8 output.
Validate before delivery: .drawio parses with an mxGraphModel, geometry attributes use as="geometry", Chinese labels remain visible under UTF-8, SVG parses as XML, and rendered output shows no broken image, no text outside boxes, and no labels covering critical line endpoints.
Boundaries
This skill fits Visio-safe architecture or device diagrams where an editable .drawio source and a deliverable SVG are both needed. If the input .drawio is compressed/base64 or lacks an inline mxGraphModel, open it in Draw.io and export uncompressed XML or repair it manually. It focuses on layout stability and rendering compatibility, not on modeling complex workflow semantics.
Use Cases
- Turn a network architecture draft into a deliverable SVG while keeping a .drawio source for later edits.
- Draw device connection diagrams with stable edge endpoints instead of relying on Draw.io auto-routing.
- Produce SVG architecture diagrams with Chinese device names and English metrics without text overflowing boxes.
- Validate .drawio and SVG files before handoff, then render the SVG in a browser to confirm it is not broken.
Best For
- Engineers maintaining internal architecture docs who need editable .drawio sources and stable SVG outputs
- Design or SRE engineers drawing device/topology diagrams whose line placement must match a reference
- Product or R&D engineers delivering mixed Chinese/English architecture diagrams without overflow or mojibake
- Platform engineers validating .drawio and SVG parsability in CI or handoff pipelines
Related Skills
A QQ bot messaging framework based on qq-botpy, covering guild, C2C, and group message flows, scheduled pushes, and troubleshooting.
Explains how to calculate N+1 severance, including service-year rounding, monthly wage base, caps, taxes, and notice pay.
Takes a name input and returns a simple hello greeting.
A BPU quantization tool for Horizon RDK S100 that handles PyTorch/ONNX calibration, stride alignment, post-processing, and board-side validation.