基于文字说明或结构信息,生成可直接在 Excalidraw 中打开的手绘风 `.excalidraw` 图表;支持系统架构图、流程图、数据结构图与自由白板草图,输出标准 Excalidraw JSON。
56
62%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./skills/excalidraw-diagram/SKILL.md本 Skill 指导 Agent 生成标准的 Excalidraw 图表文件(.excalidraw JSON),在浏览器、Obsidian、VSCode 等集成了 Excalidraw 的环境中可直接打开和继续编辑。
请引导用户尽量按照如下结构提供信息(中文即可):
【图类型】:系统架构图 / 流程图 / 数据结构图 / 自由草图
【内容来源】:自由描述 / 论文大纲 / 代码结构 / 接口列表 等
【核心要素】:
若用户只给出自然语言描述,Agent 需先在脑中整理出「节点列表 + 关系列表」,再进行画图。
解析输入,构建抽象模型
简单布局策略(坐标分配)
x, y 坐标,例如:同层 y 固定、x 按索引递增;不同层 y 按层级间距递增。Excalidraw 元素生成约定(含默认箭头与配色)
节点元素(默认样式):
rectangle 或 round rectangle 表示模块/实体/步骤。backgroundColor: "transparent",strokeColor: "#1e1e1e")。backgroundColor: "#f5f5ff" 或类似),同一类模块颜色一致。groupIds 将同一子系统下的节点分到同一分组,方便用户后续整体移动。连线元素(默认箭头):
arrow 连接相关节点,points 按起点到终点直线或略带折线。strokeWidth 稍大),辅助关系可以用细线或浅色。整体风格:
Excalidraw 文件结构要求
.excalidraw JSON 结构,至少包含:
type: "excalidraw"version 与 source(可标注为 "cursor-skill-excalidraw-diagram")elements: 图元数组appState 与 files(若无图片等,可给出合理的默认空结构)Agent 输出必须严格分为两部分:
Part 1 [Diagram Explanation]:
Part 2 [Excalidraw JSON]:
.excalidraw 文件的 JSON。https://github.com/excalidraw/excalidrawhttps://excalidraw.com/fd28854
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.