Skip to content

docs: reorganize lark-base skill guidance#374

Merged
zhouyue-bytedance merged 7 commits intomainfrom
docs/lark-base-skill-structure
Apr 10, 2026
Merged

docs: reorganize lark-base skill guidance#374
zhouyue-bytedance merged 7 commits intomainfrom
docs/lark-base-skill-structure

Conversation

@zhouyue-bytedance
Copy link
Copy Markdown
Collaborator

@zhouyue-bytedance zhouyue-bytedance commented Apr 9, 2026

Summary

Reorganize the skills/lark-base/SKILL.md top-level guidance around trigger boundaries, module-oriented navigation, shared Base concepts, execution rules, and error recovery. This keeps the top-level skill focused on routing and common knowledge while pushing command-specific details back to the corresponding references.

Changes

  • Rewrote skills/lark-base/SKILL.md into a structured 5-section layout with module-level command tables
  • Preserved top-level AI-routing rules such as wiki token handling, formula vs lookup selection, workflow/dashboard entry rules, and concrete error recovery guidance
  • Removed command-specific payload and return details from the top-level skill where those details are already covered by module references

Test Plan

  • Unit tests pass
  • Manual local verification confirms the lark xxx command works as expected
  • go mod tidy ran with no go.mod/go.sum changes
  • go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.1.6 run --new-from-rev=origin/main
  • Manual command verification not run; this PR changes skill documentation only

Related Issues

  • None

Summary by CodeRabbit

  • Documentation
    • Rewrote skill docs into modular guide: "when to use", per-module/command navigation, and detailed submodules (tables/fields/records/views, formulas/Lookup, analysis, workflow, dashboard, forms, permissions).
    • Moved Wiki link parsing into Token & Links with explicit routing rules and disallowing fallback to legacy API.
    • Centralized execution rules and updated common-error lookup (includes baseToken invalid and recovery notes); removed legacy intent/command group and form prompt sections.

@github-actions github-actions bot added domain/base PR touches the base domain size/L Large or sensitive change across domains or core paths labels Apr 9, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 9, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Rewrites skills/lark-base/SKILL.md into a module-first documentation layout: adds usage triggers and preconditions, module & command navigation, unified token/link parsing and routing rules, consolidated execution constraints, reorganized error lookup (moved error codes 1254104 / 1254291). Lines changed: +289 / -287. (34 words)

Changes

Cohort / File(s) Summary
Lark-Base Skill Documentation
skills/lark-base/SKILL.md
Full modular rewrite: replaced prior monolithic sections with "何时使用/前置约束", module & per-module command maps (Base, 表与数据, 公式/Lookup, 数据分析, Workflow, Dashboard, 表单, 权限/角色), moved "Wiki 链接解析" into "Token 与链接" with explicit /base/{token} vs /wiki/{token} handling (wiki.spaces.get_nodenode.obj_token), constrained URL ?table/?view object-type routing and banned fallback to bitable/v1 API, consolidated execution rules (order, non-violable constraints, concurrency/pagination/batch limits, confirmations), updated "常见错误与恢复" and relocated error codes 1254104 / 1254291. Lines changed: +289 / -287.

Sequence Diagram(s)

(omitted)

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested reviewers

  • fangshuyu-768

Poem

🐇📜
I hopped through lines both new and old,
Rewrote the maps and tucked tokens bold.
Links now know which path to run,
Errors lined up, tidy and done.
A rabbit’s note — docs neatly spun! 🥕✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'docs: reorganize lark-base skill guidance' accurately and concisely summarizes the main change: reorganizing the structure and layout of the SKILL.md documentation.
Description check ✅ Passed The description follows the template structure with Summary, Changes, Test Plan, and Related Issues sections. All required sections are present and adequately completed with relevant details.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ 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 docs/lark-base-skill-structure

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

@greptile-apps
Copy link
Copy Markdown

greptile-apps bot commented Apr 9, 2026

Greptile Summary

This PR rewrites skills/lark-base/SKILL.md into a 7-section modular guide covering trigger conditions, per-module command navigation, shared Base concepts, execution rules, error recovery, and a command-grouping index. The restructuring improves AI routing clarity with explicit Wiki-token handling, formula/lookup selection guidance, and concrete error recovery notes.

One concrete gap: Section 7's command-grouping table omits all +dashboard-* commands, even though Section 2.7 covers them in detail. An AI agent that uses Section 7 as a quick-reference index would not discover the dashboard command group at all.

Confidence Score: 4/5

Safe to merge after adding the missing dashboard command group to the Section 7 index table.

All referenced files exist on disk, routing logic is internally consistent, and the new modular structure is a clear improvement. The one P1 finding — dashboard commands missing from Section 7 — is a real routing gap that an AI agent could hit when using that table as a command index. Fixing it (one table row) before merge is recommended.

skills/lark-base/SKILL.md — Section 7 command-grouping table missing dashboard entries and using command-specific links for form modules instead of module-index links.

Important Files Changed

Filename Overview
skills/lark-base/SKILL.md Comprehensive 7-section skill guide rewrite; all referenced files exist on disk, routing rules are internally consistent, but Section 7's command-grouping table is missing the entire dashboard command group.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[User Intent] --> B{Section 1: Trigger?}
    B -- Yes --> C{Section 2: Which Module?}
    B -- No --> Z[Use other skill]

    C --> D[2.2 Base module +base-create/get/copy]
    C --> E[2.3 Tables & Data table/field/record/view]
    C --> F[2.4 Formula/Lookup +field-create type=formula/lookup]
    C --> G[2.5 Data Analysis +data-query]
    C --> H[2.6 Workflow +workflow-*]
    C --> I[2.7 Dashboard +dashboard-*]
    C --> J[2.8 Forms +form-* / +form-questions-*]
    C --> K[2.9 Permissions +advperm-* / +role-*]

    E --> E1[2.3.1 Table]
    E --> E2[2.3.2 Field]
    E --> E3[2.3.3 Record]
    E --> E4[2.3.4 View]

    D & E & F & G & H & I & J & K --> L[Section 3: Common Base Knowledge token parsing, field writability, naming rules]
    L --> M[Section 4: Execution Rules read structure first, no raw API, serial-only lists]
    M --> N[Execute Command]
    N --> O{Error?}
    O -- Yes --> P[Section 5: Error Recovery Table]
    O -- No --> Q[Return Results]
Loading

Comments Outside Diff (1)

  1. skills/lark-base/SKILL.md, line 341-358 (link)

    P1 Dashboard commands missing from Section 7 command-grouping table

    All +dashboard-* commands (+dashboard-list, +dashboard-get, +dashboard-create, +dashboard-update, +dashboard-delete, +dashboard-block-list, +dashboard-block-get, +dashboard-block-create, +dashboard-block-update, +dashboard-block-delete) are absent from the Section 7 index. An AI agent that uses this table as a quick-reference lookup for "what commands exist" will not find the dashboard group, potentially skipping it entirely and falling back to wrong commands or a raw API call. Section 2.7 covers dashboards, but Section 7 is the canonical command index and should match.

    The suggestion below adds the missing dashboard row and also corrects the form commands link from lark-base-form-create.mdlark-base-form.md and form questions commands from lark-base-form-questions-create.mdlark-base-form-questions.md, making Section 7 consistent with the module-index links used in Section 2.8.

Reviews (8): Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." | Re-trigger Greptile

@zhouyue-bytedance zhouyue-bytedance force-pushed the docs/lark-base-skill-structure branch from a6be62b to 4343c69 Compare April 9, 2026 13:46
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
skills/lark-base/SKILL.md (1)

338-338: Minor grammar refinement for Chinese passive construction.

The current phrasing "只读字段被当成可写字段" has a minor grammatical issue in the passive (被) construction. As per coding guidelines, the static analysis tool correctly identified that modal verbs (能愿动词) cannot serve as predicates in 被-sentences.

📝 Proposed grammar refinement
-| 系统字段 / 公式字段写入失败 | 只读字段被当成可写字段 | 改为写存储字段,计算结果交给 formula / lookup / 系统字段自动产出 |
+| 系统字段 / 公式字段写入失败 | 只读字段被误当成可写字段 | 改为写存储字段,计算结果交给 formula / lookup / 系统字段自动产出 |

Alternative options:

  • "只读字段误被当成可写字段"
  • "可写字段被误认为包含只读字段"

As per coding guidelines, LanguageTool identified that modal verbs cannot be predicates in passive constructions in Chinese grammar.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skills/lark-base/SKILL.md` at line 338, Replace the problematic passive
phrasing "只读字段被当成可写字段" in the SKILL.md entry with a grammatically correct
alternative such as "只读字段误被当成可写字段" (or "可写字段被误认为包含只读字段") to avoid the modal-verb
predicate issue flagged by LanguageTool; update the exact markdown table cell
that currently contains the string "只读字段被当成可写字段" so the sentence reads with the
chosen corrected phrasing.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@skills/lark-base/SKILL.md`:
- Line 338: Replace the problematic passive phrasing "只读字段被当成可写字段" in the
SKILL.md entry with a grammatically correct alternative such as "只读字段误被当成可写字段"
(or "可写字段被误认为包含只读字段") to avoid the modal-verb predicate issue flagged by
LanguageTool; update the exact markdown table cell that currently contains the
string "只读字段被当成可写字段" so the sentence reads with the chosen corrected phrasing.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 35940763-5e95-4c4d-bbdd-7f617a96cd0c

📥 Commits

Reviewing files that changed from the base of the PR and between a6be62b and 4343c69.

📒 Files selected for processing (1)
  • skills/lark-base/SKILL.md

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

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-base/SKILL.md (2)

304-304: 建议调整被动句式,提升语法自然度。

“只读字段被当成可写字段”建议改为“只读字段可被当成可写字段(误用)”或“将只读字段当成了可写字段”。

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skills/lark-base/SKILL.md` at line 304, Update the passive phrasing
"只读字段被当成可写字段" in SKILL.md to a more natural/active form such as
"只读字段可被当成可写字段(误用)" or "将只读字段当成了可写字段"; locate the exact phrase "只读字段被当成可写字段" and
replace it with one of the suggested alternatives to improve grammar and
clarity.

106-106: 建议补一个量词,句子更自然。

“历史查询按 table-id + record-id”可改为“历史查询按 table-id + record-id 组合”或“按 table-id + record-id 这组条件”,减少语义悬空。

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skills/lark-base/SKILL.md` at line 106, Update the sentence in the SKILL.md
line describing `+record-history-list` so the phrase “历史查询按 `table-id +
record-id`” includes a quantifier to avoid a dangling meaning — replace it with
either “历史查询按 `table-id + record-id` 组合” or “历史查询按 `table-id + record-id` 这组条件”
in the `+record-history-list` entry to make the intent explicit.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@skills/lark-base/SKILL.md`:
- Line 230: Replace the dot-notation call `wiki.spaces.get_node` on the Wiki
link row (currently at line referencing `/wiki/{token}`) with the CLI-style
command `lark-cli wiki spaces get_node` so it matches the notation used
elsewhere (e.g., line 301) and other SKILL.md files; keep the rest of the cell
text unchanged (still instruct to read `node.obj_token` and not treat
`wiki_token` as `--base-token`).

---

Nitpick comments:
In `@skills/lark-base/SKILL.md`:
- Line 304: Update the passive phrasing "只读字段被当成可写字段" in SKILL.md to a more
natural/active form such as "只读字段可被当成可写字段(误用)" or "将只读字段当成了可写字段"; locate the
exact phrase "只读字段被当成可写字段" and replace it with one of the suggested alternatives
to improve grammar and clarity.
- Line 106: Update the sentence in the SKILL.md line describing
`+record-history-list` so the phrase “历史查询按 `table-id + record-id`” includes a
quantifier to avoid a dangling meaning — replace it with either “历史查询按 `table-id
+ record-id` 组合” or “历史查询按 `table-id + record-id` 这组条件” in the
`+record-history-list` entry to make the intent explicit.
🪄 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: 40f952f1-7203-439e-a76e-9f02ec6de5e7

📥 Commits

Reviewing files that changed from the base of the PR and between 4343c69 and 3d1c4e2.

📒 Files selected for processing (1)
  • skills/lark-base/SKILL.md

Comment thread skills/lark-base/SKILL.md
Comment thread skills/lark-base/SKILL.md Outdated
Comment thread skills/lark-base/SKILL.md Outdated
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@skills/lark-base/SKILL.md`:
- Line 300: 表格中的那一列句式需调整,把当前文本“只读字段当成可写字段”改为更顺的“只读字段被当成可写字段”;找到表格行包含“系统字段 /
公式字段写入失败 | 只读字段当成可写字段 | 改为写存储字段,计算结果交给 formula / lookup /
系统字段自动产出”并将中间单元格替换为“只读字段被当成可写字段”,保持其余表格内容和格式不变。
- Around line 40-43: The rule "仅使用 `lark-cli base +...`" conflicts with the Wiki
pre-parse step "wiki ... get_node"; update the SKILL.md wording so the `lark-cli
base +...` restriction applies only to Base业务命令 (e.g., command examples and
shortcut usage) and explicitly exempt the Wiki pre-parsing flow by adding a
sentence that permits using "wiki ... get_node" (or other wiki-prefixed
commands) prior to executing Base commands; ensure the doc clarifies this
exemption and adjusts the examples and rule header to "Base 业务命令: 仅使用 `lark-cli
base +...`,Wiki 预解析请使用 `wiki ... get_node` 豁免".
🪄 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: a9368832-3c2f-4cbc-952e-beea4fd95d1b

📥 Commits

Reviewing files that changed from the base of the PR and between 3d1c4e2 and 145c0e6.

📒 Files selected for processing (1)
  • skills/lark-base/SKILL.md

Comment thread skills/lark-base/SKILL.md Outdated
Comment thread skills/lark-base/SKILL.md
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

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 (2)
skills/lark-base/SKILL.md (2)

235-235: ⚠️ Potential issue | 🟡 Minor

Unify get_node notation to CLI command form

Line 235 uses wiki.spaces.get_node, while Line 303 uses lark-cli wiki spaces get_node. Keep one CLI-style notation throughout to reduce execution drift.

✏️ Suggested wording
-| Wiki 链接 `/wiki/{token}` | 先 `wiki.spaces.get_node`,再取 `node.obj_token` | 不要把 `wiki_token` 直接当 `--base-token` |
+| Wiki 链接 `/wiki/{token}` | 先 `lark-cli wiki spaces get_node`,再取 `node.obj_token` | 不要把 `wiki_token` 直接当 `--base-token` |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skills/lark-base/SKILL.md` at line 235, The docs use mixed notations for the
same operation: `wiki.spaces.get_node` (Line 235) vs `lark-cli wiki spaces
get_node` (Line 303); unify to the CLI-style form across the file. Replace
occurrences of the dot-notation `wiki.spaces.get_node` with `lark-cli wiki
spaces get_node` and update any related examples or flags (e.g., references to
`wiki_token`/`--base-token`) to match CLI semantics so all instructions
consistently show the `lark-cli wiki spaces get_node` command.

39-42: ⚠️ Potential issue | 🟠 Major

Clarify Base-only rule scope to avoid conflict with Wiki pre-parse flow

Line 40 currently reads as absolute, but Line 235/303 requires a Wiki pre-step. Scope this rule to Base business commands and explicitly exempt lark-cli wiki spaces get_node pre-resolution to avoid routing ambiguity.

✏️ Suggested wording
-2. 仅使用 `lark-cli base +...` 形式的 shortcut 命令。
+2. Base 业务命令仅使用 `lark-cli base +...` 形式的 shortcut 命令;若输入为 `/wiki/{token}`,允许先使用 `lark-cli wiki spaces get_node` 做对象解析。
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skills/lark-base/SKILL.md` around lines 39 - 42, Update the rule at "仅使用
`lark-cli base +...` 形式的 shortcut 命令。" to clarify it applies only to Base
business commands and add an explicit exemption for the Wiki pre-parse flow:
state that `lark-cli wiki spaces get_node` (the wiki pre-resolution step) is
allowed and should not be routed through Base, so readers understand Base-only
commands exclude the wiki pre-step and avoid ambiguity in command routing.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@skills/lark-base/SKILL.md`:
- Around line 239-247: The routing table for wiki.spaces.get_node is
inconsistent with the implemented object-type set in
shortcuts/wiki/wiki_node_create.go: update the table to match the actual
obj_type values used by wiki_node_create (sheet, mindnote, bitable, docx,
slides) or add a clear qualifier that the table describes a different
source/path (e.g., get_node vs create_node) and list which obj_type values apply
to each path; ensure references to wiki.spaces.get_node and the file
shortcuts/wiki/wiki_node_create.go are mentioned so reviewers can verify
alignment.

---

Duplicate comments:
In `@skills/lark-base/SKILL.md`:
- Line 235: The docs use mixed notations for the same operation:
`wiki.spaces.get_node` (Line 235) vs `lark-cli wiki spaces get_node` (Line 303);
unify to the CLI-style form across the file. Replace occurrences of the
dot-notation `wiki.spaces.get_node` with `lark-cli wiki spaces get_node` and
update any related examples or flags (e.g., references to
`wiki_token`/`--base-token`) to match CLI semantics so all instructions
consistently show the `lark-cli wiki spaces get_node` command.
- Around line 39-42: Update the rule at "仅使用 `lark-cli base +...` 形式的 shortcut
命令。" to clarify it applies only to Base business commands and add an explicit
exemption for the Wiki pre-parse flow: state that `lark-cli wiki spaces
get_node` (the wiki pre-resolution step) is allowed and should not be routed
through Base, so readers understand Base-only commands exclude the wiki pre-step
and avoid ambiguity in command routing.
🪄 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: 3fb566c3-af86-423d-aa59-c2cca400aef1

📥 Commits

Reviewing files that changed from the base of the PR and between 145c0e6 and 23e92ab.

📒 Files selected for processing (1)
  • skills/lark-base/SKILL.md

Comment thread skills/lark-base/SKILL.md Outdated
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 9, 2026

🚀 PR Preview Install Guide

🧰 CLI update

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

🧩 Skill update

npx skills add larksuite/cli#docs/lark-base-skill-structure -y -g

Copy link
Copy Markdown
Collaborator

@kongenpei kongenpei left a comment

Choose a reason for hiding this comment

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

Approved.

Copy link
Copy Markdown
Collaborator

@kongenpei kongenpei left a comment

Choose a reason for hiding this comment

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

Approved.

@zhouyue-bytedance zhouyue-bytedance merged commit f59f263 into main Apr 10, 2026
11 checks passed
@zhouyue-bytedance zhouyue-bytedance deleted the docs/lark-base-skill-structure branch April 10, 2026 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain/base PR touches the base domain size/L Large or sensitive change across domains or core paths

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants