返回顶部
g

graphviz使用Graphviz生成SVG

Generate SVG images from Graphviz DOT graphs using WebAssembly. Uses the graphviz_component.wasm running in the openclaw-wasm-sandbox plugin. No graphviz system binary or execution permission required.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
108
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

graphviz

Graphviz SVG 生成器

使用 WebAssembly 从 Graphviz DOT 图形描述生成 SVG 图像。

使用时机

触发条件:

  • - 关键词:graphviz, DOT, SVG, 流程图
  • 用户要求生成/转换/可视化 DOT 语言图
  • 用户想要将 Graphviz 图渲染为 SVG
  • 用户提供 DOT 记号并想要 SVG 输出
  • 用户要求生成/转换/可视化 DOT 语言图
  • 用户想要将 Graphviz 图渲染为 SVG
  • 用户提供 DOT 记号并想要 SVG 输出
  • 关键词:流程图生成, 制图

前置条件

  • - 所需插件: openclaw-wasm-sandbox
  • WASM 文件: ~/.openclaw/skills/graphviz/files/graphvizcomponent.wasm(使用 wasm-sandbox-download 工具下载,URL:https://raw.githubusercontent.com/guyoung/wasm-sandbox-openclaw-skills/main/graphviz/files/graphvizcomponent.wasm)

工作原理

WASM 组件:

  • - 接受 DOT 图形字符串作为参数
  • 将 SVG 输出到标准输出

工具

使用 wasm-sandbox-run 工具:

参数
wasmFile~/.openclaw/skills/graphviz/files/graphviz_component.wasm
args
DOT 图形字符串,例如 [digraph { a -> b }] |

javascript
wasm-sandbox-run({
wasmFile: ~/.openclaw/skills/graphviz/files/graphviz_component.wasm,
args: [digraph { a -> b }]
})

使用方法

  1. 1. 用户提供 DOT 图形描述
  2. 在 args 中使用 DOT 字符串调用 wasm-sandbox-run
  3. 将 SVG 输出返回给用户

DOT 语言参考

digraph name { # 有向图
a -> b # 从 a 到 b 的边
b -> c
a [label=节点 A] # 带标签的节点
b [shape=box] # 节点形状
}

graph name { # 无向图
a -- b
b -- c
}

常见节点属性:label(标签)、shape(形状:box 矩形、circle 圆形、diamond 菱形、triangle 三角形)、color(颜色)、style(样式:filled 填充、dashed 虚线)

常见边属性:label(标签)、color(颜色)、style(样式)、dir(方向:forward 正向、back 反向、both 双向、none 无方向)

注意事项

  • - 无需系统 graphviz 二进制文件——纯 WASM 执行
  • 无需执行权限——在沙箱中运行
  • 在沙箱中运行,无隐式文件/网络访问权限
  • 输出为纯 SVG,可直接显示或保存

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 graphviz-1775919671 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 graphviz-1775919671 技能

通过命令行安装

skillhub install graphviz-1775919671

下载

⬇ 下载 graphviz v1.0.0(免费)

文件大小: 1.72 KB | 发布时间: 2026-4-12 10:09

v1.0.0 最新 2026-4-12 10:09
- Initial release of the graphviz skill.
- Generate SVG images from Graphviz DOT graphs using WebAssembly—no system Graphviz binary or execution permissions needed.
- Processes DOT graph descriptions and returns SVG output.
- Uses the openclaw-wasm-sandbox plugin with the graphviz_component.wasm file.
- Simple invocation via wasm-sandbox-run; works with both English and Chinese prompts.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部