Dingtalk Message logo

Dingtalk Message

Community
breath57
dingtalk-message

钉钉消息发送。当用户提到"钉钉消息"、"发消息"、"发通知"、"群通知"、"群消息"、"Webhook"、"机器人消息"、"机器人发消息"、"工作通知"、"单聊消息"、"群聊消息"、"撤回消息"、"消息已读"、"发送Markdown"、"发卡片消息"、"ActionCard"、"@某人"、"@员工"、"at某人"、"提醒某人"、"dingtalk message"、"send message"、"robot message"、"work notification"时使用此技能。支持:群自定义 Webhook 机器人(文本/Markdown/ActionCard/Link/FeedCard + 加签 + @某人)、企业内部应用机器人单聊和群聊发送、消息撤回、已读查询、工作通知等全部消息类操作。

Overview

Publisherbreath57
Repositorydingtalk-skills
Skill namedingtalk-message
Stars
102
Forks
10
Bundled files
2
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 2 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by breath57 on GitHub. Read the source before you install it.

Installation

Install the Dingtalk Message AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/breath57/dingtalk-skills/tree/main/.agents/skills/dingtalk-message
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/breath57/dingtalk-skills.git /tmp/dingtalk-skills
mkdir -p .claude/skills
cp -r /tmp/dingtalk-skills/.agents/skills/dingtalk-message .claude/skills/dingtalk-message
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Dingtalk Message in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Dingtalk Message on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Dingtalk Message is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

钉钉消息技能

负责钉钉消息发送的所有操作。本文件为策略指南;完整 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 位 + ****
  • 消息内容缺失时:先询问用户想发什么,不要自行编造

身份标识

消息 API 只接受 userId(staffId),不接受 unionId。详见 grep -A 20 "^## 身份标识" references/api.md。

  • unionId → userId 转换:bash scripts/dt_helper.sh --to-userid <unionId>
  • 群消息发送方式选择:发群消息时须先询问用户用 Webhook 还是企业机器人,详见 grep -A 20 "^### 群消息发送方式选择" references/api.md

执行脚本模板

bash
#!/bin/bash
set -e
HELPER="./scripts/dt_helper.sh"
TOKEN=$(bash "$HELPER" --token)
USER_ID=$(bash "$HELPER" --get DINGTALK_MY_USER_ID | cut -d= -f2)

# 机器人单聊示例
RESP=$(curl -s -w '\nHTTP_STATUS:%{http_code}' -X POST "https://api.dingtalk.com/v1.0/robot/oToMessages/batchSend" \
  -H "x-acs-dingtalk-access-token: $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"robotCode":"'$(bash "$HELPER" --get DINGTALK_APP_KEY | cut -d= -f2)'","userIds":["'$USER_ID'"],"msgKey":"sampleText","msgParam":"{\"content\":\"测试消息\"}"}')
echo "$RESP"
bash
#!/bin/bash
set -e
HELPER="./scripts/dt_helper.sh"
OLD_TOKEN=$(bash "$HELPER" --old-token)
AGENT_ID=$(bash "$HELPER" --get DINGTALK_AGENT_ID | cut -d= -f2)
USER_ID=$(bash "$HELPER" --get DINGTALK_MY_USER_ID | cut -d= -f2)

# 工作通知示例
RESP=$(curl -s -w '\nHTTP_STATUS:%{http_code}' -X POST "https://oapi.dingtalk.com/topapi/message/corpconversation/asyncsend_v2?access_token=$OLD_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"agent_id":"'$AGENT_ID'","userid_list":"'$USER_ID'","msg":{"msgtype":"text","text":{"content":"测试工作通知"}}}')
echo "$RESP"

Token 异常时:bash "$HELPER" --token --nocache 或 bash "$HELPER" --old-token --nocache

references/api.md 查阅索引

bash
grep -A 196 "^## 一、群自定义 Webhook 机器人" references/api.md
grep -A 192 "^## 二、企业内部应用机器人" references/api.md
grep -A 145 "^## 三、工作通知" references/api.md
grep -A 60  "^## 四、sessionWebhook" references/api.md
grep -A 30  "^## 场景路由" references/api.md
grep -A 20  "^### 群消息发送方式选择" references/api.md
grep -A 25  "^## 身份标识" references/api.md
grep -A 30  "^## 消息类型速查" references/api.md
grep -A 33  "^## 错误码" references/api.md
grep -A 12  "^## 所需应用权限" references/api.md

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Dingtalk Message AI skill do?

钉钉消息发送。当用户提到"钉钉消息"、"发消息"、"发通知"、"群通知"、"群消息"、"Webhook"、"机器人消息"、"机器人发消息"、"工作通知"、"单聊消息"、"群聊消息"、"撤回消息"、"消息已读"、"发送Markdown"、"发卡片消息"、"ActionCard"、"@某人"、"@员工"、"at某人"、"提醒某人"、"dingtalk message"、"send message"、"robot message"、"work notification"时使用此技能。支持:群自定义 Webhook 机器人(文本/Markdown/ActionCard/Link/FeedCard + 加签 + @某人)、企业内部应用机器人单聊和群聊发送、消息撤回、已读查询、工作通知等全部消息类操作。

Why use Dingtalk Message on TypingMind?

Because you install it once and use it with any model. Dingtalk Message is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Dingtalk Message in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/breath57/dingtalk-skills/tree/main/.agents/skills/dingtalk-message. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Dingtalk Message?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Dingtalk Message?

As many as you like. As long as a model supports skills, you can use Dingtalk Message with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Dingtalk Message AI skill free?

It is published on GitHub by breath57. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