Skip to content

docs(whiteboard): optimize whiteboard skill#1371

Open
syh-cpdsss wants to merge 2 commits into
mainfrom
fix/whiteboard-skill-optimization
Open

docs(whiteboard): optimize whiteboard skill#1371
syh-cpdsss wants to merge 2 commits into
mainfrom
fix/whiteboard-skill-optimization

Conversation

@syh-cpdsss

@syh-cpdsss syh-cpdsss commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

Optimize the whiteboard skill documentation structure and clarity. Reorganize reference files into a dedicated elements/ directory, extract complex workflows into a separate file, and add scope boundaries to help AI agents correctly route requests.

Changes

  • Simplified skill description and added explicit out-of-scope responsibilities (doc editing, sheets/base operations)
  • Added identity context clarifying --as user default vs --as bot usage
  • Moved 6 element reference files from references/ to elements/ (connectors, content, image, layout, schema, style, typography)
  • Extracted the creation/modification/rendering workflows from SKILL.md into a dedicated references/lark-whiteboard-workflow.md
  • Updated all internal cross-references from references/ to elements/ across routes and scene files
  • Removed the legacy lark-whiteboard-cli migration notice
  • Added an "out of scope" section with cross-references to lark-doc, lark-sheets, and lark-base

Test Plan

  • Unit tests pass
  • Automated Evaluation passed

Related Issues

  • None

Summary by CodeRabbit

  • Documentation
    • Clarified skill scope and added explicit exclusions for cross-skill features (document editing, sheets/base).
    • Added a “quick decision” identity guide (default as user; bot only for app uploads) and intent→command routing.
    • Introduced end-to-end create/modify whiteboard workflows, rendering routes, fallback behavior and output conventions.
    • Consolidated and updated internal reference links and removed outdated migration guidance.

@coderabbitai

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a29a3146-1fa2-424d-8bf4-c2a48f8c16b5

📥 Commits

Reviewing files that changed from the base of the PR and between e4e8b54 and 63c954e.

📒 Files selected for processing (1)
  • skills/lark-whiteboard/references/lark-whiteboard-workflow.md
✅ Files skipped from review due to trivial changes (1)
  • skills/lark-whiteboard/references/lark-whiteboard-workflow.md

📝 Walkthrough

Walkthrough

This PR narrows lark-whiteboard's documented scope, adds a "快速决策" identity/intent routing table, introduces a new whiteboard creation/modification workflow doc, and remaps internal links from references/ to elements/ across element and scene docs.

Changes

Whiteboard Documentation Structure Refactoring

