Summary
The lark-im skill (SKILL.md API table) marks images.create as:
create — 上传图片。Identity: bot only (tenant_access_token).
This is inaccurate and contradicts the skill's own send/reply references. It misleads agents into believing media messages cannot be sent with --as user, or into unnecessary workarounds (upload as bot, then reference the key as user).
Evidence (tested 2026-08-04, lark-cli with user identity authorized, granted scopes include im:message.send_as_user, im:message, im:resource)
# 1. Local image uploaded + sent as user — succeeds
lark-cli im +messages-send --chat-id oc_xxx --as user --image ./test.png
# => ok: true, sender_type: "user"
# 2. Local file uploaded + sent as user — succeeds
lark-cli im +messages-send --chat-id oc_xxx --as user --file ./test.txt
# => ok: true, sender_type: "user"
Both messages were verified via +messages-mget: sender.sender_type = "user", sent as the authorized end user.
Inconsistencies in the skill
SKILL.md API table: images.create labeled bot only (tenant_access_token) — wrong, or at least incomplete: with a UAT that includes im:resource, user-identity image upload works.
- The same table has no
files.create entry at all (file upload), even though +messages-send --file / +messages-reply --file upload files.
references/lark-im-messages-send.md (line ~268) and references/lark-im-messages-reply.md (line ~267) correctly state: "both the upload and send steps use the same identity (UAT when --as user, TAT when --as bot)" — this contradicts the SKILL.md table.
Suggested fix
- Change
images.create identity annotation to supports user and bot, noting user identity requires the im:resource scope on the UAT.
- Add a
files.create entry with the same annotation.
- Optionally add one line to SKILL.md's "Identity and Token Mapping" section: media upload follows the caller's identity; user identity requires
im:resource.
Summary
The
lark-imskill (SKILL.mdAPI table) marksimages.createas:This is inaccurate and contradicts the skill's own send/reply references. It misleads agents into believing media messages cannot be sent with
--as user, or into unnecessary workarounds (upload as bot, then reference the key as user).Evidence (tested 2026-08-04, lark-cli with user identity authorized, granted scopes include
im:message.send_as_user,im:message,im:resource)Both messages were verified via
+messages-mget:sender.sender_type = "user", sent as the authorized end user.Inconsistencies in the skill
SKILL.mdAPI table:images.createlabeledbot only (tenant_access_token)— wrong, or at least incomplete: with a UAT that includesim:resource, user-identity image upload works.files.createentry at all (file upload), even though+messages-send --file/+messages-reply --fileupload files.references/lark-im-messages-send.md(line ~268) andreferences/lark-im-messages-reply.md(line ~267) correctly state: "both the upload and send steps use the same identity (UAT when--as user, TAT when--as bot)" — this contradicts the SKILL.md table.Suggested fix
images.createidentity annotation tosupports user and bot, noting user identity requires theim:resourcescope on the UAT.files.createentry with the same annotation.im:resource.