name: graphviz-renderer description: 将Graphviz DOT图渲染为图像,支持多种布局算法 allowed-tools:
- Bash
- Read
- Write
- Glob
Graphviz DOT渲染器技能
概述
将Graphviz DOT图定义渲染为图像,支持多种布局算法,用于依赖关系可视化和大型图渲染。
能力
- 将DOT图渲染为PNG、SVG、PDF、PS格式
- 多种布局算法(dot、neato、fdp、sfdp、twopi、circo)
- 使用sfdp算法支持大型图
- 依赖关系可视化
- 自定义节点和边样式
- 子图和集群支持
目标流程
- 微服务分解
- DDD战略建模
- 可观测性实施
输入模式
{
"type": "object",
"required": ["source"],
"properties": {
"source": {
"type": "string",
"description": "DOT图定义"
},
"outputFormat": {
"type": "string",
"enum": ["png", "svg", "pdf", "ps"],
"default": "svg"
},
"outputPath": {
"type": "string",
"description": "输出文件路径"
},
"layout": {
"type": "string",
"enum": ["dot", "neato", "fdp", "sfdp", "twopi", "circo"],
"default": "dot",
"description": "布局算法"
},
"config": {
"type": "object",
"properties": {
"dpi": {
"type": "number",
"default": 96
},
"rankdir": {
"type": "string",
"enum": ["TB", "BT", "LR", "RL"],
"default": "TB"
}
}
}
}
}
输出模式
{
"type": "object",
"properties": {
"outputPath": {
"type": "string",
"description": "渲染图像路径"
},
"format": {
"type": "string"
},
"nodeCount": {
"type": "number"
},
"edgeCount": {
"type": "number"
}
}
}
使用示例
{
kind: 'skill',
skill: {
name: 'graphviz-renderer',
context: {
source: 'digraph G { A -> B -> C; A -> C; }',
outputFormat: 'svg',
outputPath: 'docs/diagrams/dependencies.svg',
layout: 'dot'
}
}
}