Layer / File(s) Summary
Skill scope definition and quick-decision routing
skills/lark-whiteboard/SKILL.md
SKILL.md scope is refined to explicitly support whiteboard query/edit/export and exclude document editing and embedded tables/Base operations. Adds "快速决策" identity rule and a decision table mapping intents to +query/+update or to the 创作/修改 workflow references; replaces prior creation entry with an out-of-scope list.
Whiteboard creation/modification/rendering workflow
skills/lark-whiteboard/references/lark-whiteboard-workflow.md
New workflow doc defines board_token acquisition (reuse, extract from doc, create blank), modification branching on query --output_as outputs, rendering & write rules including identity-based routing and SVG→DSL fallback, artifact directory/file naming, and CLI update command templates (--overwrite, --idempotent-token, --as user/--as bot).
Documentation reference migration from references/ to elements/
skills/lark-whiteboard/elements/layout.md, skills/lark-whiteboard/elements/schema.md, skills/lark-whiteboard/routes/dsl.md, skills/lark-whiteboard/scenes/flowchart.md, skills/lark-whiteboard/scenes/mermaid.md, skills/lark-whiteboard/scenes/photo-showcase.md, skills/lark-whiteboard/scenes/swimlane.md
Remaps internal links and module references from references/* to elements/* across element and scene docs (schema/layout/image/style/connectors), adjusting pointer targets used by DSL and scene guidance.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

domain/ccm, size/L

Suggested reviewers

  • zkh-bytedance
  • ZKHelloworld
  • SunPeiYang996

Poem

🐰 I hopped through docs with nimble feet,

links remapped and workflows neat.
Tokens found and routes aligned,
Whiteboard guidance, clearer, signed.
A tiny rabbit cheers the feat!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'docs(whiteboard): optimize whiteboard skill' is partially related to the changes, referring to documentation optimization, but lacks specificity about the main structural reorganization from references/ to elements/ directories.
Description check ✅ Passed The pull request description provides a complete summary of changes, includes a detailed changes list, addresses the test plan with checkboxes, and documents related issues. All required sections from the template are present and filled out.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/whiteboard-skill-optimization

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added the size/M Single-domain feat or fix with limited business impact label Jun 10, 2026
@codecov

codecov Bot commented Jun 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.90%. Comparing base (7fdf558) to head (63c954e).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1371   +/-   ##
=======================================
  Coverage   71.90%   71.90%           
=======================================
  Files         691      691           
  Lines       65629    65629           
=======================================
  Hits        47191    47191           
  Misses      14791    14791           
  Partials     3647     3647           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Jun 10, 2026

Copy link
Copy Markdown

🚀 PR Preview Install Guide

🧰 CLI update

npm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@63c954e0da164e5c7f4fe3e0babc08a64043e193

🧩 Skill update

npx skills add larksuite/cli#fix/whiteboard-skill-optimization -y -g

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (2)
skills/lark-whiteboard/references/lark-whiteboard-workflow.md (1)

34-34: ⚡ Quick win

Add missing anchor link.

Line 34 references the "渲染 & 写入画板" section but is missing the anchor link, unlike the properly linked reference on line 18.

🔗 Proposed fix
-  │   └─ 重绘/结构调整 → +query --output_as image → 看图后进入 [§ 渲染 & 写入画板]
+  │   └─ 重绘/结构调整 → +query --output_as image → 看图后进入 [§ 渲染 & 写入画板](`#渲染--写入画板`)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@skills/lark-whiteboard/references/lark-whiteboard-workflow.md` at line 34,
Add the missing anchor link for the "渲染 & 写入画板" reference on the line containing
"└─ 重绘/结构调整 → +query --output_as image → 看图后进入 [§ 渲染 & 写入画板]": replace the plain
section text with a proper Markdown internal link pointing to the "渲染 & 写入画板"
section anchor (matching the existing link style used earlier in the file, e.g.,
the linked reference on line 18) so the reference navigates correctly.
skills/lark-whiteboard/SKILL.md (1)

45-45: ⚡ Quick win

Remove redundant "lark-doc" text.

The line contains redundant text "lark-doc" before the link. The arrow already indicates the target, and the link text provides the name.

📝 Proposed fix
-## 不在本 skill 范围
-- 文档内容编辑 → lark-doc [lark-doc](../lark-doc/SKILL.md)
+## 不在本 skill 范围  
+- 文档内容编辑 → [lark-doc](../lark-doc/SKILL.md)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@skills/lark-whiteboard/SKILL.md` at line 45, Remove the redundant plain-text
"lark-doc" preceding the link in the SKILL.md entry by changing the line "文档内容编辑
→ lark-doc [lark-doc](../lark-doc/SKILL.md)" to use only the arrow and the link,
e.g. "文档内容编辑 → [lark-doc](../lark-doc/SKILL.md)"; update the text where this
exact phrase appears so only the linked label remains.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@skills/lark-whiteboard/references/lark-whiteboard-workflow.md`:
- Around line 50-52: The three markdown links to route docs in the table are
using wrong relative paths from this file
(references/lark-whiteboard-workflow.md); update the link targets for
`routes/mermaid.md`, `routes/svg.md`, and `routes/dsl.md` to include the
parent-folder prefix `../` (i.e., `../routes/mermaid.md`, `../routes/svg.md`,
`../routes/dsl.md`) so the `思维导图...`, `其他图表` (Claude/Gemini/GPT/GLM), and `其他图表`
(Doubao/Seed/Other) table rows point to the correct files.

---

Nitpick comments:
In `@skills/lark-whiteboard/references/lark-whiteboard-workflow.md`:
- Line 34: Add the missing anchor link for the "渲染 & 写入画板" reference on the line
containing "└─ 重绘/结构调整 → +query --output_as image → 看图后进入 [§ 渲染 & 写入画板]":
replace the plain section text with a proper Markdown internal link pointing to
the "渲染 & 写入画板" section anchor (matching the existing link style used earlier in
the file, e.g., the linked reference on line 18) so the reference navigates
correctly.

In `@skills/lark-whiteboard/SKILL.md`:
- Line 45: Remove the redundant plain-text "lark-doc" preceding the link in the
SKILL.md entry by changing the line "文档内容编辑 → lark-doc
[lark-doc](../lark-doc/SKILL.md)" to use only the arrow and the link, e.g.
"文档内容编辑 → [lark-doc](../lark-doc/SKILL.md)"; update the text where this exact
phrase appears so only the linked label remains.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 273e17c8-1033-446f-9103-bde6fbc675d9

📥 Commits

Reviewing files that changed from the base of the PR and between 7fdf558 and 4f41437.

📒 Files selected for processing (14)
  • skills/lark-whiteboard/SKILL.md
  • skills/lark-whiteboard/elements/connectors.md
  • skills/lark-whiteboard/elements/content.md
  • skills/lark-whiteboard/elements/image.md
  • skills/lark-whiteboard/elements/layout.md
  • skills/lark-whiteboard/elements/schema.md
  • skills/lark-whiteboard/elements/style.md
  • skills/lark-whiteboard/elements/typography.md
  • skills/lark-whiteboard/references/lark-whiteboard-workflow.md
  • skills/lark-whiteboard/routes/dsl.md
  • skills/lark-whiteboard/scenes/flowchart.md
  • skills/lark-whiteboard/scenes/mermaid.md
  • skills/lark-whiteboard/scenes/photo-showcase.md
  • skills/lark-whiteboard/scenes/swimlane.md

Comment thread skills/lark-whiteboard/references/lark-whiteboard-workflow.md Outdated
Change-Id: Iabcbe9f4e309ae9f467ceec265320cea6cdfa81b
@syh-cpdsss syh-cpdsss force-pushed the fix/whiteboard-skill-optimization branch from 4f41437 to e4e8b54 Compare June 10, 2026 03:27
Change-Id: I96d99037b3ba74a3ea9964991b67cdf15fb985be

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (1)
skills/lark-whiteboard/references/lark-whiteboard-workflow.md (1)

50-52: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Fix relative paths to route documentation.

The relative paths in the table are incorrect. This file is in the references/ folder, so links to files in the routes/ folder need the ../ prefix.

🔗 Proposed fix for table paths
 | 图表类型               | 身份                                  | 路径                                       |
 |--------------------|-------------------------------------|------------------------------------------|
-| 思维导图、时序图、类图、饼图、甘特图 | 任何身份                                | [`routes/mermaid.md`](routes/mermaid.md) |
-| 其他图表               | `Claude` / `Gemini` / `GPT` / `GLM` | [`routes/svg.md`](routes/svg.md)         |
-| 其他图表               | `Doubao` / `Seed` / `Other`         | [`routes/dsl.md`](routes/dsl.md)         |
+| 思维导图、时序图、类图、饼图、甘特图 | 任何身份                                | [`routes/mermaid.md`](../routes/mermaid.md) |
+| 其他图表               | `Claude` / `Gemini` / `GPT` / `GLM` | [`routes/svg.md`](../routes/svg.md)         |
+| 其他图表               | `Doubao` / `Seed` / `Other`         | [`routes/dsl.md`](../routes/dsl.md)         |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@skills/lark-whiteboard/references/lark-whiteboard-workflow.md` around lines
50 - 52, The table in lark-whiteboard-workflow.md uses incorrect relative links
to route docs (routes/mermaid.md, routes/svg.md, routes/dsl.md) because this
file lives in references/; update each link to include the parent-dir prefix
(../routes/mermaid.md, ../routes/svg.md, ../routes/dsl.md) so the markdown links
resolve correctly—edit the table rows referencing these route files to prepend
"../" to each routes/... path.
🧹 Nitpick comments (3)
skills/lark-whiteboard/references/lark-whiteboard-workflow.md (3)

28-36: ⚡ Quick win

Add language identifier to the code block.

The code block lacks a language specification. While this is a decision tree rather than executable code, adding text or plaintext as the language identifier improves consistency and satisfies linter requirements.

📝 Proposed fix
-```
+```text
 +query --output_as code
   ├─ 返回 Mermaid/PlantUML 代码
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@skills/lark-whiteboard/references/lark-whiteboard-workflow.md` around lines
28 - 36, The fenced code block that begins with "query --output_as code" needs a
language identifier to satisfy the linter; update the opening fence from "```"
to "```text" (or "```plaintext") so the block is explicitly typed, leaving the
block contents unchanged; locate the markdown section in
lark-whiteboard-workflow.md containing the query decision tree and change its
opening backtick fence accordingly.

Source: Linters/SAST tools


67-73: ⚡ Quick win

Add language identifier to the artifact listing.

The code block showing the directory structure lacks a language specification. Adding text as the language identifier improves consistency and satisfies linter requirements.

📝 Proposed fix
-```
+```text
 diagram.svg           ← SVG 源码(SVG 路径)
 diagram.mmd           ← Mermaid 源码(Mermaid 路径)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@skills/lark-whiteboard/references/lark-whiteboard-workflow.md` around lines
67 - 73, The code block listing artifacts (starting with "diagram.svg",
"diagram.mmd", "diagram.json", etc.) is missing a language identifier; update
the fenced code block by adding the language specifier "text" after the opening
backticks so the block becomes a ```text fenced block, ensuring the listing
(diagram.svg, diagram.mmd, diagram.json, diagram.gen.cjs, diagram.png) is
rendered and linted as plain text.

Source: Linters/SAST tools


82-82: ⚡ Quick win

Clarify which artifact file to use in the command.

The placeholder <产物文件> is ambiguous. The "产物规范" section defines multiple files (diagram.svg, diagram.mmd, diagram.json). Consider specifying which file to use for each rendering path, or reference back to the specific route documentation for clarity.

For example:

  • SVG path: diagram.svg (later converted via --to openapi)
  • Mermaid path: diagram.mmd
  • DSL path: diagram.json
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@skills/lark-whiteboard/references/lark-whiteboard-workflow.md` at line 82,
The command example using "npx -y `@larksuite/whiteboard-cli`@^0.2.11 -i <产物文件>
--to openapi --format json \\" is ambiguous; update it to explicitly state which
artifact to pass for each rendering path (e.g., use diagram.svg for SVG
export/--to openapi conversion, diagram.mmd for Mermaid input, and diagram.json
for the DSL/JSON input) and add a short note pointing readers to the "产物规范"
section for full file definitions and any required conversion steps.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@skills/lark-whiteboard/references/lark-whiteboard-workflow.md`:
- Around line 54-59: Update the relative links in the SVG fallback paragraph so
they point to the correct files from this references directory: replace
occurrences of "routes/svg.md" and "routes/dsl.md" with "../routes/svg.md" and
"../routes/dsl.md" respectively; edit the text containing the SVG fallback rule
(the paragraph that starts with "⚠️ SVG 路径失败回退") to use the prefixed paths so
the references resolve correctly from
skills/lark-whiteboard/references/lark-whiteboard-workflow.md.

---

Duplicate comments:
In `@skills/lark-whiteboard/references/lark-whiteboard-workflow.md`:
- Around line 50-52: The table in lark-whiteboard-workflow.md uses incorrect
relative links to route docs (routes/mermaid.md, routes/svg.md, routes/dsl.md)
because this file lives in references/; update each link to include the
parent-dir prefix (../routes/mermaid.md, ../routes/svg.md, ../routes/dsl.md) so
the markdown links resolve correctly—edit the table rows referencing these route
files to prepend "../" to each routes/... path.

---

Nitpick comments:
In `@skills/lark-whiteboard/references/lark-whiteboard-workflow.md`:
- Around line 28-36: The fenced code block that begins with "query --output_as
code" needs a language identifier to satisfy the linter; update the opening
fence from "```" to "```text" (or "```plaintext") so the block is explicitly
typed, leaving the block contents unchanged; locate the markdown section in
lark-whiteboard-workflow.md containing the query decision tree and change its
opening backtick fence accordingly.
- Around line 67-73: The code block listing artifacts (starting with
"diagram.svg", "diagram.mmd", "diagram.json", etc.) is missing a language
identifier; update the fenced code block by adding the language specifier "text"
after the opening backticks so the block becomes a ```text fenced block,
ensuring the listing (diagram.svg, diagram.mmd, diagram.json, diagram.gen.cjs,
diagram.png) is rendered and linted as plain text.
- Line 82: The command example using "npx -y `@larksuite/whiteboard-cli`@^0.2.11
-i <产物文件> --to openapi --format json \\" is ambiguous; update it to explicitly
state which artifact to pass for each rendering path (e.g., use diagram.svg for
SVG export/--to openapi conversion, diagram.mmd for Mermaid input, and
diagram.json for the DSL/JSON input) and add a short note pointing readers to
the "产物规范" section for full file definitions and any required conversion steps.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: cd8b49a7-9ffa-4f33-82b0-a5e95ac3d3a6

📥 Commits

Reviewing files that changed from the base of the PR and between 4f41437 and e4e8b54.

📒 Files selected for processing (14)
  • skills/lark-whiteboard/SKILL.md
  • skills/lark-whiteboard/elements/connectors.md
  • skills/lark-whiteboard/elements/content.md
  • skills/lark-whiteboard/elements/image.md
  • skills/lark-whiteboard/elements/layout.md
  • skills/lark-whiteboard/elements/schema.md
  • skills/lark-whiteboard/elements/style.md
  • skills/lark-whiteboard/elements/typography.md
  • skills/lark-whiteboard/references/lark-whiteboard-workflow.md
  • skills/lark-whiteboard/routes/dsl.md
  • skills/lark-whiteboard/scenes/flowchart.md
  • skills/lark-whiteboard/scenes/mermaid.md
  • skills/lark-whiteboard/scenes/photo-showcase.md
  • skills/lark-whiteboard/scenes/swimlane.md
✅ Files skipped from review due to trivial changes (5)
  • skills/lark-whiteboard/elements/layout.md
  • skills/lark-whiteboard/elements/schema.md
  • skills/lark-whiteboard/scenes/swimlane.md
  • skills/lark-whiteboard/routes/dsl.md
  • skills/lark-whiteboard/scenes/flowchart.md
🚧 Files skipped from review as they are similar to previous changes (3)
  • skills/lark-whiteboard/scenes/mermaid.md
  • skills/lark-whiteboard/scenes/photo-showcase.md
  • skills/lark-whiteboard/SKILL.md

Comment thread skills/lark-whiteboard/references/lark-whiteboard-workflow.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Single-domain feat or fix with limited business impact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant