docs: add approval skill command references#1630
Conversation
Change-Id: Ie77989f526d4f0bbc471f2c0ba1bacf59a0f41c6
📝 WalkthroughWalkthroughAdds ten new per-command markdown reference files under ChangesLark Approval Skill Reference Documentation
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
⚔️ Resolve merge conflicts
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
🧹 Nitpick comments (2)
skills/lark-approval/references/lark-approval-instance-initiated.md (1)
38-44: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueFix pipe character escaping in parameters table.
Same table formatting issue as
tasks-query.md: the\|escape syntax for literal pipes in cells (e.g.,zh-CN \| en-US \| ja-JP,user_id \| union_id \| open_id) is fragile across Markdown renderers. Use|or comma-separated values for reliability.🤖 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-approval/references/lark-approval-instance-initiated.md` around lines 38 - 44, The parameters table in the approval docs uses escaped pipe characters in cell text, which can break rendering in some Markdown parsers. Update the affected entries in the table to avoid literal `\|` usage by switching to safer separators such as `&`#124`;` or commas, especially for the `locale` and `user_id_type` values. Keep the table structure intact and ensure the rewritten text remains readable in the same documentation section.skills/lark-approval/references/lark-approval-tasks-query.md (1)
1-90: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueStandardize pipe character escaping across all tables.
Multiple tables in this file use
\|to represent literal pipes in cell content (e.g.,zh-CN \| en-US \| ja-JP). This escape syntax works in some Markdown renderers but fails in others, and it triggered markdownlint warnings. Replace all\|with|or rephrase to avoid pipes entirely for maximum compatibility.🤖 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-approval/references/lark-approval-tasks-query.md` around lines 1 - 90, Multiple tables in approval-tasks-query.md still use escaped pipe characters like \| in cell content, which is inconsistent and triggers markdownlint; update the table entries in the 参数 and相关 sections to avoid literal pipes by replacing them with &`#124`; or rephrasing the text. Use the table rows for locale, user_id_type, and --format as the main targets, and make the escaping style consistent throughout the document.
🤖 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-approval/references/lark-approval-tasks-query.md`:
- Around line 34-46: The parameters table in lark-approval-tasks-query.md has
malformed Markdown rows that will render incorrectly. Fix the table entries for
locale and page_token by replacing the escaped pipe separators with a safe
delimiter such as HTML entities or comma-separated values, and split the merged
--as user and --format rows into separate table rows so the table stays a
consistent 3-column layout.
---
Nitpick comments:
In `@skills/lark-approval/references/lark-approval-instance-initiated.md`:
- Around line 38-44: The parameters table in the approval docs uses escaped pipe
characters in cell text, which can break rendering in some Markdown parsers.
Update the affected entries in the table to avoid literal `\|` usage by
switching to safer separators such as `&`#124`;` or commas, especially for the
`locale` and `user_id_type` values. Keep the table structure intact and ensure
the rewritten text remains readable in the same documentation section.
In `@skills/lark-approval/references/lark-approval-tasks-query.md`:
- Around line 1-90: Multiple tables in approval-tasks-query.md still use escaped
pipe characters like \| in cell content, which is inconsistent and triggers
markdownlint; update the table entries in the 参数 and相关 sections to avoid literal
pipes by replacing them with &`#124`; or rephrasing the text. Use the table rows
for locale, user_id_type, and --format as the main targets, and make the
escaping style consistent throughout the document.
🪄 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: 6703a449-532c-43c4-be25-6e414520e18c
📒 Files selected for processing (12)
skills/lark-approval/SKILL.mdskills/lark-approval/references/lark-approval-instance-cancel.mdskills/lark-approval/references/lark-approval-instance-cc.mdskills/lark-approval/references/lark-approval-instance-get.mdskills/lark-approval/references/lark-approval-instance-initiated.mdskills/lark-approval/references/lark-approval-tasks-add-sign.mdskills/lark-approval/references/lark-approval-tasks-approve.mdskills/lark-approval/references/lark-approval-tasks-query.mdskills/lark-approval/references/lark-approval-tasks-reject.mdskills/lark-approval/references/lark-approval-tasks-remind.mdskills/lark-approval/references/lark-approval-tasks-rollback.mdskills/lark-approval/references/lark-approval-tasks-transfer.md
| | 参数 | 必填 | 说明 | | ||
| |------|------|------| | ||
| | `--params '{"topic":"..."}'` | 是 | 查询参数,使用 JSON 传入 | | ||
| | `topic` | 是 | 任务分组主题,见下方“topic 枚举” | | ||
| | `definition_code` | 否 | 审批定义 Code,用于仅查询某个审批定义下的任务 | | ||
| | `locale` | 否 | 返回语言:`zh-CN` \\| `en-US` \\| `ja-JP` | | ||
| | `page_size` | 否 | 分页大小 | | ||
| | `page_token` | 否 | 翻页标记;首次请求不填,后续使用上一次返回的 `page_token` | | ||
| | `user_id_type` | 否 | 用户 ID 类型:`user_id` \\| `union_id` \\| `open_id` | | ||
| | `--as user` | 否 | 建议显式指定用户身份;审批任务查询通常应使用用户身份 | | ||
| | `--format` | 否 | 输出格式:`json`(默认)\\| `ndjson` \\| `table` \\| `csv` | | ||
| | `--dry-run` | 否 | 预览 API 调用,不执行 | | ||
|
|
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Fix malformed table rows causing rendering issues.
The parameters table has formatting defects that will render incorrectly in Markdown viewers:
- Line 39: The
localerow uses\|escapes that may not render as intended. Use HTML entity&返回结果全部使用json 太浪费token 了, 最好可以重新设计cli的返回结果. #124;or comma-separated values instead. - Line 42: The
page_tokenrow similarly uses\|inside the cell. - Line 44: Two rows (
--as userand--format) are merged onto a single line, creating 6+ columns instead of 3.
🛠️ Proposed table fix
| `locale` | 否 | 返回语言:`zh-CN` \| `en-US` \| `ja-JP` |
+| `page_size` | 否 | 分页大小 |
| `page_token` | 否 | 翻页标记;首次请求不填,后续使用上一次返回的 `page_token` |
-| `user_id_type` | 否 | 用户 ID 类型:`user_id` \| `union_id` \| `open_id` |
-| `--as user` | 否 | 建议显式指定用户身份;审批任务查询通常应使用用户身份 |
-| `--format` | 否 | 输出格式:`json`(默认)\| `ndjson` \| `table` \| `csv` |
+| `user_id_type` | 否 | 用户 ID 类型:`user_id` &`#124`; `union_id` &`#124`; `open_id` |
+| `--as user` | 否 | 建议显式指定用户身份;审批任务查询通常应使用用户身份 |
+| `--format` | 否 | 输出格式:`json`(默认)&`#124`; `ndjson` &`#124`; `table` &`#124`; `csv` |
| `--dry-run` | 否 | 预览 API 调用,不执行 |Also fix line 39:
-| `locale` | 否 | 返回语言:`zh-CN` \| `en-US` \| `ja-JP` |
+| `locale` | 否 | 返回语言:`zh-CN` &`#124`; `en-US` &`#124`; `ja-JP` |🧰 Tools
🪛 LanguageTool
[uncategorized] ~41-~41: 数词与名词之间一般应存在量词,可能缺少量词。
Context: ... | 否 | 分页大小 | | page_token | 否 | 翻页标记;首次请求不填,后续使用上一次返回的 page_token | | `user_id_...
(wa5)
🪛 markdownlint-cli2 (0.22.1)
[warning] 39-39: Table column count
Expected: 3; Actual: 5; Too many cells, extra data will be missing
(MD056, table-column-count)
[warning] 42-42: Table column count
Expected: 3; Actual: 5; Too many cells, extra data will be missing
(MD056, table-column-count)
[warning] 44-44: 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-approval/references/lark-approval-tasks-query.md` around lines 34
- 46, The parameters table in lark-approval-tasks-query.md has malformed
Markdown rows that will render incorrectly. Fix the table entries for locale and
page_token by replacing the escaped pipe separators with a safe delimiter such
as HTML entities or comma-separated values, and split the merged --as user and
--format rows into separate table rows so the table stays a consistent 3-column
layout.
Summary
Add detailed command-to-reference mapping for the approval skill so agents can jump to the exact reference file for each
lark-cli approvalcommand.Changes
skills/lark-approval/SKILL.mdTest Plan
Related Issues
Summary by CodeRabbit