Skip to content

docs: add approval skill command references#1630

Open
Paulazaaza-dev wants to merge 1 commit into
larksuite:mainfrom
Paulazaaza-dev:feat/approval-optimize-skill
Open

docs: add approval skill command references#1630
Paulazaaza-dev wants to merge 1 commit into
larksuite:mainfrom
Paulazaaza-dev:feat/approval-optimize-skill

Conversation

@Paulazaaza-dev

@Paulazaaza-dev Paulazaaza-dev commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Add detailed command-to-reference mapping for the approval skill so agents can jump to the exact reference file for each lark-cli approval command.

Changes

  • Expand the command selection table in skills/lark-approval/SKILL.md
  • Split grouped commands into one row per command and add a reference column linked to the matching file

Test Plan

  • Unit tests pass (not run; docs-only change)
  • Manual local verification confirms the skill table maps each command to the matching reference file

Related Issues

  • None

Summary by CodeRabbit

  • Documentation
    • Expanded the approval command selection guide with direct links to per-command references.
    • Added detailed guides for viewing approval instances and task lists, including search, paging, filters, and key output fields.
    • Added step-by-step references for common approval actions such as approve, reject, transfer, remind, add sign, rollback, cancel, and CC.
    • Included usage examples, required permissions, safety tips for high-impact actions, and verification steps after execution.

Change-Id: Ie77989f526d4f0bbc471f2c0ba1bacf59a0f41c6
@github-actions github-actions Bot added the size/XL Architecture-level or global-impact change label Jun 28, 2026
@coderabbitai

coderabbitai Bot commented Jun 28, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds ten new per-command markdown reference files under skills/lark-approval/references/ covering approval read operations (tasks query, instances initiated, instances get) and write operations (instances cancel, instances cc, tasks approve, tasks reject, tasks remind, tasks add_sign, tasks rollback, tasks transfer). Updates SKILL.md command-selection table with a third column linking each command to its reference doc.

Changes

Lark Approval Skill Reference Documentation

Layer / File(s) Summary
SKILL.md command-selection table
skills/lark-approval/SKILL.md
Command-selection table expanded from two to three columns; each approval command row gains a link to its per-command reference doc.
Read-only reference docs
skills/lark-approval/references/lark-approval-tasks-query.md, skills/lark-approval/references/lark-approval-instance-initiated.md, skills/lark-approval/references/lark-approval-instance-get.md
New docs covering tasks query (topic enum, output fields), instances initiated (instance status enum, pagination), and instances get (detail fields, current_nodes/tasks/operation_records).
Instance write reference docs
skills/lark-approval/references/lark-approval-instance-cancel.md, skills/lark-approval/references/lark-approval-instance-cc.md
New docs for instances cancel and instances cc, each with high-risk-write warnings, required scope (approval:instance:write), CLI examples, parameter tables, prerequisite discovery steps, and API mapping.
Task write reference docs
skills/lark-approval/references/lark-approval-tasks-approve.md, ...tasks-reject.md, ...tasks-remind.md, ...tasks-add-sign.md, ...tasks-rollback.md, ...tasks-transfer.md
Six new docs for task-level write operations; each documents scopes, CLI examples with --dry-run/--yes, parameter tables, prerequisite steps using tasks query and instances get, usage recommendations, post-execution verification commands, and HTTP API info.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • larksuite/cli#554: Adds instances initiated and tasks remind commands to SKILL.md, which this PR now links to per-command reference docs.
  • larksuite/cli#867: Covers tasks add_sign and tasks rollback in SKILL.md; this PR adds the corresponding reference docs for those same commands.
  • larksuite/cli#1307: Introduced the "选哪个命令" table structure in SKILL.md that this PR extends with the new reference-link column.

Suggested labels

documentation

Suggested reviewers

  • liangshuo-1
  • MaxHuang22

🐇 Ten new docs hopped into place,
Each command now has its own space.
--dry-run first, then --yes with care,
Approvals and rollbacks beyond compare!
The table now links, all tidy and neat—
This bunny's work makes the docs complete! 🌟

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the docs-only change adding approval skill command references.
Description check ✅ Passed The description follows the required template and includes summary, changes, test plan, and related issues.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
⚔️ Resolve merge conflicts
  • Resolve merge conflict in branch feat/approval-optimize-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.

@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

🧹 Nitpick comments (2)
skills/lark-approval/references/lark-approval-instance-initiated.md (1)

38-44: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Fix 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 value

Standardize 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

📥 Commits

Reviewing files that changed from the base of the PR and between 4c31323 and 76563b5.

📒 Files selected for processing (12)
  • skills/lark-approval/SKILL.md
  • skills/lark-approval/references/lark-approval-instance-cancel.md
  • skills/lark-approval/references/lark-approval-instance-cc.md
  • skills/lark-approval/references/lark-approval-instance-get.md
  • skills/lark-approval/references/lark-approval-instance-initiated.md
  • skills/lark-approval/references/lark-approval-tasks-add-sign.md
  • skills/lark-approval/references/lark-approval-tasks-approve.md
  • skills/lark-approval/references/lark-approval-tasks-query.md
  • skills/lark-approval/references/lark-approval-tasks-reject.md
  • skills/lark-approval/references/lark-approval-tasks-remind.md
  • skills/lark-approval/references/lark-approval-tasks-rollback.md
  • skills/lark-approval/references/lark-approval-tasks-transfer.md

Comment on lines +34 to +46
| 参数 | 必填 | 说明 |
|------|------|------|
| `--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 调用,不执行 |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 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:

🛠️ 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XL Architecture-level or global-impact change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant