Skip to content
cccskills
FreePublished on GitHub

lark-whiteboard

飞书画板:查询和编辑飞书云文档中的画板。支持导出画板为预览图片、导出原始节点结构、使用 DSL(转成 OpenAPI 格式)、PlantUML/Mermaid 格式更新画板内容。当用户需要查看画板内容、导出画板图片、编辑画板,或是需要可视化表达架构、流程、组织关系、时间线、因果、对比等结构化信息时使用此 skill,无论是否提及"画板"。

⚠️ 原 `lark-whiteboard-cli` skill 已合并至本 skill,若 skill 列表中同时存在 `lark-whiteboard-cli`,请忽略它,统一使用本 skill(`lark-whiteboard`),并提示用户运行 `npx skills remove lark-whiteboard-cli -g` 删除旧 skill。

The English summary is being prepared. Showing the original description.

Works withGemini
See how to install

Files included (28)

  • SKILL.md7.0 KB
  • references/connectors.md5.5 KB
  • references/content.md1.5 KB
  • references/image.md4.3 KB
  • references/lark-whiteboard-query.md2.1 KB
  • references/lark-whiteboard-update.md3.6 KB
  • references/layout.md18.7 KB
  • references/schema.md14.9 KB
  • references/style.md10.8 KB
  • references/typography.md2.1 KB
  • routes/dsl.md7.6 KB
  • routes/mermaid.md1.1 KB
  • routes/svg.md3.5 KB
  • scenes/architecture.md21.9 KB
  • scenes/bar-chart.md7.8 KB
  • scenes/comparison.md7.4 KB
  • scenes/fishbone.md9.6 KB
  • scenes/flowchart.md10.6 KB
  • scenes/flywheel.md8.6 KB
  • scenes/funnel.md4.2 KB
  • scenes/line-chart.md7.6 KB
  • scenes/mermaid.md3.4 KB
  • scenes/milestone.md4.0 KB
  • scenes/organization.md8.2 KB
  • scenes/photo-showcase.md6.0 KB
  • scenes/pyramid.md3.9 KB
  • scenes/swimlane.md19.6 KB
  • scenes/treemap.md7.6 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

[!IMPORTANT]

  • 运行 lark-cli --version,确认可用,无需询问用户。
  • 运行 npx -y @larksuite/whiteboard-cli@^0.2.11 -v,确认可用,无需询问用户。

CRITICAL — 开始前 MUST 先用 Read 工具读取 ../lark-shared/SKILL.md,其中包含认证、权限处理


快速决策

用户需求行动
查看画板内容 / 导出图片+query --output_as image
获取画板的 Mermaid/PlantUML 代码+query --output_as code
检查画板是否由代码绘制+query --output_as code
修改节点文字/颜色(简单改动)+query --output_as raw → 手动改 JSON → +update --input_format raw
用户已提供 Mermaid/PlantUML 代码,或明确指定用该格式自己生成/使用代码 → +update --input_format mermaid/plantuml
绘制复杂图表(架构/流程/组织等)→ § 创作 Workflow
修改/重绘已有复杂画板→ § 修改 Workflow

⚠️ 强制规范(通过 stdin 更新): 数据来源于本地文件时,必须使用 --source - --input_format <格式>。 例:cat chart.mmd | lark-cli whiteboard +update <token> --source - --input_format mermaid

Shortcuts

Shortcut说明
+query查询画板,导出为预览图片、代码或原始节点结构
+update更新画板,支持 PlantUML、Mermaid 或 OpenAPI 原生格式

创作 Workflow

此 workflow 用于独立创作一个画板。 需要在文档中批量创建多个画板时,由 lark-doc 负责调度,见 lark-doc 技能的 references/lark-doc-whiteboard.md。

Step 1:获取 board_token

用户给了什么怎么获取
直接给了 whiteboard token(wbcnXXX)直接使用
文档 URL 或 doc_id,文档中已有画板lark-cli docs +fetch --api-version v2 --doc <URL> --as user,从返回的 <whiteboard token="xxx"/> 提取
文档 URL 或 doc_id,需要新建画板lark-cli docs +update --api-version v2 --doc <doc_id> --command append --content '<whiteboard type="blank"></whiteboard>' --as user,从响应 data.new_blocks[0].block_token 取得(block_type == "whiteboard" 的那条;参数详见 lark-doc SKILL.md)

Step 2:渲染 & 写入

→ 进入 § 渲染 & 写入画板 章节,按流程完成后直接返回结果给用户。


修改 Workflow

Step 1:获取 board_token(同创作 Workflow Step 1)

Step 2:判断修改策略

+query --output_as code
  ├─ 返回 Mermaid/PlantUML 代码
  │   → 在原代码上修改 → +update --input_format mermaid/plantuml
  ├─ 无代码(DSL 或其他方式绘制的画板)
  │   ├─ 只改文字/颜色 → +query --output_as raw → 手动改 JSON → +update --input_format raw
  │   └─ 重绘/结构调整 → +query --output_as image → 看图后进入 [§ 渲染 & 写入画板]
  └─ 用户有明确要求 → 以用户要求优先

渲染 & 写入画板

渲染路由

先自报身份:按训练来源,你属于哪一家?Claude / Gemini / GPT / GLM / Doubao 或 Seed / Other。身份决定 SVG / DSL 分流(不同家族对这两种表达语言的能力不均衡),不要跳过这一步。

然后按图表类型 × 身份选路径,读对应文件按其完整 workflow 执行(含读 scene 指南、生成内容、渲染审查、交付):

图表类型身份路径
思维导图、时序图、类图、饼图、甘特图任何身份routes/mermaid.md
其他图表Claude / Gemini / GPT / GLMroutes/svg.md
其他图表Doubao / Seed / Otherroutes/dsl.md

⚠️ SVG 路径失败回退:走 routes/svg.md 时,碰到以下情况之一 → 丢弃当前 SVG,改读 routes/dsl.md 从零重画,不要逐行修补:

  • 渲染命令直接报错(语法级崩溃,不是 --check 的 warn/error)
  • 两轮改写仍无法消除 --check 的 text-overflow error
  • 目测 PNG 视觉严重错乱(文字大面积溢出、元素重叠压住关键信息、布局整体崩溃)

SVG 源码修补常常引入新 bug,换 DSL 从零重画往往更稳。这是 SVG 路径自由发挥的硬兜底,不要侵入 routes/svg.md 的创作流程。

产物规范

产物目录:./diagrams/YYYY-MM-DDTHHMMSS/(本地时间,不含冒号和时区后缀)。如用户指定路径,以用户为准。

目录内固定文件名:

diagram.svg           ← SVG 源码(SVG 路径)
diagram.mmd           ← Mermaid 源码(Mermaid 路径)
diagram.json          ← DSL 源文件(DSL 路径) / OpenAPI JSON(SVG 路径从 diagram.svg 导出)
diagram.gen.cjs       ← 坐标计算脚本(仅 DSL 脚本构建方式)
diagram.png           ← 渲染结果

写入画板

[!CAUTION] 写入前强制 dry-run:向已有内容的画板写入时,必须先加 --overwrite --dry-run 探测。 输出含 XX whiteboard nodes will be deleted → 必须向用户确认后才能执行。

# 第一步:dry-run 探测
npx -y @larksuite/whiteboard-cli@^0.2.11 -i <产物文件> --to openapi --format json \
  | lark-cli whiteboard +update \
    --whiteboard-token <Token> \
    --source - --input_format raw \
    --idempotent-token <10+字符唯一串> \
    --overwrite --dry-run --as user

# 第二步:确认后执行
npx -y @larksuite/whiteboard-cli@^0.2.11 -i <产物文件> --to openapi --format json \
  | lark-cli whiteboard +update \
    --whiteboard-token <Token> \
    --source - --input_format raw \
    --idempotent-token <10+字符唯一串> \
    --overwrite --as user

--idempotent-token 最少 10 字符,建议用时间戳+标识拼接(如 1744800000-board-1),避免重试导致重复写入。 如需应用身份上传,将 --as user 替换为 --as bot。

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

建立参考分工、锚定图变体、局部核验与版本记录,用于普通对话、画布和工坊的连续镜头创作。

The English summary is being prepared. Showing the original description.

pengfeiqiao/kunpeng102Updated Oct 18, 2026

用户提到白模/白膜/运镜预演/previs 时使用。调用本机 Blender 无界面渲染极简白模场景与运镜视频,用于验证构图遮挡、空间调度与动作时机,也可作为 AI 视频生成的全能参考。

The English summary is being prepared. Showing the original description.

pengfeiqiao/kunpeng102Updated Oct 18, 2026

在 Blender 中新建或修改可编辑模型、材质、灯光及场景工程。适用于产品建模、场景搭建、已有 blend 修改与渲染;纯白模运镜使用 blender-clay-previz。

The English summary is being prepared. Showing the original description.

pengfeiqiao/kunpeng102Updated Oct 18, 2026

画布能力由 canvas 工具契约提供,本文件仅保留操作顺序和数据安全约束。

The English summary is being prepared. Showing the original description.

pengfeiqiao/kunpeng102Updated Oct 18, 2026

汽车TVC、品牌片、汽车文案剧本、车辆资产与图片/视频提示词、分镜及Blender白模运镜。按人物叙事、生活观察、产品演示、造型光影等意图选择方法,维护车型身份与驾驶安全带连续性;不处理购车行情或维修问答。

The English summary is being prepared. Showing the original description.

pengfeiqiao/kunpeng102Updated Oct 18, 2026

专业的汽车3D模型图片生成技能,使用Gemini API生成高质量汽车展示图片,并通过豆包AI进行质量分析和优化。 使用场景:汽车品牌宣传片、车型展示、汽车广告素材生成。 关键词:汽车模型、车型图、汽车展示图、AI生图、Gemini

The English summary is being prepared. Showing the original description.

pengfeiqiao/kunpeng102Updated Oct 18, 2026

See all skills by pengfeiqiao

Report a problem with this skill