图表可视化
未发现用户侧风险
图表制作器
创建用于概念、架构、流程和白板演示的 SVG/HTML 或 Excalidraw 图表。
文件预览
3 个文件
references
SKILL.md
2.3 KB · 可预览
---
name: diagram-maker
description: Create SVG/HTML or Excalidraw diagrams for concepts, architecture, flows, and whiteboards.
metadata: { "openclaw": { "emoji": "🧭" } }
---
# Diagram Maker
Create diagrams as artifacts, not prose. Choose one output mode:
- `clean-svg`: educational concepts, physical systems, processes, lifecycle, simple data flow.
- `architecture-svg`: software/cloud/infra topology, services, databases, queues, trust zones.
- `excalidraw`: editable hand-drawn whiteboard, flowchart, sequence, architecture sketch.
Routing
- User wants editable/collaborative: choose Excalidraw.
- User wants polished standalone browser output: choose SVG/HTML.
- Software architecture with infra components: choose architecture SVG.
- Science, product, process, concept map, physical object: choose clean SVG.
- Unsure: ask one short question only if output format matters; otherwise choose clean SVG.
Workflow
1. Extract nodes, groups, labels, and directed relationships.
2. Pick layout first: left-to-right, top-down, hub-spoke, swimlanes, layered stack, sequence.
3. Keep labels short. Prefer 5-9 main elements over dense diagrams.
4. Generate the file at the requested path, or `./diagram.html` / `./diagram.excalidraw`.
5. Verify syntax by opening/parsing when feasible.
SVG/HTML rules
- Single standalone `.html` file with inline CSS and inline SVG.
- No external fonts, JS, images, gradients, glows, decorative blobs, or remote assets.
- Use semantic colors, not rainbow sequences: neutral, input, process, storage, external, risk.
- Draw connectors before nodes so arrows sit behind boxes.
- Every connector path has `fill="none"` and a marker arrow when directed.
- Leave 24px text padding inside boxes; do not let text touch borders.
- Legend only when symbols/colors are not obvious.
SVG template
Use `references/svg-template.md` as the wrapper and replace `<!-- SVG -->`.
Excalidraw rules
- Save `.excalidraw` JSON with `type`, `version`, `source`, `elements`, and `appState`.
- Use bound text for shape labels. Do not use a nonstandard `label` property.
- Keep bound text immediately after its container in the elements array.
- Minimum labeled shape: 120x60. Minimum body text: 16px.
- Use roughness `1`, `fontFamily: 1`, and simple fills.
For exact Excalidraw element snippets, read `references/excalidraw-patterns.md`.
SKILL.md
元数据
| name | diagram-maker |
|---|---|
| description | Create SVG/HTML or Excalidraw diagrams for concepts, architecture, flows, and whiteboards. |
| metadata | { "openclaw": { "emoji": "🧭" } } |
图表制作器
以制品形式创建图表,而非描述文字。选择一种输出模式:
clean-svg:用于教育概念、物理系统、流程、生命周期、简单数据流。architecture-svg:软件/云/基础设施拓扑、服务、数据库、队列、信任区域。excalidraw:可编辑的手绘风格白板、流程图、序列图、架构草图。
路由
- 若用户希望可编辑/协作:选择 Excalidraw。
- 若用户希望得到可直接查看的独立浏览器输出:选择 SVG/HTML。
- 涉及软件架构和基础设施组件:选择 architecture SVG。
- 科学、产品、流程、概念图、物理对象:选择 clean SVG。
- 不确定时:仅在输出格式至关重要时才提出一个简短问题;否则选择 clean SVG。
工作流程
- 提取节点、分组、标签和方向关系。
- 首先确定布局:从左到右、从上到下、中心辐射、泳道、分层堆叠、序列。
- 保持标签简短。优先使用 5-9 个主要元素,避免过于密集的图表。
- 在请求的路径或默认
./diagram.html/./diagram.excalidraw位置生成文件。 - 在可行时通过打开/解析验证语法正确性。
SVG/HTML 规则
- 单个独立的
.html文件,包含内联 CSS 和内联 SVG。 - 不使用外部字体、JS、图片、渐变、发光效果、装饰性元素或远程资源。
- 使用有语义的颜色,而非彩虹序列:中性色、输入、处理、存储、外部、风险。
- 在绘制节点之前先绘制连接线,使箭头位于框图之后。
- 每个有方向的连接路径均设置
fill="none"和标记箭头。 - 框内文本上下左右留 24px 内边距;文本不与边框接触。
- 仅当符号/颜色不易自明时才添加图例。
SVG 模板
使用 references/svg-template.md 作为包装,并替换其中的 <!-- SVG -->。
Excalidraw 规则
- 保存
.excalidrawJSON 文件,包含type、version、source、elements和appState。 - 使用绑定文本(bound text)作为形状标签,不要使用非标准的
label属性。 - 绑定文本紧跟其容器元素之后放置于 elements 数组中。
- 带标签的形状最小尺寸:120x60。正文字体最小 16px。
- 使用
roughness: 1、fontFamily: 1和简单的填充样式。
要查看精确的 Excalidraw 元素片段,请参阅 references/excalidraw-patterns.md。