闲社服务运行正常AI智能体自动化平台
e

生成手绘风格图表

技能标识:excalidraw

Generate hand-drawn style diagrams, flowcharts, and architecture diagrams as PNG images from Excalidraw JSON

作者:admin | 来源记录:ClawHub
登记来源
ClawHub
版本
V 1.0.0
检测标记
后台标记通过
免费
免费获取
11
收藏
来源与检测标记为平台登记信息,并不代表已展示可复核的检测报告。使用前请核对版本、依赖和所需权限,建议先在隔离环境中运行。
概述
安装方式
版本历史

生成手绘风格图表

Excalidraw 图表生成器

生成以PNG图像形式呈现的优美手绘风格图表。

工作流程

  1. 1. 生成JSON — 根据用户需求编写Excalidraw元素数组
  2. 保存到文件 — 将JSON写入 /tmp/<名称>.excalidraw
  3. 渲染 — node <技能目录>/scripts/render.js /tmp/<名称>.excalidraw /tmp/<名称>.png
  4. 发送 — 通过消息工具发送PNG文件,附带 filePath

快速参考

bash
node <技能目录>/scripts/render.js 输入文件.excalidraw 输出文件.png

元素类型

类型形状关键属性
rectangle矩形x, y, width, height
ellipse
椭圆 | x, y, width, height | | diamond | 菱形 | x, y, width, height | | arrow | 箭头 | 连接形状(参见下方箭头绑定) | | line | 线条 | x, y, points: [[0,0],[dx,dy]] | | text | 文本标签 | x, y, text, fontSize, fontFamily (1=手写体, 2=无衬线体, 3=等宽体) |

样式设置(适用于所有形状)

json
{
strokeColor: #1e1e1e,
backgroundColor: #a5d8ff,
fillStyle: hachure,
strokeWidth: 2,
roughness: 1,
strokeStyle: solid
}

fillStyle: hachure(斜线填充), cross-hatch(交叉填充), solid(实心填充)
roughness: 0=整洁, 1=手绘风格(默认), 2=非常潦草

箭头绑定(重要)

箭头必须使用 from/to 绑定。 渲染器会自动计算边缘交点——无需手动计算坐标。

简单箭头(直线,连接两个形状)

json {type:arrow,id:a1,from:box1,to:box2,strokeColor:#1e1e1e,strokeWidth:2,roughness:1}

仅此而已。无需提供 x、y 或 points 属性。渲染器会自动计算形状边缘的起点/终点。

多段箭头(带路径点的绕行路线)

对于需要绕过障碍物的箭头,使用带中间路径点的 absolutePoints: json { type:arrow,id:a2,from:box3,to:box1, absolutePoints: true, points: [[375,500],[30,500],[30,127],[60,127]], strokeColor:#1e1e1e,strokeWidth:2,roughness:1 }
  • - 第一个点 = 靠近源形状边缘(将自动吸附到实际边缘)
  • 最后一个点 = 靠近目标形状边缘(将自动吸附到实际边缘)
  • 中间点 = 用于路径规划的绝对路径点坐标

箭头标签

在箭头中点附近放置一个独立的文本元素: json {type:text,id:label,x:215,y:98,width:85,height:16,text:发送数据,fontSize:10,fontFamily:1,strokeColor:#868e96}

箭头样式

  • - strokeStyle:dashed — 虚线
  • startArrowhead: true — 双向箭头

模板:带绑定的流程图

json
{
type: excalidraw,
version: 2,
elements: [
{type:rectangle,id:start,x:150,y:50,width:180,height:60,strokeColor:#1e1e1e,backgroundColor:#b2f2bb,fillStyle:hachure,strokeWidth:2,roughness:1},
{type:text,id:t1,x:200,y:65,width:80,height:30,text:开始,fontSize:20,fontFamily:1,strokeColor:#1e1e1e},

{type:arrow,id:a1,from:start,to:decision,strokeColor:#1e1e1e,strokeWidth:2,roughness:1},

{type:diamond,id:decision,x:140,y:170,width:200,height:120,strokeColor:#1e1e1e,backgroundColor:#ffec99,fillStyle:hachure,strokeWidth:2,roughness:1},
{type:text,id:t2,x:185,y:215,width:110,height:30,text:条件?,fontSize:18,fontFamily:1,strokeColor:#1e1e1e,textAlign:center},

{type:arrow,id:a2,from:decision,to:process,strokeColor:#1e1e1e,strokeWidth:2,roughness:1},

{type:rectangle,id:process,x:150,y:350,width:180,height:60,strokeColor:#1e1e1e,backgroundColor:#a5d8ff,fillStyle:hachure,strokeWidth:2,roughness:1},
{type:text,id:t3,x:190,y:365,width:100,height:30,text:处理,fontSize:20,fontFamily:1,strokeColor:#1e1e1e}
]
}

布局指南

  • - 节点尺寸:140-200 × 50-70 像素
  • 菱形:180-200 × 100-120 像素(为文本留出更高空间)
  • 垂直间距:节点之间 60-100 像素
  • 水平间距:节点之间 80-120 像素
  • 文本:手动放置在形状内部(距形状左上角偏移约 15-30 像素)
  • 箭头标签:作为独立文本元素放置在箭头路径中点附近

调色板

填充色:#a5d8ff(蓝色), #b2f2bb(绿色), #ffec99(黄色), #ffc9c9(红色), #d0bfff(紫色), #f3d9fa(粉色), #fff4e6(奶油色)
描边色:#1e1e1e(深色), #1971c2(蓝色), #2f9e44(绿色), #e8590c(橙色), #862e9c(紫色)
标签色:#868e96(灰色,用于注释)

提示

  • - 每个元素都需要唯一的 id(绑定必需!)
  • 箭头使用 from/to 属性——不要手动计算坐标
  • roughness:0 用于整洁图表,1 用于手绘风格
  • 文本 fontFamily:1 用于手写体,3 用于等宽体
  • 按空间分组相关元素,按类型进行颜色编码
  • 对于嵌套布局,使用大的背景矩形作为容器

标签

skill ai

通过对话安装

以下为平台配置的接入选项,并非逐项实测通过。能否安装取决于客户端支持、技能来源和运行环境:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 excalidraw-1776092045 技能

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

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

通过命令行安装

skillhub install excalidraw-1776092045

下载

⬇ 下载 excalidraw v1.0.0(免费)

文件大小: 20.11 KB | 发布时间: 2026-4-14 11:52

v1.0.0 最新 2026-4-14 11:52
Initial release: hand-drawn style diagrams from Excalidraw JSON with auto-binding arrows, roughjs rendering, Virgil/Cascadia fonts
返回顶部