mermaid-to-vsdx
Skill1 starsChanged 45 days agoMITView on GitHub
Convert Mermaid flowchart syntax directly to Microsoft Visio VSDX files using standard BASFLO shapes
In this repository59 other files it gives its agents.
- answer-me-with-htmlSkill
- bilibili-hubSkill
- brand-docxSkill
- brand-pptxSkill
- brand-xlsxSkill
- browser-useSkill
- Clash 控制器Skill
- cloudflare-dnsSkill
- codex-imageSkill
- contact-vcard-extractorSkill
- data-cleaning-for-excelSkill
- deck-refreshSkill
- document-polisherSkill
- doubao-ttsSkill
- douyin-downloaderSkill
- evidence-chain-builderSkill
- exa-searchSkill
- excel-hygieneSkill
- formula-audit-checkerSkill
- free-ttsSkill
- frontend-designSkill
- fucai3d-latestSkill
- generative-ui-minisSkill
- github-sync-helperSkill
- hello-demoSkill
- hyperframesSkill
- ib-check-deckSkill
- inputs-calcs-outputs-designSkill
- maimai-hubSkill
- memos-apiSkill
- model-architecture-templateSkill
- nano-bananaSkill
- network-engineeringSkill
- notion-hubSkill
- openstreetmap-markerSkill
- packet-tracerSkill
- pdf-converterSkill
- pivot-table-builderSkill
- pktSkill
- production-agent-publicSkill
- qbt-hubSkill
- quark-hubSkill
- reverse-dcfSkill
- scenario-managerSkill
- self-improving-agentSkill
- spotify-hubSkill
- tavily-searchSkill
- tg-hubSkill
- twitter-downloaderSkill
- twitter-x-hubSkill
- webapp-testingSkill
- web-artifacts-builderSkill
- web-content-extractorSkill
- weibo-hubSkill
- whenpeakSkill
- xianyu-hubSkill
- xiaohongshu-hubSkill
- youtube-downloaderSkill
- ytmusic-hubSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 40
Start/End (rounded rect) = Master 2
- Very specific: line 53
All connectors need BegTrigger/EndTrigger with _XFTRIGGER(Sheet.X!EventXFMod)
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Windows 环境:技能目录为 C:\Users\Willian.agents\skills\mermaid-to-vsdx,脚本请用绝对路径或先 cd 进技能目录;产物写到当前工作目录。本机没有 LibreOffice(soffice),依赖它做渲染、缩略图、接受修订、公式重算的步骤会失败,其余 Python 操作正常。
Mermaid → Visio VSDX Converter
Convert Mermaid flowchart diagrams into real Microsoft Visio VSDX files with standard BASFLO symbols (Start/End, Process, Decision, dynamic connectors). Works without Visio installed — pure Python.
When to Use
User says "convert to Visio", "export VSDX", "generate visio file", or needs a flowchart in Visio format.
How It Works
Uses templates/reference.vsdx as a skeleton — a handwritten Visio file with BASFLO masters and theme. Only visio/pages/page1.xml is replaced; all other files (masters, themes, styles) are kept intact. The Python script parses Mermaid syntax, lays out shapes in columns, computes connector routes, and writes a valid VSDX.
Usage
python scripts/gen_vsdx.py 'mermaid_text' output.vsdxSetup
Python 3 only (stdlib — no extra libraries needed).
Procedure
- Get Mermaid text from user (e.g.
graph TD; A[Start] --> B[Process]) - Run:
python3 scripts/gen_vsdx.py 'flowchart_text' output.vsdx - Send VSDX back to user
⚠️ Key Details
Master ID Mapping (BASFLO_U.VSSX)
- Start/End (rounded rect) = Master 2
- Process (rect) = Master 5
- Decision (diamond) = Master 4
- Dynamic connector (line) = Master 6
Must-Have: RecalcDocument=true
Without it in docProps/custom.xml, connectors pile up in Visio.
Connector Strategy
- Vertical:
Begin=PAR(PNT(src!Connections.X3)),End=_WALKGLUE,ConFixedCode=5 - Horizontal:
PAR(PNT(src!Connections.X2))→PAR(PNT(tgt!Connections.X1)) - L-shape:
_WALKGLUEbegin,PAR(PNT(...))end. Geometry: first horizontal then vertical - Connects always use
ToCell="PinX" ToPart="3" - All connectors need
BegTrigger/EndTriggerwith_XFTRIGGER(Sheet.X!EventXFMod)
Shapes Must NOT Set Width/Height
Inherit from Master. Only PinX/PinY, LayerMember, LineWeight, LineColor, FillBkgnd, Character.
Known Limitations
- TD layout only, no subgraph/swimlane
- BASFLO symbol set only (extensible)
Author
Simon Chen — szhzz.com
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.

