docs: reorganize lark-base skill guidance#374
Conversation
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughRewrites Changes
Sequence Diagram(s)(omitted) Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Greptile SummaryThis PR rewrites One concrete gap: Section 7's command-grouping table omits all Confidence Score: 4/5Safe 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
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]
|
a6be62b to
4343c69
Compare
There was a problem hiding this comment.
🧹 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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (2)
skills/lark-base/SKILL.md (2)
235-235:⚠️ Potential issue | 🟡 MinorUnify
get_nodenotation to CLI command formLine 235 uses
wiki.spaces.get_node, while Line 303 useslark-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 | 🟠 MajorClarify 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_nodepre-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
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@d6d4bc7b81fe044115dd56047b7276456e24ea0d🧩 Skill updatenpx skills add larksuite/cli#docs/lark-base-skill-structure -y -g |
…structure # Conflicts: # skills/lark-base/SKILL.md
Summary
Reorganize the
skills/lark-base/SKILL.mdtop-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
skills/lark-base/SKILL.mdinto a structured 5-section layout with module-level command tablesTest Plan
lark xxxcommand works as expectedgo mod tidyran with nogo.mod/go.sumchangesgo run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.1.6 run --new-from-rev=origin/mainRelated Issues
Summary by CodeRabbit