一键导入
visio-automation
Use when the user wants an AI agent to create, edit, convert, inspect, or repair editable Microsoft Visio diagrams with real Visio COM automation.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when the user wants an AI agent to create, edit, convert, inspect, or repair editable Microsoft Visio diagrams with real Visio COM automation.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | visio-automation |
| description | Use when the user wants an AI agent to create, edit, convert, inspect, or repair editable Microsoft Visio diagrams with real Visio COM automation. |
Create and modify diagrams by controlling real Microsoft Visio through COM automation. The target artifact is an editable .vsdx using built-in Visio masters, native dynamic connectors, glued endpoints, and ShapeSheet settings that survive manual editing.
Visio, .vsdx, Visio COM, stencil, master, NameU, ShapeSheet, Dynamic Connector, GlueToPos, connector routing, connector gluing, flowchart, BPMN, UML, network diagram, org chart, DFD, VSM, Mermaid, draw.io, screenshot reconstruction, whiteboard reconstruction, native editable diagrams.
New-InvisibleVisioApplication only when the user explicitly asks for background/headless operation, or for narrow internal discovery/verification where no user-facing document is being drawn.NameU masters. Use primitive basic shapes only when no semantic master exists or the user wants a deliberately generic sketch.GlueToPos; do not draw loose lines for relationships that should move with shapes..vsdx, export a PNG preview when useful, then verify the resulting document before reporting completion.Read only the files needed for the current request:
| Task | Read |
|---|---|
| Choose diagram family, stencil, or master | references/diagram-selection.md, then references/master-catalog.md if needed |
| Unknown or localized master/stencil | references/master-discovery.md |
| Natural-language master lookup, Chinese/English aliases, repeated edits | references/semantic-search-and-cache.md |
| Render a planned graph, auto-layout, natural-language flow, arrow text flow, Mermaid, or draw.io | references/graph-model-and-conversion.md |
| Recreate screenshot, whiteboard, PDF crop, or sketch | references/image-reconstruction.md |
| Verify routing, glue, ShapeSheet cells, output files | references/verification.md |
| Need Visio COM, VBA, or ShapeSheet API details | references/official-docs.md |
Always load the helper script instead of retyping COM boilerplate:
. "$env:USERPROFILE\.codex\skills\visio-automation\scripts\visio_helpers.ps1"
For non-Codex agents, replace the .codex\skills segment with that agent's skills directory.
Useful helpers include:
New-VisibleVisioApplication, New-InvisibleVisioApplication, Get-OpenVisioDocumentByPathOpen-VisioStencilReadOnly, Get-VisioEnvironment, Build-VisioMasterIndex, Find-VisioMasters, Find-SemanticVisioMasterRender-VisioGraphModel, Invoke-VisioGraphLayout, Convert-NaturalLanguageFlowToVisio, Convert-TextFlowToVisio, Convert-MermaidToVisio, Convert-DrawIOToVisio, Convert-ImageReconstructionToVisioSet-VisioTextStyle, Set-VisioShapeFill, Set-VisioShapeBounds, Connect-VisioShapesOrthogonal, Connect-VisioShapesStraight, Connect-VisioShapesCurvedResolve-VisioRoutingIntent, Resolve-VisioRouteDecision, Get-VisioRoutingDefault, Resolve-VisioLoopbackGlueGet-VisioSessionCache, Update-VisioSessionCache, Add-VisioSessionRecentMaster.vsdx, export a preview when useful, verify output and connector behavior, then summarize the result.pwsh for scripts containing UTF-8 Chinese text. Windows PowerShell 5 may misparse UTF-8 files without BOM.OpenEx(..., 66) to avoid save prompts..vsdx XML for editable diagrams; it often lacks the native master and connector behavior the user cares about.