docs(mail): add identity guidance to prefer user over bot#157
docs(mail): add identity guidance to prefer user over bot#157chanthuang merged 2 commits intomainfrom
Conversation
Add an identity selection section to the mail skill documentation, guiding AI agents to default to --as user when operating on mailboxes. Bot identity requires the app to have tenant-level mail scopes enabled in the developer console, which most apps do not.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdded identity-selection guidance to mail docs: prefer Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
|
Greptile SummaryThis documentation-only PR adds an identity selection section to both the mail skill template and its generated output, guiding AI agents to default to Key documentation additions:
Confidence Score: 5/5Documentation-only change with no code modifications; safe to merge as-is. Both changed files contain identical, well-structured additions that are consistent with the rest of the document. There are no code changes, no logic regressions, and no factual inaccuracies in the guidance. The template and generated output are correctly kept in sync. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Mail Operation Request] --> B{Operation Type?}
B -->|Write: send, reply, forward, draft edit| C[Must use --as user]
B -->|Read: view mail, inbox list, threads| D{Access Pattern?}
D -->|Personal / default| E[Prefer --as user]
D -->|Admin batch / delegated| F[May use --as bot]
C --> G{User logged in?}
G -->|No| H[lark-cli auth login --domain mail]
H --> I[Execute with --as user]
G -->|Yes| I
E --> I
F --> J{App permissions configured?}
J -->|Yes| K[Execute with --as bot]
J -->|No| L[Request will be rejected]
Reviews (2): Last reviewed commit: "docs(mail): clarify identity selection w..." | Re-trigger Greptile |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@skill-template/domains/mail.md`:
- Around line 28-34: The doc currently says "默认使用 `--as user`" which confuses
policy default with the CLI's default; update the wording to state that the
policy recommends explicitly passing `--as user` (i.e., "策略上默认应显式传 `--as user`")
while noting that the CLI flag `--as` itself defaults to `auto`, and adjust the
bullets to reflect: use `--as user` (and run `lark-cli auth login --domain mail`
if not logged in) for personal mailbox access, and use `--as bot` for app-level
batch operations after granting app permissions.
🪄 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: 64c80891-572c-421a-9bf7-38e54cf7dabd
📒 Files selected for processing (2)
skill-template/domains/mail.mdskills/lark-mail/SKILL.md
|
Install this PR change globally: npm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@bfd25ab8647e4e9603f51b0c457b3b77d5892e42 |
- Replace ambiguous "默认使用" with "策略上应优先显式使用" to distinguish policy recommendation from CLI default (auto) - Note that bot identity only supports read operations; all write operations (send, reply, forward, draft edit) require user identity - Rewrite decision rules by read/write classification
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@59a417ae729f5f3ac859d4b86332fe0ebbf3f486🧩 Skill updatenpx skills add larksuite/cli#docs/mail-prefer-user-identity -y -g |
Summary
Add an "identity selection" section to the mail skill documentation, guiding AI agents to default to
--as userwhen operating on mailboxes. Bot identity (--as bot) requires the app to have tenant-level mail scopes enabled in the developer console.Changes
skill-template/domains/mail.md: add identity selection section between security rules and typical workflow (template source)skills/lark-mail/SKILL.md: same content applied to generated outputTest Plan
Summary by CodeRabbit