docs(skills): add cite user guidance for cross-skill user name rendering#1394
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds rules and examples requiring ChangesUser mention formatting documentation
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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-doc/references/lark-doc-xml.md`:
- Line 26: Standardize the modal verb for the <cite type="user"> tag
requirement: replace "应使用" with "必须使用" wherever the document refers to using the
<cite type="user"> (e.g., the occurrence at the table row and the paragraph
currently using "应使用" and the one at line 83 using "必须使用"), so all references
consistently state that using <cite type="user" user-id="..."></cite> is
mandatory.
🪄 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: b78f78ff-101e-4a0f-8ece-2658edfa1f50
📒 Files selected for processing (1)
skills/lark-doc/references/lark-doc-xml.md
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1394 +/- ##
=======================================
Coverage 72.74% 72.75%
=======================================
Files 730 730
Lines 69031 69030 -1
=======================================
+ Hits 50220 50224 +4
+ Misses 15037 15034 -3
+ Partials 3774 3772 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@2ff0fc4d3afd8562996eef44a56fd21c2fbdb182🧩 Skill updatenpx skills add larksuite/cli#docs/skill-cite-user-guidance -y -g |
b2934ea to
4a46415
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (1)
skills/lark-doc/references/lark-doc-xml.md (1)
85-85: ⚡ Quick winClarify the "通常" (usually) qualifier for sender handling.
Line 85 states that sender "通常用纯文本名字标注即可" (usually just needs plain text label), implying there are exceptions when sender should use
<cite type="user">tags instead. However, the criteria for these exceptions are not defined, which may lead to inconsistent implementations across different developers or scenarios.Consider one of the following:
- Remove "通常" if sender should always use plain text in IM informational record contexts
- Clarify the exceptions: specify when sender should use cite tags (e.g., "发言人标注用纯文本即可;当需要提醒发言人查看记录时,才使用
<cite type="user">")- Add more concrete examples beyond IM to illustrate the distinction in other scenarios mentioned in line 83 (tasks, calendar, approvals)
🤖 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-doc/references/lark-doc-xml.md` at line 85, Update the sentence about sender labeling to remove ambiguity: either remove the qualifier "通常" and state that sender should always be labeled as plain text, or explicitly define the exceptions when sender must be wrapped in a <cite type="user"> tag (for example: "use <cite type='user'> when you need the IM platform to notify or link the user, such as when an action/acknowledgement is required; otherwise use plain text for informational records"); additionally add one concrete example (e.g., IM chat message vs. approval request) to illustrate the difference; edit the sentence containing "发言人 通常用纯文本名字标注即可" and reference <cite type="user"> and "sender" so implementers know which rule to follow.
🤖 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.
Nitpick comments:
In `@skills/lark-doc/references/lark-doc-xml.md`:
- Line 85: Update the sentence about sender labeling to remove ambiguity: either
remove the qualifier "通常" and state that sender should always be labeled as
plain text, or explicitly define the exceptions when sender must be wrapped in a
<cite type="user"> tag (for example: "use <cite type='user'> when you need the
IM platform to notify or link the user, such as when an action/acknowledgement
is required; otherwise use plain text for informational records"); additionally
add one concrete example (e.g., IM chat message vs. approval request) to
illustrate the difference; edit the sentence containing "发言人 通常用纯文本名字标注即可" and
reference <cite type="user"> and "sender" so implementers know which rule to
follow.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 078a67f4-4307-4caf-90a9-7b623c97bbc4
📒 Files selected for processing (1)
skills/lark-doc/references/lark-doc-xml.md
aebf04c to
d7fe75c
Compare
c21c281 to
4164fb1
Compare
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-doc/references/lark-doc-xml.md`:
- Line 117: The text incorrectly references the command "lark-contact"; update
the documentation to use the actual CLI invocation "lark-cli contact" and ensure
the example command shown ("lark-cli contact +search-user") and any surrounding
explanatory text consistently use "lark-cli contact" instead of "lark-contact"
so readers use the correct tool name.
🪄 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: 7aa763ef-ebbb-4f64-b2a5-dfbf08b09cb2
📒 Files selected for processing (2)
skills/lark-doc/references/lark-doc-xml.mdskills/lark-im/SKILL.md
d73ea8f to
9ff4847
Compare
- Unify modal verbs to "必须" throughout the user name writing rules - Expand typical scenarios to cover sender, mentions, reactions, cards, system messages, and merge_forward - Add open_id resolution workflow via lark-contact +search-user for plain-text names (system messages, merge_forward content) - Fix typos in lark-doc-style.md
9ff4847 to
2ff0fc4
Compare
Summary
When writing user names into Lark documents from cross-skill data sources (IM messages, calendar events, approvals, tasks, etc.), the AI agent should use
<cite type="user" user-id="open_id">tags instead of plain text names. This ensures names render as clickable @mentions in the document.Changes
Modified
skills/lark-doc/references/lark-doc-xml.md:Inline table row — Updated the
<cite type="user">description to explicitly state that any known open_id should use this tag, not plain text.New "用户名写入规则" section — Added under 补充规则 with:
<cite type="user">senderandmentionsusers should use this tagRelated Issues
Discovered during a real workflow: IM messages were written to a doc with plain text names for senders, missing the clickable @mention rendering that
<cite type="user">provides.Summary by CodeRabbit
@-mentions) when user IDs are available. Clarifies which IM fields require this (senders, mentions, reaction operators, card-referenced users) and adds group-chat, system-message, merged-forward examples. Describes a lookup procedure (via CLI/tool) to resolve user IDs when only plain-text names exist before writing citations.