钉钉群聊与消息。Use when 用户提到 发消息/编辑或撤回消息/单聊/群聊/建群/普通群升级外部群/群昵称/会话分组/群成员管理/@消息/搜索聊天记录/话题回复/收藏消息/机器人群发/Webhook通知/发送或下载消息图片与文件。不做紧急 DING/短信/电话(走 dingtalk-misc)、邮件(走 dingtalk-mail)、班级群(走 dingtalk-misc)。命令前缀:dws chat。
70
88%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
High
Do not use without reviewing
**CRITICAL — 执行任何
dws操作前,MUST 先用 Read 工具完整读取dws-shared。**该轻量文件包含全局执行契约、安全底线及 shared references 的按需加载导航;不要预加载其全部 references。
命令参考:chat.md;表情:chat-emoji-list.md;剧本:01-messaging.md。
chat 当前有 97 条公开 shortcut,完整清单保留在 Runtime Catalog 与 Schema,不在高频产品根 Skill 中重复展开。已知意图直接使用下方的优先路由、意图表或任务 reference;命令已选中时直接执行,只在参数/安全语义不确定时读取 leaf Schema,在当前 Cobra flags 不确定时读取 leaf Help。
仅当现有路由和 reference 都无法定位低频能力时,才执行 dws shortcut list --service chat --format json 做最后回退;不要为已知高频意图加载完整 Shortcut Catalog 或产品级 Schema。
chat +messages-send:通过 --as user|bot|webhook 选择身份,并只传该身份真实支持的目标、内容和凭据。仅在需要原子命令的特定返回结构或兼容参数时,才降级到 chat message send / send-by-bot / send-by-webhook。+chat-messages,跨维度过滤/全量翻页用 +search-msg,@我用 +at-me,已知消息 ID 批量富化用 +messages-mget,已知 thread/topic ID 读取回复用 +thread-replies。resourceRefs 是可继续执行的资源上下文。引用、回复或合并转发中的子消息必须使用该子消息返回的 messageId;子消息缺会话 ID 时才继承父消息的 openConversationId。+messages-resource-download 都沿用安全本地下载的 read/not_required 契约,不应添加 --yes 或触发交互确认。下载只允许工作目录内相对路径、默认不覆盖并原子落盘;需要覆盖时必须由用户显式传 --overwrite。+messages-send 会按身份规范化 @ 占位符:user 使用 <@id> / <@all>,bot/webhook 使用 @id / @手机号 / @all;只需声明 --at-* / --at-all,缺失占位符会自动补齐。+messages-send --as user --user <userId> 会通过通讯录关键词搜索并按 userId 精确匹配 openDingTalkId,所有内容类型与 --dry-run 都使用同一只读解析链路;已有 openDingTalkId 时直接传 --open-dingtalk-id。+messages-send-card:群聊传 --group,单聊 userId 传 --receiver 并由 CLI 通过通讯录关键词搜索做 userId 精确匹配,已有 openDingTalkId 则必须显式传 --receiver-open-dingtalk-id;三者严格三选一,禁止根据首字母猜身份类型。| 用户说 | 命令 |
|---|---|
| "发消息给张三" | dws chat +messages-send --as user --open-dingtalk-id <id> --text "<内容>" |
| "发到XX群" | dws chat +chat-search --query "<群名>" → dws chat +messages-send --as user --chat-id <openConversationId> --text "<内容>" |
| "建群" / "拉人进群" | dws chat group create / dws chat group members add |
| "改群名" / "踢人" | dws chat group rename / dws chat group members remove --yes(踢人不可逆,先确认目标) |
| "@我消息" | dws chat +at-me |
| "查群聊记录" | dws chat +chat-messages --group <openConversationId> |
| "收藏/取消收藏这条消息" | dws chat +flag-create / dws chat +flag-cancel |
| "查看我收藏的消息" | dws chat +flag-list |
| "用机器人发消息" | dws chat +messages-send --as bot --robot-code <code> --chat-id <id> --text "<内容>" |
| "Webhook 推一条" | dws chat +messages-send --as webhook --webhook-token <token> --text "<内容>" |
| "发送流式卡片" | dws chat +messages-send-card --group <openConversationId> --content "<内容>";单聊 userId 改用 --receiver,openDingTalkId 改用 --receiver-open-dingtalk-id |
| "撤回消息" | dws chat message recall --conversation-id <openConversationId> --msg-id <openMessageId> |
| "标记未读 / 清除红点 / 全部已读" | dws chat mark-unread / dws chat clear-red-point / dws chat clear-all-red-point |
| "置顶某条消息 / 取消消息置顶" | dws chat message set-top-msg / dws chat message unset-top-msg |
| "我加入的所有群 / 全部群列表" | dws chat group list-all |
命中以下意图必须按对应 SOP 顺序执行;禁止跳步、替换命令、编造 ID。每条命令必须带
--format json,执行后必须按"解析"步取真实字段(openDingTalkId/openConversationId/openMessageId)。
触发:发消息/单聊/通知某人/发到群里。
dws aisearch person --keyword "<姓名>" --dimension name --format json 取 openDingTalkId(优先)或 userId;群名 → 先 dws chat search --query "<群名>" --format json 取 openConversationId。dws chat message send --open-dingtalk-id <openDingTalkId> --text "<内容>" --format json(只有拿不到 openDingTalkId 时才用 --user <userId>);群聊 dws chat message send --group <openConversationId> --text "<内容>" --format json。result.openTaskId,它可用于确认提交成功,但不是撤回所需消息 ID。需要撤回时必须按 SOP-7 用带 --time 的 message list 回查,取得真实 openMessageId;返回非 success 必须如实报错,不要谎报已发。禁止:把人名/群名直接当 ID 传入、跳过 aisearch person/chat search 解析、跳过 --format json、未发送成功就答复"已发送"。
触发:建群/拉人进群/新建讨论组。
dws aisearch person --keyword "<姓名>" --dimension name --format json 取 userId,多人英文逗号拼接。dws chat group create --name "<群名>" --users <userId1,userId2,...> --format json;外部群加 --type EXTERNAL,话题圈加 --thread。openConversationId,可用 dws chat search --query "<群名>" --format json 复核。禁止:跳过成员 userId 解析直接传姓名、编造 openConversationId。
触发:用机器人群 webhook 推一条消息。
dws chat message send-by-webhook --token <webhookToken> --title "<标题>" --text "<内容>" --format json。--text 中必须先包含对应 @userId / @手机号 / @10,再配合 --at-users / --at-mobiles / --at-all;否则 @ 不生效。禁止:只传 --at-users 而 --text 里不含 @<标识>。
触发:"我和 XX 的共同群"。
dws contact user get-self --format json 取自己昵称;对方昵称从历史/上下文取,拿不到必须先问用户。dws chat search-common --nicks "<昵称1>,<昵称2>" --limit 20 --cursor 0 --format json;hasMore=true 时必须用 nextCursor 翻页,不要停在第一页。禁止:跳过昵称解析、忽略 hasMore 不翻页。
触发:标记未读/清除红点/全部已读。
dws chat mark-unread --conversation-id <openConversationId> --format json;清除某会话红点 dws chat clear-red-point --conversation-id <openConversationId> --format json;全部已读 dws chat clear-all-red-point --format json。openConversationId 拿不准时先 dws chat group list-all --format json 或 dws chat search --query "<群名>" --format json,禁止编造。禁止:未确认会话就批量"全部已读"(破坏性,必须先与用户确认)。
触发:"特别关注的人最近发了什么/聊了什么"。
dws chat message list-focused --limit 50 --format json,直接基于返回答复。dingtalk-contact 关系查询。禁止:用普通 message list 冒充 focused、把人员列表需求硬塞进 chat。
触发:查某个群或单聊的聊天记录、撤回某条消息。
dws chat search --query "<群名>" --format json 取 openConversationId;单聊对象先解析真实 userId 或 openDingTalkId。dws chat message list --group <openConversationId> --time "<yyyy-MM-dd HH:mm:ss>" --direction older --format json;单聊将 --group 换成 --user 或 --open-dingtalk-id。--time 是必填参数,必须来自用户时间范围或明确收敛后的边界。result.messages[].openMessageId 取真实 ID,执行 dws chat message recall --conversation-id <openConversationId> --msg-id <openMessageId> --format json。禁止:省略 --time、用发送返回的 clientMsgId 代替 openMessageId、只传 --client-msg-id、编造会话或消息 ID。
dingtalk-contact 或 dingtalk-aisearch 拿 openDingTalkId / userIddt_media_upload 上传 → python scripts/extract_media_id.py "<URL>" 提取 mediaId → 再用 --media-iddingtalk-misc(references/ding.md)dingtalk-mail1877870
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.