Skip to content

docs: tighten lark-sheets skill guidance#1286

Closed
fangshuyu-768 wants to merge 1 commit into
mainfrom
codex/optimize-lark-sheets-skill
Closed

docs: tighten lark-sheets skill guidance#1286
fangshuyu-768 wants to merge 1 commit into
mainfrom
codex/optimize-lark-sheets-skill

Conversation

@fangshuyu-768

@fangshuyu-768 fangshuyu-768 commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • update the lark-sheets description to remove command-name coupling, keep the doubao /sheets routing rule, restore the online-sheet versus local-Excel boundary, and make the out-of-scope search guidance less implementation-specific
  • add a fuller default identity note for sheets operations, add a dedicated out-of-scope section, and shorten duplicated wiki-unwrapping guidance by routing through drive +inspect
  • trim redundant explanatory prose so the skill is materially smaller on latest main while preserving the existing structure and reference model

Context

This PR only addresses issues that still exist on the latest main branch. The older review notes about scope tables and resource-relationship duplication no longer apply to current main, so they were intentionally left untouched.

Testing

  • git diff --check
  • rough token count: 4018 (down from 4337 on latest main)

Summary by CodeRabbit

  • Documentation
    • Updated routing guidance directing users to appropriate tools for different operations
    • Added authentication requirements and mandatory flag usage instructions for spreadsheet operations
    • Simplified reference sections with improved workflow examples
    • Clarified operation boundaries and routing to complementary services
    • Enhanced guidance for handling large and complex input payloads

@coderabbitai

coderabbitai Bot commented Jun 5, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Updates to skills/lark-sheets documentation: clarify scope and routing, add --as user identity guidance, simplify scenario/reference instructions, replace wiki token steps with lark-cli drive +inspect--spreadsheet-token, prefer stdin for large JSON inputs, and route out-of-scope ops to lark-drive and lark-base.

Changes

lark-sheets Skill Documentation

Layer / File(s) Summary
Skill scope and routing
skills/lark-sheets/SKILL.md
Top-level description rewritten to route name/keyword spreadsheet search to lark-drive while keeping /sheets/ URL/token handling; added "不在本 skill 范围" routing cloud-space/Drive operations to lark-drive and multi-dimensional/Base tasks to lark-base.
User guidance, references, and input handling
skills/lark-sheets/SKILL.md
Added identity instruction (--as user with lark-cli auth login reminder), simplified scenario preface and References intro, replaced /wiki/ decode flow with lark-cli drive +inspect → use --spreadsheet-token when type=sheet, removed agent --print-schema tip, and added stdin-first guidance for large/complex JSON inputs (absolute @file paths rejected).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • larksuite/cli#1082: Overlaps on /sheets/ URL/token handling and routing adjustments in skills/lark-sheets/SKILL.md.
  • larksuite/cli#1073: Similar changes around cloud-space/Drive terminology and routing guidance in skills/lark-sheets/SKILL.md.
  • larksuite/cli#951: Related routing guidance directing spreadsheet discovery/search to lark-drive.

Suggested labels

domain/ccm

Suggested reviewers

  • wittam-01
  • kongenpei
  • zkh-bytedance

Poem

🐇 I nibbled through lines, made routes concise,
Told tokens where to go and set identity nice.
Stdin holds the big JSON feast,
Routes sent outward, scope released—
A rabbit's hop to docs made precise.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'docs: tighten lark-sheets skill guidance' directly and clearly summarizes the main change: documentation improvements to the lark-sheets skill to make its guidance more concise and focused.
Description check ✅ Passed The PR description addresses most required template sections with specific details about changes and testing, though the 'Test Plan' section is partially incomplete compared to the template's checklist format.
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 codex/optimize-lark-sheets-skill

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 5, 2026
@codecov

codecov Bot commented Jun 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.33%. Comparing base (a4a4bd6) to head (1b1193b).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1286      +/-   ##
==========================================
+ Coverage   70.18%   70.33%   +0.14%     
==========================================
  Files         671      672       +1     
  Lines       65240    65322      +82     
==========================================
+ Hits        45786    45941     +155     
+ Misses      15783    15728      -55     
+ Partials     3671     3653      -18     

☔ 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 5, 2026

Copy link
Copy Markdown

🚀 PR Preview Install Guide

🧰 CLI update

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

🧩 Skill update

npx skills add larksuite/cli#codex/optimize-lark-sheets-skill -y -g

@fangshuyu-768
fangshuyu-768 force-pushed the codex/optimize-lark-sheets-skill branch from 51716ef to 5dbb4e3 Compare June 5, 2026 05:34

@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

🤖 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-sheets/SKILL.md`:
- Line 16: Update the SKILL.md guidance to require the auth login command
include a scope or domain flag: change the sentence that currently instructs
users to run `lark-cli auth login` to explicitly show that `lark-cli auth login
--domain <your-domain>` or `lark-cli auth login --scope <your-scope>` (or
equivalent) must be supplied; reference the auth flow rule from
lark-shared/SKILL.md and ensure the phrase containing `lark-cli auth login` is
replaced or appended with the required `--domain`/`--scope` note so users won’t
run the bare command and hit an error.
🪄 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: 4ce13a87-ef0b-4d3f-a0fe-2bd0a3a9fe6e

📥 Commits

Reviewing files that changed from the base of the PR and between 51716ef and 5dbb4e3.

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


**CRITICAL — 开始前 MUST 先用 Read 工具读取 [`../lark-shared/SKILL.md`](../lark-shared/SKILL.md),其中包含认证、权限处理。**

**身份:电子表格通常属于用户云空间资源,优先使用 `--as user`。首次使用前执行 `lark-cli auth login`。**

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Incomplete auth login guidance.

The instruction states "首次使用前执行 lark-cli auth login" without specifying that --domain or --scope is required. Per lark-shared/SKILL.md, auth login must specify scope or domain: "auth login 必须指定范围(--domain--scope)". Users running the bare command will encounter an error.

Consider adding the required parameter:

📝 Suggested clarification
-**身份:电子表格通常属于用户云空间资源,优先使用 `--as user`。首次使用前执行 `lark-cli auth login`。**
+**身份:电子表格通常属于用户云空间资源,优先使用 `--as user`。首次使用前需执行 `lark-cli auth login --scope "<scope>"` 或 `--domain <domain>`(详见 [`lark-shared/SKILL.md`](../lark-shared/SKILL.md))。**

Based on learnings from lark-shared/SKILL.md auth flow, which documents that auth login requires --domain or --scope specification.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
**身份:电子表格通常属于用户云空间资源,优先使用 `--as user`首次使用前执行 `lark-cli auth login`**
**身份:电子表格通常属于用户云空间资源,优先使用 `--as user`首次使用前需执行 `lark-cli auth login --scope "<scope>"``--domain <domain>`(详见 [`lark-shared/SKILL.md`](../lark-shared/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-sheets/SKILL.md` at line 16, Update the SKILL.md guidance to
require the auth login command include a scope or domain flag: change the
sentence that currently instructs users to run `lark-cli auth login` to
explicitly show that `lark-cli auth login --domain <your-domain>` or `lark-cli
auth login --scope <your-scope>` (or equivalent) must be supplied; reference the
auth flow rule from lark-shared/SKILL.md and ensure the phrase containing
`lark-cli auth login` is replaced or appended with the required
`--domain`/`--scope` note so users won’t run the bare command and hit an error.

@fangshuyu-768
fangshuyu-768 force-pushed the codex/optimize-lark-sheets-skill branch from 5dbb4e3 to ab523f0 Compare June 5, 2026 05:39
@fangshuyu-768
fangshuyu-768 force-pushed the codex/optimize-lark-sheets-skill branch from ab523f0 to 1b1193b Compare June 5, 2026 06:12

@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.

♻️ Duplicate comments (1)
skills/lark-sheets/SKILL.md (1)

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

Incomplete auth login guidance.

The instruction states "首次使用前执行 lark-cli auth login" without specifying that --domain or --scope is required. Per lark-shared/SKILL.md, auth login must specify scope or domain. Users running the bare command will encounter an error.

Consider adding the required parameter guidance.

Based on learnings from lark-shared/SKILL.md auth flow, which documents that auth login requires --domain or --scope specification.

🤖 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-sheets/SKILL.md` at line 16, The auth guidance in SKILL.md
currently tells users to run "lark-cli auth login" but omits required
parameters; update the sentence to instruct users to include either the --domain
or --scope flag (for example: lark-cli auth login --domain <your-domain> or
--scope <scope>) so the auth flow accepts the request, referencing the same auth
flow rules from lark-shared/SKILL.md and the "lark-cli auth login" command in
the file.
🤖 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.

Duplicate comments:
In `@skills/lark-sheets/SKILL.md`:
- Line 16: The auth guidance in SKILL.md currently tells users to run "lark-cli
auth login" but omits required parameters; update the sentence to instruct users
to include either the --domain or --scope flag (for example: lark-cli auth login
--domain <your-domain> or --scope <scope>) so the auth flow accepts the request,
referencing the same auth flow rules from lark-shared/SKILL.md and the "lark-cli
auth login" command in the file.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: fa60a323-b133-4e3f-8f49-71dc4fbef926

📥 Commits

Reviewing files that changed from the base of the PR and between ab523f0 and 1b1193b.

📒 Files selected for processing (1)
  • skills/lark-sheets/SKILL.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