CRITICAL — Before starting, you MUST first use the Read tool to read ../lark-shared/SKILL.md, which contains authentication and permission handling
Core Concepts
Whiteboard Token
The whiteboard token is the unique identifier of a whiteboard. Feishu whiteboards are embedded in cloud documents and can be obtained from the cloud document's docs +fetch results (<whiteboard token="xxx"/>
tag), or from the docs +update field after creating a new whiteboard with data.board_tokens .
Quick Decision
When you need to insert a chart:
- Can Feishu Whiteboard be used?
- Yes → Use the whiteboard path (recommended! editable and collaborative)
- No → Use the image path
| User Need | Recommended Shortcut |
|---|---|
| "View the content of this whiteboard" | +query --output_as image |
| "Export the whiteboard as an image" | +query --output_as image |
| "Get the PlantUML/Mermaid code of the whiteboard" | +query --output_as code |
| "Check whether the whiteboard consists of PlantUML/Mermaid code blocks" | +query --output_as code |
| "Modify the color or text of a node in the whiteboard" | +query --output_as raw after +update |
| "Draw a whiteboard with PlantUML" | +update --input_format plantuml |
| "Draw a whiteboard with Mermaid" | +update --input_format mermaid |
| "Draw a complex chart on the whiteboard" | +update --input_format raw, you need to use the whiteboard-cli tool, see lark-whiteboard-cli |
Shortcuts
| Shortcut | Description |
|---|---|
+query |
Query a whiteboard and export it as a preview image, code, or raw node structure |
+update |
Update whiteboard content, supporting PlantUML, Mermaid, or OpenAPI native format input |
Workflow
Scenario 1: Create a whiteboard
- Determine the whiteboard Token to create (obtained from the user request or the corresponding document) and the content to create
- Refer to lark-whiteboard-cli to generate whiteboard content
- Use the
+updateshortcut to update whiteboard content
Scenario 2: Modify or optimize a whiteboard
- Determine the whiteboard Token to modify (obtained from the user request or the corresponding document)
- Use the
+query --output_as codeshortcut to export the whiteboard code and confirm whether the whiteboard is drawn with Mermaid or PlantUML- If +query --output_as code returns Mermaid / PlantUML code blocks, optimize and modify based on this code
- If no code blocks are returned, use
+query --output_as imageto get the whiteboard preview image, and refer to the image content lark-whiteboard-cli to redraw and optimize - If the user only needs to simply modify the text content/color of a node, you can use the
+query --output_as rawshortcut to export the whiteboard's native OpenAPI format and modify it based on that. - If the user has explicit requirements, the user's requirements take priority.
- Use the
+updateshortcut to create new whiteboard content. Depending on the user's needs, you may need to usedocs +updateto create a new whiteboard, or use+update --overwriteto overwrite-update the original whiteboard.
Usage with lark-doc
Scenario 1: Get the whiteboard token from a document
- Use
lark-docof+fetchto get the document content - Parse the
<whiteboard token="xxx"/>tag from the returned markdown, and record the whiteboard token - Use this skill's
+queryor+updateto read or operate the whiteboard
Scenario 2: Create a new whiteboard and edit it (complete workflow)
This is the most common usage scenario,the following steps must be fully executed:
-
Use
lark-docof+updateto create a blank whiteboard- Pass in the markdown
<whiteboard type="blank"></whiteboard> - Note that this XML tag should not be escaped
- When multiple whiteboards are needed, repeat multiple whiteboard tags
- Pass in the markdown
-
From the response's
data.board_tokens, get the token list of the newly created whiteboards- Record the chart type and position corresponding to each token
-
Based on the document topic, design the corresponding content for each whiteboard
- Refer to the "Common Chart Templates and Reference Guide" below to choose the appropriate syntax
- Use Mermaid (recommended), PlantUML, or lark-whiteboard-cli to generate content
-
Update the whiteboards one by one: Use this skill's
+updateshortcut to edit the content of each whiteboard- Do not miss any whiteboard token
- Ensure that each whiteboard has actual content, not blank
Common Chart Templates and Reference Guide
| Chart Type | Recommended Syntax | Detailed Reference Guide |
|---|---|---|
| Architecture Diagram | whiteboard-cli DSL | lark-whiteboard-cli/scenes/architecture.md |
| Flowchart | whiteboard-cli DSL | lark-whiteboard-cli/scenes/flowchart.md |
| Organizational Chart | whiteboard-cli DSL | lark-whiteboard-cli/scenes/organization.md |
| Milestone/Timeline | whiteboard-cli DSL | lark-whiteboard-cli/scenes/milestone.md |
| Fishbone Diagram | whiteboard-cli DSL | lark-whiteboard-cli/scenes/fishbone.md |
| Comparison Chart | whiteboard-cli DSL | lark-whiteboard-cli/scenes/comparison.md |
| Flywheel Diagram | whiteboard-cli DSL | lark-whiteboard-cli/scenes/flywheel.md |
| Pyramid Chart | whiteboard-cli DSL | lark-whiteboard-cli/scenes/pyramid.md |
| Mind Map/Pie Chart/Sequence Diagram/Class Diagram | Mermaid | lark-whiteboard-cli/scenes/mermaid.md |
| Bar Chart | whiteboard-cli DSL | lark-whiteboard-cli/scenes/bar-chart.md |
| Line Chart | whiteboard-cli DSL | lark-whiteboard-cli/scenes/line-chart.md |
| Tree Diagram | whiteboard-cli DSL | lark-whiteboard-cli/scenes/treemap.md |
| Funnel Chart | whiteboard-cli DSL | lark-whiteboard-cli/scenes/funnel.md |
| Swimlane Diagram | whiteboard-cli DSL | lark-whiteboard-cli/scenes/swimlane.md |