breath57 avatar

Dingtalk Message

This handles the full spectrum of DingTalk messaging, from simple webhook notifications to group chats to direct messages to work announcements. It supports all the message types you'd expect (text, Markdown, ActionCard, FeedCard) plus @ mentions, message recall, and read receipts. The skill includes a helper script that manages tokens and credentials, converts unionIds to userIds when needed, and routes your request to the right API endpoint. Four different messaging channels are supported depending on whether you're posting to a group, sending a private message, or broadcasting a company-wide notification. It's comprehensive but assumes you already know which DingTalk messaging scenario you need.

skills.sh installs
1.6K
GitHub stars
102
last updated
Aug 21, 2026

Install

$ npx -y skills add breath57/dingtalk-skills --skill dingtalk-message --agent claude-code

Installs into .claude/skills of the current project.

Files

钉钉消息技能

负责钉钉消息发送的所有操作。本文件为策略指南;完整 API 请求格式、场景路由、消息类型速查、身份标识、错误码等见 references/api.md。

dt_helper.sh 位于本 SKILL.md 同级目录的 scripts/dt_helper.sh。

四种消息通道

通道适用场景Token特点
Webhook 机器人往指定群发通知无需最简单;URL 自带凭证
企业内部应用机器人单聊私信 / 群聊--token(新版)可撤回、查已读
工作通知应用推送到"工作通知"--old-token(旧版)可推全员/部门
sessionWebhook回调中直接回复无需回调消息自带临时 URL

工作流程(每次执行前)

  1. 识别通道 → 按 api.md「场景路由」判断属于哪个通道
  2. 校验配置 → bash scripts/dt_helper.sh --get KEY 读取该通道所需键值
  3. 收集缺失项 → 一次性询问并 bash scripts/dt_helper.sh --set KEY=VALUE 写入
  4. 获取 Token → 机器人用 --token;工作通知用 --old-token;Webhook/sessionWebhook 无需
  5. 执行 API → 多行逻辑写入 /tmp/<task>.sh 再执行;禁止 heredoc

各通道所需配置

通道所需配置来源说明
WebhookDINGTALK_WEBHOOK_URL(加签额外需 DINGTALK_WEBHOOK_SECRET)群设置 → 智能群助手 → 添加自定义机器人
机器人消息DINGTALK_APP_KEY + DINGTALK_APP_SECRET开放平台 → 应用管理 → 凭证信息
工作通知DINGTALK_APP_KEY + DINGTALK_APP_SECRET + DINGTALK_AGENT_IDagentId 在应用管理 → 基本信息
  • robotCode = appKey(完全一致,无需额外配置)
  • 凭证禁止在输出中完整打印,确认时仅显示前 4 位 + ****
  • 消息内容缺失时:先询问用户想发什么,不要自行编造

Sponsors

Details

Repository
github.com/breath57/dingtalk-skills
First seen
Apr 16, 2026

More from breath57/dingtalk-skills

All 6

Recommended

1juliusbrussee avatarcavemanjuliusbrussee/cavemanUltra-compressed communication mode. Cuts output tokens 65% (measured) by speaking like caveman while keeping full technical accuracy. Supports intensity levels618.3Kskills.sh installs
2mattpocock avatargrill-memattpocock/skillsA relentless interview to sharpen a plan or design.1.5Mskills.sh installs
3shadcn avatarimproveshadcn/improveSurvey any codebase as a senior advisor and produce prioritized, self-contained implementation plans for OTHER models/agents to execute. Strictly read-only on s40Kskills.sh installs
4obra avatarsystematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes326.7Kskills.sh installs
5forrestchang avatarkarpathy-guidelinesforrestchang/andrej-karpathy-skillsBehavioral guidelines to reduce common LLM coding mistakes through explicit assumptions, simplicity, and verifiable success criteria.17.9Kskills.sh installs
6vercel-labs avatarfind-skillsvercel-labs/skillsHelps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express int4.3Mskills.sh installs