lark-whiteboard

Query and edit Lark whiteboards by exporting previews, extracting diagram code, and updating nodes via CLI.

Updated Mar 30, 2026
One-click install
npx skills add https://github.com/TrayMachi/dotfiles --skill lark-whiteboard-traymachi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lark-whiteboard
Source: https://github.com/TrayMachi/dotfiles/tree/main/agents/skills/lark-whiteboard
Command: npx skills add https://github.com/TrayMachi/dotfiles --skill lark-whiteboard-traymachi

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @larksuite/whiteboard-cli, and includes references (resource) components.

What problem does it solve? Viewing and editing Lark (Feishu) cloud document whiteboards programmatically is difficult because the native OpenAPI node format is verbose and hard to author by hand. This Skill provides structured workflows to export whiteboards as preview images or code, and to create or update complex diagrams (architecture, flowchart, funnel, fishbone, bar chart, and more) through Mermaid, PlantUML, or a DSL rendered by whiteboard-cli. ## Core Features & Use Cases - Whiteboard Querying: Export a whiteboard as a preview image, extract embedded Mermaid/PlantUML code, or dump the raw OpenAPI node structure for inspection. - Whiteboard Updating: Write content back using Mermaid, PlantUML, or raw OpenAPI JSON, with idempotent tokens and optional overwrite semantics. - Guided Diagram Authoring: Scene-specific guides and script templates (architecture, flowchart, comparison, funnel, flywheel, fishbone, bar/line charts) generate correct DSL JSON with layout, connector, and styling rules. - Use Case: A user asks to draw a microservices architecture diagram in an existing Feishu doc. The Skill fetches the whiteboard token, generates DSL JSON via a Node script, renders a PNG for review, converts it to OpenAPI format, and writes it into the whiteboard. ## Quick Start Ask the assistant to export the whiteboard in your Feishu document as a preview image, or to draw a layered architecture diagram into it using the lark-whiteboard skill.

Frequently Asked Questions about lark-whiteboard

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I export a Lark whiteboard as an image?

Run lark-cli whiteboard +query with the --whiteboard-token of the board, --output_as image, and an --output path such as ./preview.png. You need read permission on the whiteboard, and authentication is handled through the shared lark-cli setup.

How do I update a Feishu whiteboard with Mermaid or PlantUML?

Pipe your diagram code into lark-cli whiteboard +update with --input_format mermaid or plantuml and --source -. Add --overwrite to replace existing content and an --idempotent-token of at least 10 characters to make retries safe.

When should I use the DSL route instead of Mermaid for whiteboard diagrams?

Use Mermaid or PlantUML for mind maps, sequence diagrams, class diagrams, pie charts, and Gantt charts. Use the DSL route with whiteboard-cli for architecture diagrams, flowcharts, swimlanes, funnels, fishbones, and other complex layouts that need precise positioning.

Why does my whiteboard update fail with a 500 error when adding images?

The image token belongs to the wrong resource domain. Images must be uploaded with lark-cli docs +media-upload using --parent-type whiteboard and the target board token; tokens from docx_image or Drive domains cause error 2891001.

What are the limitations of editing raw whiteboard JSON directly?

The raw OpenAPI node format is only suitable for small changes like editing text or colors. For structural redesigns or complex diagrams, the Skill recommends regenerating content through the DSL or Mermaid workflows instead of hand-editing raw nodes.