feat(drive): streamline drive skill routing#1644
Conversation
📝 WalkthroughWalkthrough
lark-drive SKILL.md rewrite
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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: 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-drive/SKILL.md`:
- Around line 30-56: The markdown table in SKILL.md is breaking because several
command examples in the rows for drive +export, drive +import, drive +pull,
drive +push, and drive +sync contain unescaped pipe characters that are being
parsed as extra columns. Update those table cells to escape the pipes or wrap
the option lists in HTML code tags, keeping the command names and option text
readable while preserving correct table column structure.
🪄 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: 5049633c-f1c2-4b06-b05f-92f271688ec0
📒 Files selected for processing (1)
skills/lark-drive/SKILL.md
| | User intent | Command / next step | Minimal flags and notes | | ||
| |---|---|---| | ||
| | Inspect URL/token/type | `drive +inspect` | `--url <url>`; wiki URLs are unpacked to canonical `type/token/title/url`. | | ||
| | Search Drive objects | `drive +search` | `--query`, optional `--edited-since`, `--created-by-me`, `--mine`, `--doc-types`, `--sort`; project only needed fields in your answer. | | ||
| | Upload local file | `drive +upload` | `--file ./relative --parent-token <folder>` or `--wiki-token <wiki_node>`; validate local path first. | | ||
| | Download Drive file | `drive +download` | `--file-token <token> --output ./relative/path --overwrite` when user says replace/overwrite; `--output` must stay relative to cwd. | | ||
| | Export online doc | `drive +export` | `--token <doc_token> --doc-type docx|sheet|bitable|slides --file-extension <ext>`; follow with `+export-download` when it returns a file token/task. | | ||
| | Download export result | `drive +export-download` | Use the exported `file_token` and a relative output path. | | ||
| | Import local file | `drive +import` | `--file ./relative --type docx|sheet|bitable|slides --folder-token <folder>`; follow with `+task_result` for async status. | | ||
| | Async result | `drive +task_result` | Use for import/export/move/delete task tokens until success/failure is clear. | | ||
| | Create folder | `drive +create-folder` | `--parent-token <folder> --name <name>`. | | ||
| | Delete file/folder | `drive +delete` | High-risk write: require explicit user confirmation and pass `--yes`; folder delete may need `+task_result`. | | ||
| | Preview formats | `drive +preview` | `--file-token <token> --list-only` to list downloadable PDF/HTML/text/image previews; add `--output ./relative` only when downloading. | | ||
| | Cover presets | `drive +cover` | `--file-token <token> --list-only`; add `--spec <preset> --output ./relative` only when downloading. | | ||
| | Folder list | `drive files list` | Raw API; read `references/lark-drive-files-list.md` if pagination/params are unclear. | | ||
| | Rename title | `drive files patch` | Use `new_title` for docx/sheet/bitable/file/wiki/folder; get schema before raw call. | | ||
| | Copy/move | `drive files copy` or `drive +move` | Prefer shortcut for move; raw copy requires schema. | | ||
| | Comments | `drive +add-comment`; raw `file.comments *` | Full comment/list/resolve via raw resources; replies via `file.comment.replys *`. | | ||
| | Permissions | `+apply-permission` or `permission.*` | Read permission guide for collaborator/public/app authorization details. | | ||
| | Versions | `+version-history/get/revert/delete` | Supports user and bot; destructive delete/revert needs explicit user intent. | | ||
| | Quota | `drive quota_details get --as user` | User-only; `quota_detail_id` is current user id. | | ||
| | Pull folder to local | `drive +pull` | `--folder-token <folder> --local-dir ./relative --if-exists skip|smart|overwrite`; create local root dir first if needed. | | ||
| | Push local to folder | `drive +push` | `--local-dir ./relative --folder-token <folder> --if-exists skip|smart|overwrite`; deletion needs `--delete-remote --yes`. | | ||
| | Status diff | `drive +status` | `--local-dir ./relative --folder-token <folder> [--quick]`; compares local and Drive without mutating. | | ||
| | Two-way sync | `drive +sync` | `--local-dir ./relative --folder-token <folder> --on-conflict remote-wins|local-wins|keep-both|ask`; does not delete extras by default. | | ||
| | Knowledge organize | Reference only | For broad "organize Drive/knowledge base" planning, read `references/lark-drive-workflow-knowledge-organize.md`; default to plan only. | | ||
|
|
There was a problem hiding this comment.
🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win
Fix broken markdown table formatting.
Multiple rows contain unescaped | characters inside code spans that are interpreted as column delimiters, breaking table rendering:
- Line 36:
docx|sheet|bitable|slidesrenders as 6 columns instead of 3 - Line 38:
docx|sheet|bitable|slidesrenders as 6 columns instead of 3 - Line 51:
skip|smart|overwriterenders as 5 columns instead of 3 - Line 52:
skip|smart|overwriterenders as 5 columns instead of 3 - Line 54:
remote-wins|local-wins|keep-both|askrenders as 6 columns instead of 3
Escape pipes inside table cells as \| or use <code> HTML tags.
🛠️ Proposed fix (escape pipes)
-| Export online doc | `drive +export` | `--token <doc_token> --doc-type docx|sheet|bitable|slides --file-extension <ext>`; follow with `+export-download` when it returns a file token/task. |
+| Export online doc | `drive +export` | `--token <doc_token> --doc-type docx\|sheet\|bitable\|slides --file-extension <ext>`; follow with `+export-download` when it returns a file token/task. |
-| Import local file | `drive +import` | `--file ./relative --type docx|sheet|bitable|slides --folder-token <folder>`; follow with `+task_result` for async status. |
+| Import local file | `drive +import` | `--file ./relative --type docx\|sheet\|bitable\|slides --folder-token <folder>`; follow with `+task_result` for async status. |
-| Pull folder to local | `drive +pull` | `--folder-token <folder> --local-dir ./relative --if-exists skip|smart|overwrite`; create local root dir first if needed. |
+| Pull folder to local | `drive +pull` | `--folder-token <folder> --local-dir ./relative --if-exists skip\|smart\|overwrite`; create local root dir first if needed. |
-| Push local to folder | `drive +push` | `--local-dir ./relative --folder-token <folder> --if-exists skip|smart|overwrite`; deletion needs `--delete-remote --yes`. |
+| Push local to folder | `drive +push` | `--local-dir ./relative --folder-token <folder> --if-exists skip\|smart\|overwrite`; deletion needs `--delete-remote --yes`. |
-| Two-way sync | `drive +sync` | `--local-dir ./relative --folder-token <folder> --on-conflict remote-wins|local-wins|keep-both|ask`; does not delete extras by default. |
+| Two-way sync | `drive +sync` | `--local-dir ./relative --folder-token <folder> --on-conflict remote-wins\|local-wins\|keep-both\|ask`; does not delete extras by default. |📝 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.
| | User intent | Command / next step | Minimal flags and notes | | |
| |---|---|---| | |
| | Inspect URL/token/type | `drive +inspect` | `--url <url>`; wiki URLs are unpacked to canonical `type/token/title/url`. | | |
| | Search Drive objects | `drive +search` | `--query`, optional `--edited-since`, `--created-by-me`, `--mine`, `--doc-types`, `--sort`; project only needed fields in your answer. | | |
| | Upload local file | `drive +upload` | `--file ./relative --parent-token <folder>` or `--wiki-token <wiki_node>`; validate local path first. | | |
| | Download Drive file | `drive +download` | `--file-token <token> --output ./relative/path --overwrite` when user says replace/overwrite; `--output` must stay relative to cwd. | | |
| | Export online doc | `drive +export` | `--token <doc_token> --doc-type docx|sheet|bitable|slides --file-extension <ext>`; follow with `+export-download` when it returns a file token/task. | | |
| | Download export result | `drive +export-download` | Use the exported `file_token` and a relative output path. | | |
| | Import local file | `drive +import` | `--file ./relative --type docx|sheet|bitable|slides --folder-token <folder>`; follow with `+task_result` for async status. | | |
| | Async result | `drive +task_result` | Use for import/export/move/delete task tokens until success/failure is clear. | | |
| | Create folder | `drive +create-folder` | `--parent-token <folder> --name <name>`. | | |
| | Delete file/folder | `drive +delete` | High-risk write: require explicit user confirmation and pass `--yes`; folder delete may need `+task_result`. | | |
| | Preview formats | `drive +preview` | `--file-token <token> --list-only` to list downloadable PDF/HTML/text/image previews; add `--output ./relative` only when downloading. | | |
| | Cover presets | `drive +cover` | `--file-token <token> --list-only`; add `--spec <preset> --output ./relative` only when downloading. | | |
| | Folder list | `drive files list` | Raw API; read `references/lark-drive-files-list.md` if pagination/params are unclear. | | |
| | Rename title | `drive files patch` | Use `new_title` for docx/sheet/bitable/file/wiki/folder; get schema before raw call. | | |
| | Copy/move | `drive files copy` or `drive +move` | Prefer shortcut for move; raw copy requires schema. | | |
| | Comments | `drive +add-comment`; raw `file.comments *` | Full comment/list/resolve via raw resources; replies via `file.comment.replys *`. | | |
| | Permissions | `+apply-permission` or `permission.*` | Read permission guide for collaborator/public/app authorization details. | | |
| | Versions | `+version-history/get/revert/delete` | Supports user and bot; destructive delete/revert needs explicit user intent. | | |
| | Quota | `drive quota_details get --as user` | User-only; `quota_detail_id` is current user id. | | |
| | Pull folder to local | `drive +pull` | `--folder-token <folder> --local-dir ./relative --if-exists skip|smart|overwrite`; create local root dir first if needed. | | |
| | Push local to folder | `drive +push` | `--local-dir ./relative --folder-token <folder> --if-exists skip|smart|overwrite`; deletion needs `--delete-remote --yes`. | | |
| | Status diff | `drive +status` | `--local-dir ./relative --folder-token <folder> [--quick]`; compares local and Drive without mutating. | | |
| | Two-way sync | `drive +sync` | `--local-dir ./relative --folder-token <folder> --on-conflict remote-wins|local-wins|keep-both|ask`; does not delete extras by default. | | |
| | Knowledge organize | Reference only | For broad "organize Drive/knowledge base" planning, read `references/lark-drive-workflow-knowledge-organize.md`; default to plan only. | | |
| | User intent | Command / next step | Minimal flags and notes | | |
| |---|---|---| | |
| | Inspect URL/token/type | `drive +inspect` | `--url <url>`; wiki URLs are unpacked to canonical `type/token/title/url`. | | |
| | Search Drive objects | `drive +search` | `--query`, optional `--edited-since`, `--created-by-me`, `--mine`, `--doc-types`, `--sort`; project only needed fields in your answer. | | |
| | Upload local file | `drive +upload` | `--file ./relative --parent-token <folder>` or `--wiki-token <wiki_node>`; validate local path first. | | |
| | Download Drive file | `drive +download` | `--file-token <token> --output ./relative/path --overwrite` when user says replace/overwrite; `--output` must stay relative to cwd. | | |
| | Export online doc | `drive +export` | `--token <doc_token> --doc-type docx\|sheet\|bitable\|slides --file-extension <ext>`; follow with `+export-download` when it returns a file token/task. | | |
| | Download export result | `drive +export-download` | Use the exported `file_token` and a relative output path. | | |
| | Import local file | `drive +import` | `--file ./relative --type docx\|sheet\|bitable\|slides --folder-token <folder>`; follow with `+task_result` for async status. | | |
| | Async result | `drive +task_result` | Use for import/export/move/delete task tokens until success/failure is clear. | | |
| | Create folder | `drive +create-folder` | `--parent-token <folder> --name <name>`. | | |
| | Delete file/folder | `drive +delete` | High-risk write: require explicit user confirmation and pass `--yes`; folder delete may need `+task_result`. | | |
| | Preview formats | `drive +preview` | `--file-token <token> --list-only` to list downloadable PDF/HTML/text/image previews; add `--output ./relative` only when downloading. | | |
| | Cover presets | `drive +cover` | `--file-token <token> --list-only`; add `--spec <preset> --output ./relative` only when downloading. | | |
| | Folder list | `drive files list` | Raw API; read `references/lark-drive-files-list.md` if pagination/params are unclear. | | |
| | Rename title | `drive files patch` | Use `new_title` for docx/sheet/bitable/file/wiki/folder; get schema before raw call. | | |
| | Copy/move | `drive files copy` or `drive +move` | Prefer shortcut for move; raw copy requires schema. | | |
| | Comments | `drive +add-comment`; raw `file.comments *` | Full comment/list/resolve via raw resources; replies via `file.comment.replys *`. | | |
| | Permissions | `+apply-permission` or `permission.*` | Read permission guide for collaborator/public/app authorization details. | | |
| | Versions | `+version-history/get/revert/delete` | Supports user and bot; destructive delete/revert needs explicit user intent. | | |
| | Quota | `drive quota_details get --as user` | User-only; `quota_detail_id` is current user id. | | |
| | Pull folder to local | `drive +pull` | `--folder-token <folder> --local-dir ./relative --if-exists skip\|smart\|overwrite`; create local root dir first if needed. | | |
| | Push local to folder | `drive +push` | `--local-dir ./relative --folder-token <folder> --if-exists skip\|smart\|overwrite`; deletion needs `--delete-remote --yes`. | | |
| | Status diff | `drive +status` | `--local-dir ./relative --folder-token <folder> [--quick]`; compares local and Drive without mutating. | | |
| | Two-way sync | `drive +sync` | `--local-dir ./relative --folder-token <folder> --on-conflict remote-wins\|local-wins\|keep-both\|ask`; does not delete extras by default. | | |
| | Knowledge organize | Reference only | For broad "organize Drive/knowledge base" planning, read `references/lark-drive-workflow-knowledge-organize.md`; default to plan only. | |
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)
[warning] 36-36: Spaces inside code span elements
(MD038, no-space-in-code)
[warning] 36-36: Table column count
Expected: 3; Actual: 6; Too many cells, extra data will be missing
(MD056, table-column-count)
[warning] 38-38: Spaces inside code span elements
(MD038, no-space-in-code)
[warning] 38-38: Table column count
Expected: 3; Actual: 6; Too many cells, extra data will be missing
(MD056, table-column-count)
[warning] 51-51: Table column count
Expected: 3; Actual: 5; Too many cells, extra data will be missing
(MD056, table-column-count)
[warning] 52-52: Spaces inside code span elements
(MD038, no-space-in-code)
[warning] 52-52: Table column count
Expected: 3; Actual: 5; Too many cells, extra data will be missing
(MD056, table-column-count)
[warning] 54-54: Table column count
Expected: 3; Actual: 6; Too many cells, extra data will be missing
(MD056, table-column-count)
🤖 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-drive/SKILL.md` around lines 30 - 56, The markdown table in
SKILL.md is breaking because several command examples in the rows for drive
+export, drive +import, drive +pull, drive +push, and drive +sync contain
unescaped pipe characters that are being parsed as extra columns. Update those
table cells to escape the pipes or wrap the option lists in HTML code tags,
keeping the command names and option text readable while preserving correct
table column structure.
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@6e7583dc8265e6e72bb7ecf8f42f81be3de092cd🧩 Skill updatenpx skills add yballul-bytedance/cli#auto-research-sync/01KVMMAW9JNB87N9EEA2W9MGWT/mr-407-93c0a3a4 -y -g |
Summary
Streamline the Drive skill guidance into a shorter routing-first reference.
Changes
Test Plan
Related Issues
Auto research task: 01KVMMAW9JNB87N9EEA2W9MGWT
Summary by CodeRabbit