钉钉企业内部机器人渠道快速对接。Use when: 用户需要对接钉钉渠道、配置钉钉 Stream 模式、排查钉钉消息问题。NOT for: 飞书/Lark、企业微信等其他平台。
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install dingtalk-setup或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install dingtalk-setup⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/dingtalk-setup/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: dingtalk-setup description: "钉钉企业内部机器人渠道快速对接。Use when: 用户需要对接钉钉渠道、配置钉钉 Stream 模式、排查钉钉消息问题。NOT for: 飞书/Lark、企业微信等其他平台。" homepage: https://github.com/soimy/openclaw-channel-dingtalk metadata: { "openclaw": { "emoji": "💬", "requires": { "bins": ["openclaw"] } } } ---
钉钉企业内部机器人渠道快速对接指南。
✅ USE this skill when:
❌ DON'T use when:
feishu skillwecom skill 确保已准备:
国内网络环境(推荐使用镜像):
$env:NPM_CONFIG_REGISTRY="https://registry.npmmirror.com"
openclaw plugins install @soimy/dingtalk
国际网络:
openclaw plugins install @soimy/dingtalk
如需代理:
$env:HTTP_PROXY="http://127.0.0.1:7897"
$env:HTTPS_PROXY="http://127.0.0.1:7897"
openclaw plugins install @soimy/dingtalk
编辑 ~/.openclaw/openclaw.json,添加插件到白名单:
{
"plugins": {
"enabled": true,
"allow": ["dingtalk"]
}
}
如果已有其他插件,添加到数组中:
{
"plugins": {
"allow": ["telegram", "discord", "dingtalk"]
}
}
方式一:交互式配置(推荐)
openclaw configure --section channels
按提示操作:
方式二:手动编辑配置文件
编辑 ~/.openclaw/openclaw.json,添加 channel 配置:
{
"channels": [
{
"id": "dingtalk",
"plugin": "dingtalk",
"enabled": true,
"clientId": "your_client_id",
"clientSecret": "your_client_secret",
"dm": "open",
"group": "open"
}
]
}
完整配置示例:
{
"id": "dingtalk",
"plugin": "dingtalk",
"enabled": true,
"clientId": "ding3ti4ahg82dsfkwld",
"clientSecret": "FrpMFcI30c0STvaJJWyMSZoyeb2Hkm9YqXY-6mJ0dGwdN8Xux7mgT_Xn7qnpvO-F",
"robotCode": "your_robot_code",
"corpId": "your_corp_id",
"agentId": "your_agent_id",
"aiCard": false,
"dm": "open",
"group": "open"
}
openclaw gateway restart
| 参数 | 必需 | 说明 | 默认值 | |------|------|------|--------| | clientId | ✅ | DingTalk App Key | - | | clientSecret | ✅ | DingTalk App Secret | - | | robotCode | ❌ | 机器人代码 | - | | corpId | ❌ | 企业 ID | - | | agentId | ❌ | 应用 Agent ID | - | | aiCard | ❌ | 启用 AI 互动卡片 | false | | dm | ❌ | 私聊策略:open / allowlist | open | | group | ❌ | 群聊策略:open / allowlist | open |
测试连接:
# 检查 Gateway 状态
openclaw gateway status
# 查看日志
openclaw logs gateway
# 列出插件
openclaw plugins list
在钉钉中给机器人发送消息,应该能收到回复。
如果安装停在 "Installing plugin dependencies...":
cd ~/.openclaw/extensions/dingtalk
rm -rf node_modules package-lock.json
NPM_CONFIG_REGISTRY=https://registry.npmmirror.com npm install
openclaw gateway restart
检查清单:
```bash openclaw gateway status ```
检查 openclaw.json 中的 plugins.allow 包含 "dingtalk"
检查 channels[].enabled 为 true
在钉钉开放平台验证 Client ID/Secret
```bash openclaw gateway restart ```
# 设置 npm 镜像
$env:NPM_CONFIG_REGISTRY="https://registry.npmmirror.com"
# 设置代理(如需要)
$env:HTTP_PROXY="http://127.0.0.1:7897"
$env:HTTPS_PROXY="http://127.0.0.1:7897"
"Plugin not found"
openclaw plugins list~/.openclaw/extensions/dingtalk"Connection failed"
openclaw logs gateway"Plugin not loaded"
dingtalk 到 plugins.allow如果需要自动化批量部署,可以创建以下 PowerShell 脚本:
auto-setup.ps1:
# DingTalk Channel Auto Setup Script
# Usage: .\auto-setup.ps1 -ClientId "xxx" -ClientSecret "xxx"
param(
[Parameter(Mandatory=$true)]
[string]$ClientId,
[Parameter(Mandatory=$true)]
[string]$ClientSecret,
[string]$RobotCode = "",
[string]$CorpId = "",
[string]$AgentId = "",
[string]$ProxyUrl = "http://127.0.0.1:7897",
[string]$NpmRegistry = "https://registry.npmmirror.com",
[switch]$UseProxy = $false
)
Write-Host "=== DingTalk Channel Auto Setup ===" -ForegroundColor Cyan
# Set proxy if needed
if ($UseProxy) {
$env:HTTP_PROXY = $ProxyUrl
$env:HTTPS_PROXY = $ProxyUrl
}
# Set npm registry
$env:NPM_CONFIG_REGISTRY = $NpmRegistry
# Install plugin
Write-Host "Installing plugin..." -ForegroundColor Yellow
openclaw plugins install @soimy/dingtalk
# Update openclaw.json
Write-Host "Updating configuration..." -ForegroundColor Yellow
$configPath = "$env:USERPROFILE\.openclaw\openclaw.json"
$config = Get-Content $configPath -Raw | ConvertFrom-Json
# Add plugin to allowlist
if (-not $config.plugins) {
$config | Add-Member -MemberType NoteProperty -Name "plugins" -Value @{
enabled = $true
allow = @("dingtalk")
}
} else {
if (-not $config.plugins.allow) {
$config.plugins | Add-Member -MemberType NoteProperty -Name "allow" -Value @("dingtalk")
} elseif ($config.plugins.allow -notcontains "dingtalk") {
$config.plugins.allow += "dingtalk"
}
}
# Add channel configuration
if (-not $config.channels) {
$config | Add-Member -MemberType NoteProperty -Name "channels" -Value @()
}
$dingtalkConfig = @{
id = "dingtalk"
plugin = "dingtalk"
enabled = $true
clientId = $ClientId
clientSecret = $ClientSecret
dm = "open"
group = "open"
}
if ($RobotCode) { $dingtalkConfig.robotCode = $RobotCode }
if ($CorpId) { $dingtalkConfig.corpId = $CorpId }
if ($AgentId) { $dingtalkConfig.agentId = $AgentId }
$config.channels = @($config.channels | Where-Object { $_.id -ne "dingtalk" })
$config.channels += $dingtalkConfig
$config | ConvertTo-Json -Depth 10 | Set-Content $configPath
# Restart Gateway
Write-Host "Restarting Gateway..." -ForegroundColor Yellow
openclaw gateway restart
Write-Host "Setup Complete!" -ForegroundColor Green
使用方法:
# 基本用法
.\auto-setup.ps1 -ClientId "your_id" -ClientSecret "your_secret"
# 使用代理
.\auto-setup.ps1 -ClientId "your_id" -ClientSecret "your_secret" -UseProxy
# 完整配置
.\auto-setup.ps1 `
-ClientId "your_id" `
-ClientSecret "your_secret" `
-RobotCode "your_code" `
-CorpId "your_corp" `
-AgentId "your_agent" `
-UseProxy
~/.openclaw/openclaw.json~/.openclaw/extensions/dingtalkopenclaw logs gateway安装 DingTalk Channel Setup 后,可以对 AI 说这些话来触发它
Send a Slack message to the #engineering channel about the deployment
Formats and sends the message with relevant context, tagging the right people
Summarize all unread messages in my inbox from today
Reads messages across connected channels and returns a prioritized summary
Draft a reply to this customer complaint and send it for review
Writes an empathetic, professional response and routes it to the approval queue
将技能文件夹放到 ~/.claude/skills/dingtalk-setup/ 目录(个人级,所有项目可用),或 .claude/skills/dingtalk-setup/(项目级)。重启 AI 客户端后,用 /dingtalk-setup 主动调用,或让 AI 根据上下文自动发现并使用。
DingTalk Channel Setup 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
DingTalk Channel Setup 可免费安装使用。请查阅仓库了解许可证信息。
钉钉企业内部机器人渠道快速对接。Use when: 用户需要对接钉钉渠道、配置钉钉 Stream 模式、排查钉钉消息问题。NOT for: 飞书/Lark、企业微信等其他平台。
DingTalk Channel Setup 属于「Communication」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。