Skip to content

docs(im): add cloud draft skill entry#1702

Open
sqzzzs wants to merge 2 commits into
larksuite:mainfrom
sqzzzs:feat/im-cloud-draft-skill
Open

docs(im): add cloud draft skill entry#1702
sqzzzs wants to merge 2 commits into
larksuite:mainfrom
sqzzzs:feat/im-cloud-draft-skill

Conversation

@sqzzzs

@sqzzzs sqzzzs commented Jul 1, 2026

Copy link
Copy Markdown

Summary

Add Cloud Draft command entry to the Lark IM skill documentation.

Changes

  • Document im draft create under the IM draft section.
  • Add identity/token requirements for draft.create.
  • Add the required scope im:message.draft_write_as_user.

Test Plan

  • Verified the command is generated from registry metadata.
  • Verified locally:
    • ./lark-cli schema im.draft.create
    • ./lark-cli im draft create --as user --dry-run ...
    • Real call returned ok=true and code=0.
  • Joined gray group and verified cloud draft display in Feishu client.

Summary by CodeRabbit

  • Documentation
    • Extended the IM (v1) API resource list with a new draft resource and added draft.create (“写入草稿”).
    • Added a dedicated API reference page for creating IM drafts, including required parameters, content serialization examples, and response format.
    • Updated the permissions reference to include the im:message.draft_write_as_user scope and documented supported identities (user, bot).

@github-actions github-actions Bot added domain/im PR touches the im domain size/M Single-domain feat or fix with limited business impact labels Jul 1, 2026
@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f2ac72f6-b86d-41ca-82fe-c53ead0877db

📥 Commits

Reviewing files that changed from the base of the PR and between 084a3b7 and dadaf4e.

📒 Files selected for processing (2)
  • skills/lark-im/SKILL.md
  • skills/lark-im/references/lark-im-draft.md
✅ Files skipped from review due to trivial changes (1)
  • skills/lark-im/references/lark-im-draft.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • skills/lark-im/SKILL.md

📝 Walkthrough

Walkthrough

This PR adds the IM draft API resource and permission scope to skills/lark-im/SKILL.md, and introduces a new skills/lark-im/references/lark-im-draft.md reference covering im.draft.create usage, request structure, content serialization, and response shape.

Changes

Draft API documentation

Layer / File(s) Summary
Document draft.create and scope
skills/lark-im/SKILL.md
Adds the draft.create IM resource entry and its required scope mapping.
Add draft endpoint reference
skills/lark-im/references/lark-im-draft.md
Adds the draft endpoint guide, including command examples, --data fields, scene guidance, content serialization, and success response format.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

  • larksuite/cli#616: Also updates skills/lark-im/SKILL.md with a new IM API resource and scope mapping.

Suggested reviewers: YangJunzhou-01, liangshuo-1

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately reflects the main docs change adding a cloud draft skill entry.
Description check ✅ Passed The description follows the template with Summary, Changes, and Test Plan; only Related Issues is omitted.
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

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

🤖 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-im/SKILL.md`:
- Around line 192-195: The draft.create entry is missing the required identity
and access token details, unlike the other API operations in this document.
Update the draft section in SKILL.md so the `create` item includes the supported
identity values and the required token type, matching the pattern used by the
other operation entries and aligning with the registry metadata.
🪄 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: 8e484b94-d54c-486c-a6d7-42a3a42097b5

📥 Commits

Reviewing files that changed from the base of the PR and between 3bda9e1 and a9e2594.

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

Comment thread skills/lark-im/SKILL.md
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

🚀 PR Preview Install Guide

🧰 CLI update

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

🧩 Skill update

npx skills add sqzzzs/cli#feat/im-cloud-draft-skill -y -g

@sqzzzs sqzzzs force-pushed the feat/im-cloud-draft-skill branch from a9e2594 to 084a3b7 Compare July 1, 2026 11:00
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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

Labels

domain/im PR touches the im domain size/M Single-domain feat or fix with limited business impact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants