name: plantuml-renderer description: 将 PlantUML 图表渲染为多种图像格式,支持主题和样式 allowed-tools:
- Bash
- Read
- Write
- Glob
PlantUML 渲染器技能
概述
将 PlantUML 源文件渲染为图像,支持序列图、类图、组件图和部署图,提供自定义主题和批量处理功能。
能力
- 将 PlantUML 渲染为 PNG、SVG、PDF 和 EPS 格式
- 支持序列图、类图、组件图、部署图、活动图和状态图
- 应用自定义主题和样式
- 批量渲染多个图表
- 为交互式图表生成图像映射
- 支持 PlantUML 预处理器指令
目标流程
- c4-模型文档
- DDD战略建模
- 事件风暴
- 数据架构设计
输入模式
{
"type": "object",
"required": ["source"],
"properties": {
"source": {
"type": "string",
"description": "PlantUML 源代码或文件路径"
},
"outputFormat": {
"type": "string",
"enum": ["png", "svg", "pdf", "eps"],
"default": "png"
},
"outputPath": {
"type": "string",
"description": "输出文件路径"
},
"theme": {
"type": "string",
"description": "PlantUML 主题名称(例如 'cerulean', 'superhero')"
},
"config": {
"type": "object",
"properties": {
"skinParams": {
"type": "object",
"description": "PlantUML 皮肤参数设置"
},
"scale": {
"type": "number",
"default": 1
}
}
}
}
}
输出模式
{
"type": "object",
"properties": {
"outputPath": {
"type": "string",
"description": "渲染图像的路径"
},
"format": {
"type": "string"
},
"dimensions": {
"type": "object",
"properties": {
"width": { "type": "number" },
"height": { "type": "number" }
}
},
"metadata": {
"type": "object"
}
}
}
使用示例
{
kind: 'skill',
skill: {
name: 'plantuml-renderer',
context: {
source: '@startuml
Alice -> Bob: Hello
@enduml',
outputFormat: 'svg',
outputPath: 'docs/diagrams/sequence.svg',
theme: 'cerulean'
}
}
}