Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
larksuite avatar

Lark Whiteboard

  • 387k installs
  • 15.9k repo stars
  • Updated July 28, 2026
  • larksuite/cli

This is a copy of lark-whiteboard by open.feishu.cn - installs and ranking accrue to the original listing.

lark-whiteboard is a lark-cli agent skill that generates valid Feishu/Lark Whiteboard documents with correctly placed connectors, automatic routing, and schema-compliant node arrays for developers producing diagrams from

About

lark-whiteboard is a larksuite/cli agent skill for generating Feishu/Lark Whiteboard (Board) documents with schema-compliant structure. WBDocument version 2 requires connector nodes in the root nodes array—not nested inside frame children—or schema errors occur. Connector strategy scales by count: draw individually for ≤8 lines, representative cross-layer links for 9–15, and layer-to-layer or simplified grouping beyond 15. Default arrow rules set endArrow to arrow and startArrow to none. Developers reach for lark-whiteboard when visualizing architecture, flows, or embedded board content referenced from lark-doc tokens. Polyline auto-routing recommends specifying node ids and letting the engine infer exit directions.

  • Connector must be placed at root nodes array, never inside frame children
  • Automatic polyline routing when only node IDs are supplied (no waypoints)
  • Default arrow behavior: endArrow='arrow', startArrow='none'
  • Layered connection strategies based on total link count (≤8, 9-15, >15)
  • Supports precise coordinate arrows, dashed curves, and forced waypoint paths

Lark Whiteboard by the numbers

  • 386,952 all-time installs (skills.sh)
  • Security screen: HIGH risk (skills.sh audit)
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
npx skills add https://github.com/larksuite/cli --skill lark-whiteboard

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs387k
repo stars15.9k
Security audit2 / 3 scanners passed
Last updatedJuly 28, 2026
Repositorylarksuite/cli

How do you generate Feishu whiteboard diagrams programmatically?

Generate valid Lark Whiteboard (Feishu Board) documents with correctly placed connectors, automatic routing, and proper schema compliance directly from agent inst

Who is it for?

Developers producing architecture or flow diagrams as Feishu Whiteboard documents with correct connector placement and routing from agents.

Skip if: Skip lark-whiteboard for editing Docx prose or Base table data—use lark-doc or lark-base for text and record workflows.

When should I use this skill?

User needs a Feishu whiteboard diagram, architecture flowchart, or schema-compliant Board document with connectors and frames.

What you get

Valid WBDocument version 2 JSON with frames, root-level connectors, and correctly routed arrows ready for Feishu Board upload.

  • WBDocument JSON
  • whiteboard diagram with connectors

By the numbers

  • Uses WBDocument schema version 2
  • Connector tiers at ≤8, 9-15, and >15 line counts

Files

SKILL.mdMarkdownGitHub ↗

连线系统

连线策略

连线数策略
≤8逐条画
9-15代表性连线(每层选 1-2 个节点连到下一层)
>15层到层连线,或回退精简分组

一个节点有 3+ 条连线时:入线从 top,出线从 bottom,同侧多条线用不同方向分散。

---

connector 必须放根 nodes 数组

// 错误:connector 放在 frame children 里
{ type: 'frame', children: [
  { type: 'connector', ... }  // 会导致 Schema 报错或无法连线!
]}

// 正确:connector 放在根 nodes 数组
const doc: WBDocument = {
  version: 2,
  nodes: [
    { type: 'frame', id: 'box', ... },
    { type: 'connector', ... },  // 必须和顶层 frame 平级
  ],
};

---

箭头默认值

  • endArrow 省略时默认为 'arrow'(即连线末端默认带箭头)。
  • startArrow 省略时默认为 'none'(即连线起始端默认无箭头)。

---

连线技巧

// 自动绕线(推荐):仅需指定节点 id(引擎可自动推断最优出线方向),并使用 polyline 或 rightAngle 形状
// 只要不传 waypoints,引擎会尝试自动避开障碍物并生成折线。
{ type: 'connector', connector: {
  from: 'a', to: 'b', // fromAnchor 和 toAnchor 也可以省略,让引擎自己找最短路径
  lineShape: 'polyline', lineColor: '#000000', lineWidth: 2, endArrow: 'arrow' }}

// 精确坐标(做注解箭头)
{ type: 'connector', connector: {
  from: { x: 150, y: 200 }, to: 'b', toAnchor: 'left',
  lineShape: 'curve', lineColor: '#BBBFC4', lineWidth: 2,
  lineStyle: 'dashed', endArrow: 'triangle' }}

// 手动控制路径点 waypoints(仅在需要强制固定路线、或者自动路由不符合预期时使用)
// 注意:一旦提供了 waypoints,引擎将严格尊重这些点,不再进行自动避障。
{ type: 'connector', connector: {
  from: { x: 300, y: 140 }, to: { x: 300, y: 340 },
  waypoints: [{ x: 350, y: 140 }, { x: 350, y: 340 }],
  lineShape: 'polyline', lineColor: '#000000', lineWidth: 2, endArrow: 'arrow' }}

// 绘制坐标轴/数轴(必须使用 straight,防止刻度文字触发自动避障导致线条弯曲)
{ type: 'connector', connector: {
  from: { x: 100, y: 400 }, to: { x: 600, y: 400 },
  lineShape: 'straight', lineColor: '#000000', lineWidth: 2, endArrow: 'arrow' }}
[!IMPORTANT]
1. 形状选用要求(核心),需明确 lineShape 类型:
- `'polyline'`(圆角折线)默认首选。适用于流程图、架构图等绝大多数场景。支持引擎的自动绕线与避障功能(只需指定 fromto)。
- `'rightAngle'`(直角折线):适用于明确要求“总线/直角规约”、树状层级严格对齐的场景,同样支持自动绕线与避障
- `'straight'`(直线):不受自动避障机制的影响,适用于坐标轴、数轴、几何图形边框、直接指向关系等要求线条绝对笔直、不允许出现任何绕行或弯曲的场景。
- `'curve'`(曲线):适用于优雅的跨层连线(S型弯)、自由发散的脑图分支、或做注解箭头时。
- 注意:你需要根据当前绘制的图表类型和上下文语境,选择最合适的 lineShape。不要盲目全部使用 polyline,例如在绘制坐标系时必须主动切换为 straight
2. 间距要求:有 connector 连线的卡片间 gap 需 ≥ 40,否则箭头挤在缝里看不清。
3. 顶层约束connector 必须直接放在 WBDocument.nodes严禁嵌套在 children 内。建议在数据末尾统一声明连线。

>

[!TIP]
自动绕线 vs 手动控制
- 优先依赖自动绕线:对于 'polyline''rightAngle',引擎会自动规划路径并尝试避开障碍物(fromAnchortoAnchor 也可省略,引擎会自动推断最优出线方向),这是最推荐的方式。
- 何时手动算 waypoints仅在必要时(例如自动路由不符合预期,或者必须强制走特定形状绕开特定元素时),才需要通过 waypoints 手动接管坐标序列。

>

连线标签
- 连线文字说明:需要文字说明时,可用 label 标注。

---

锚点方向规则

锚点(top/right/bottom/left)表示连线从节点的哪个边出发,方向含义与 CSS border 四边相同。

注意:由于目前自动绕线功能支持省略锚点让引擎自动推断,以下规则主要适用于你想强制控制出线方向,或者使用直线/曲线时的场景。

选择锚点时根据两个节点的相对位置:目标在下方用 fromAnchor: 'bottom' + toAnchor: 'top',目标在右侧用 fromAnchor: 'right' + toAnchor: 'left'。如果手动指定了锚点,必须与节点的实际相对位置匹配,否则可能导致连线反向绕行。

锚点绑定的常见范式

  • 同层横向推进(目标在正右):fromAnchor: "right" -> toAnchor: "left"
  • 垂直下沉推进(目标在正下):fromAnchor: "bottom" -> toAnchor: "top"
  • 跨层斜切推进(目标在左下或右下):首选 `fromAnchor: "bottom"` -> `toAnchor: "top"`。由于线段自身带有重力倾向,从底部出线再弯曲进入下一层顶部,完美契合流水线的 S 型大弯,能画出最优雅顺滑的跨层曲线。避免使用左右锚点互相跨接。
  • 逆流回捞(底部发散回指顶部原点):首选 `fromAnchor: "top"` -> `toAnchor: "bottom"` 配合 lineStyle: "dashed"

内容规划

核心原则:信息量匹配用户需求的详细程度。 用户说"画一个简单架构图"就画简单的,说"画一个完整的微服务架构"才画复杂的。不要自作主张过度展开

用户 prompt 简短/模糊时(如"画个漏斗图"、"画个架构图"),不要只输出字面内容。应适当补充该领域合理的内容

信息量参考

用户需求合理的信息量
"画一个简单的 XX 架构图"3 层,每层 2-3 节点,无侧边栏
"画一个 XX 架构图"(普通请求)3-4 层,每层 3-4 节点
"画一个完整/详细的 XX 架构图"4-5 层,每层 4-6 节点,可加侧边栏(侧边栏最多 2-3 项)
流程图6-10 步骤 + 1-2 个条件分支
对比表4-6 个维度,每格 1-2 行说明
组织架构3-4 层,每个父节点下 2-4 个子节点

节点文字:标题 + 简短说明(如"用户服务\n注册登录和权限管理"),不要写长段落。说明 12 字以内为佳。

分组

每组 2-5 个节点。超过 5 个拆成子组。

连线预判

连线数策略
≤8逐条画
9-15代表性连线
>15层到层,或回退精简

精简触发条件

布局放不下时才精简:

问题精简方式
节点文字放不下缩短描述文字
一行

Related skills

FAQ

Where must connectors go in lark-whiteboard JSON?

lark-whiteboard requires connector nodes in the root nodes array of WBDocument version 2, parallel to frame nodes. Nesting connectors inside frame children causes schema errors or broken links.

How does lark-whiteboard scale connector drawing?

lark-whiteboard draws connectors individually for ≤8 lines, uses representative cross-layer links for 9–15 connections, and falls back to layer-to-layer or simplified grouping when more than 15 connectors are needed.

Is Lark Whiteboard safe to install?

skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

Design & UI/UXfrontendintegrations

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.