docs(lark-slides): tighten SKILL.md routing and trim always-loaded content#1169
docs(lark-slides): tighten SKILL.md routing and trim always-loaded content#1169ViperCai wants to merge 5 commits into
Conversation
…ntent
Based on the CCM skill-quality audit, apply the high-value, low-risk findings:
- description: drop the implementation detail ("接口通过 XML 协议通信") and add a
NOT segment so "做演示文稿" / "画架构图" don't mis-route to lark-doc / lark-whiteboard
- add a "不在本 skill 范围" routing table (doc / whiteboard / drive / sheets / base)
- move the design spec (color strategy, page forms, alignment, common errors) into
visual-planning.md (already a CRITICAL forced read on create/large-edit); SKILL.md
keeps only the core gate + a pointer. No content lost
- relocate the per-method scope table to references/lark-slides-permissions.md, leaving
a one-line pointer
- de-duplicate and de-emphasize the wiki-token handling section
Pushed back on the audit's lower-value items (schema-note "duplication", bulk
reference renames) and relocated rather than deleted the permission table.
|
Caution Review failedFailed to post review comments 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:
📝 WalkthroughWalkthroughUpdated ChangesLark Slides Documentation Refinement
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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-slides/references/lark-slides-permissions.md`:
- Line 3: Update the remediation instructions for missing scopes: replace the
user identity command suggestion `auth login --domain slides` with the correct
CLI usage that supplies the missing scopes, e.g. `lark-cli auth login --scope
"<missing scopes>"` (or `auth login --scope "<missing scopes>"` if using local
CLI shorthand) so it matches the missing-scope handling referenced in SKILL.md;
ensure the text around the `user 身份` guidance and the `bot 身份` guidance remains
consistent with this corrected flag usage.
- Line 9: Update the table row for the `slides +replace-slide` shortcut to
include the missing scope `slides:presentation:write_only` alongside
`slides:presentation:update` and `wiki:node:read` so the documented scopes match
the actual shortcut declaration and prevent preflight auth failures; locate the
entry referencing "`slides +replace-slide`" in lark-slides-permissions.md and
append `slides:presentation:write_only` to the listed scopes.
🪄 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: 0c4bbb3e-3aa7-4b0f-8eaf-622633bba3bd
📒 Files selected for processing (3)
skills/lark-slides/SKILL.mdskills/lark-slides/references/lark-slides-permissions.mdskills/lark-slides/references/visual-planning.md
| @@ -0,0 +1,14 @@ | |||
| # slides 权限速查 | |||
|
|
|||
| 各方法所需 scope。遇到权限不足时按 [`../../lark-shared/SKILL.md`](../../lark-shared/SKILL.md) 的流程处理(user 身份用 `auth login --domain slides`,bot 身份去开发者后台开通对应 scope)。 | |||
There was a problem hiding this comment.
Missing-scope remediation command should use --scope, not --domain.
Line 3 currently tells user identity to run auth login --domain slides, but missing-scope handling in CLI points users to lark-cli auth login --scope "<missing scopes>". The current wording can lead to unresolved permission errors.
Suggested doc fix
-各方法所需 scope。遇到权限不足时按 [`../../lark-shared/SKILL.md`](../../lark-shared/SKILL.md) 的流程处理(user 身份用 `auth login --domain slides`,bot 身份去开发者后台开通对应 scope)。
+各方法所需 scope。遇到权限不足时按 [`../../lark-shared/SKILL.md`](../../lark-shared/SKILL.md) 的流程处理(user 身份按缺失项执行 `lark-cli auth login --scope "<scopes>"`,bot 身份去开发者后台开通对应 scope)。📝 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.
| 各方法所需 scope。遇到权限不足时按 [`../../lark-shared/SKILL.md`](../../lark-shared/SKILL.md) 的流程处理(user 身份用 `auth login --domain slides`,bot 身份去开发者后台开通对应 scope)。 | |
| 各方法所需 scope。遇到权限不足时按 [`../../lark-shared/SKILL.md`](../../lark-shared/SKILL.md) 的流程处理(user 身份按缺失项执行 `lark-cli auth login --scope "<scopes>"`,bot 身份去开发者后台开通对应 scope)。 |
🤖 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-slides/references/lark-slides-permissions.md` at line 3, Update
the remediation instructions for missing scopes: replace the user identity
command suggestion `auth login --domain slides` with the correct CLI usage that
supplies the missing scopes, e.g. `lark-cli auth login --scope "<missing
scopes>"` (or `auth login --scope "<missing scopes>"` if using local CLI
shorthand) so it matches the missing-scope handling referenced in SKILL.md;
ensure the text around the `user 身份` guidance and the `bot 身份` guidance remains
consistent with this corrected flag usage.
| |------|-----------| | ||
| | `slides +create` | `slides:presentation:create`, `slides:presentation:write_only`(含 `@` 占位符时还需 `docs:document.media:upload`) | | ||
| | `slides +media-upload` | `docs:document.media:upload`(wiki URL 解析还需 `wiki:node:read`) | | ||
| | `slides +replace-slide` | `slides:presentation:update`(wiki URL 解析还需 `wiki:node:read`) | |
There was a problem hiding this comment.
+replace-slide scopes are incomplete in the table.
Line 9 omits slides:presentation:write_only, but the shortcut currently declares both slides:presentation:update and slides:presentation:write_only (plus wiki:node:read). This can cause preflight auth failures for users following this doc.
Suggested doc fix
-| `slides +replace-slide` | `slides:presentation:update`(wiki URL 解析还需 `wiki:node:read`) |
+| `slides +replace-slide` | `slides:presentation:update`, `slides:presentation:write_only`(wiki URL 解析还需 `wiki:node:read`) |📝 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.
| | `slides +replace-slide` | `slides:presentation:update`(wiki URL 解析还需 `wiki:node:read`) | | |
| | `slides +replace-slide` | `slides:presentation:update`, `slides:presentation:write_only`(wiki URL 解析还需 `wiki:node:read`) | |
🤖 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-slides/references/lark-slides-permissions.md` at line 9, Update
the table row for the `slides +replace-slide` shortcut to include the missing
scope `slides:presentation:write_only` alongside `slides:presentation:update`
and `wiki:node:read` so the documented scopes match the actual shortcut
declaration and prevent preflight auth failures; locate the entry referencing
"`slides +replace-slide`" in lark-slides-permissions.md and append
`slides:presentation:write_only` to the listed scopes.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1169 +/- ##
==========================================
+ Coverage 68.79% 68.90% +0.10%
==========================================
Files 628 628
Lines 58680 58735 +55
==========================================
+ Hits 40371 40473 +102
+ Misses 15015 14958 -57
- Partials 3294 3304 +10 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@a633ada85aea650a173be707de96e6f9454204aa🧩 Skill updatenpx skills add larksuite/cli#optimize/lark-slides-skill -y -g |
…ive-API guardrail local - trim 身份选择 / wiki / lark-shared CRITICAL to delegate auth, permissions and global params to lark-shared (which actually owns them) - drop the standalone permission table (CLI errors already return the missing scopes + console_url), removing references/lark-slides-permissions.md - keep the schema-first native-API guardrail inline, matching the wording used by all 12 sibling skills — lark-shared does not document a native-API call flow, so delegating it there would dangle and lose the "run schema first, don't guess fields" rule
The skill audit did not flag 身份选择; trimming it was an optional cleanup that dropped the concrete `auth login --domain slides` command and the slides-specific "verify the bot actually has access to the target deck" caveat (which lark-shared does not cover). Keep the section self-contained.
There was a problem hiding this comment.
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-slides/SKILL.md`:
- Around line 213-214: The doc uses dot notation
`xml_presentation.slide.create/delete/get/replace` which conflicts with later
CLI-style examples; update the mention to the space-separated CLI-style form
`xml_presentation.slide create/delete/get/replace` (and similarly change
`xml_presentations.get` to `xml_presentations get` where appropriate) so it
matches the `lark-cli slides <resource> <method>` format used elsewhere in the
file and avoids implying a single command path.
🪄 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: 203010bd-bd81-465b-b70a-10ec3d2133a0
📒 Files selected for processing (1)
skills/lark-slides/SKILL.md
Restore the dedicated section and its concrete `wiki spaces get_node` command. The audit's "duplicates other skills" claim doesn't hold here — the get_node call is the actionable key step for resolving a wiki token to a presentation id, and condensing it dropped the command. Keep it inline.
Background
Source: the CCM skill-quality audit doc (wiki), which raised 10 issues for lark-slides. This PR lands only the high-value, low-risk ones, and pushes back on / down-grades the lower-value or overly aggressive suggestions.
Changes
不负责:...(out-of-scope) segment so "make a deck" / "draw an architecture diagram" no longer mis-route to lark-doc / lark-whiteboard## 不在本 skill 范围(out-of-scope) routing table (doc / whiteboard / drive / sheets / base)visual-planning.md(already a CRITICAL forced read on create / large-edit); SKILL.md keeps only the core gate + a pointer. No content lostreferences/lark-slides-permissions.md, leaving a one-line pointer (relocated, not deleted)Not adopted / pushed back
Verification
visual-planning.md's Layout Types. They were added back and explicitly marked as notlayout_typeenum values.Summary by CodeRabbit