← 返回 Skills 市场
n-wen

钉钉群聊管理

作者 文宁 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
334
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install dingtalk-group
功能描述
调用钉钉开放平台 API,提供群聊管理功能(创建群、修改群、解散群、成员管理等)
使用说明 (SKILL.md)

DingTalk Group Management Skill

通过钉钉开放平台旧版 API(oapi.dingtalk.com)管理内部群会话。

前置要求

  • 已设置环境变量 DINGTALK_APP_KEYDINGTALK_APP_SECRET
  • 钉钉应用已创建并拥有「钉钉群基础信息管理」权限
  • 仅支持企业内部应用(第三方应用不支持)
  • 依赖 @alicloud/dingtalk@alicloud/openapi-client(用于获取 access_token)

环境变量

export DINGTALK_APP_KEY="\x3Cyour-app-key>"
export DINGTALK_APP_SECRET="\x3Cyour-app-secret>"

功能列表

1. 创建群 (chat/create)

创建内部群会话。适用于项目协作、活动组织等场景。

脚本路径: scripts/create-group.ts

用法

ts-node scripts/create-group.ts \
  --name "群名称" \
  --owner \x3CownerUserId> \
  --members \x3CuserId1,userId2,...> \
  [--showHistoryType 1] \
  [--searchable 0] \
  [--validationType 0] \
  [--mentionAllAuthority 0] \
  [--managementType 0] \
  [--chatBannedType 0] \
  [--debug]

必填参数

参数 说明
--name 群名称,1~20 个字符
--owner 群主的 userId,必须在 --members 中
--members 群成员 userId 列表,逗号分隔,每次最多 40 人,群上限 1000 人

可选参数

参数 默认值 说明
--showHistoryType 0 新成员是否可查看 100 条历史消息(1=可查看,0=不可)
--searchable 0 群是否可被搜索(1=可搜索,0=不可)
--validationType 0 入群是否需要验证(1=需要,0=不需要)
--mentionAllAuthority 0 @all 使用范围(0=所有人,1=仅群主)
--managementType 0 群管理类型(0=所有人可管理,1=仅群主)
--chatBannedType 0 是否开启群禁言(0=不禁言,1=全员禁言)
--debug - 输出调试信息(请求参数和完整响应)

示例

# 创建一个项目协作群
ts-node scripts/create-group.ts \
  --name "项目协作群" \
  --owner manager4220 \
  --members "manager4220,userid1,userid2" \
  --showHistoryType 1

# 创建一个仅群主管理的群(带调试输出)
ts-node scripts/create-group.ts \
  --name "管理通知群" \
  --owner manager4220 \
  --members "manager4220,userid1,userid2,userid3" \
  --managementType 1 \
  --mentionAllAuthority 1 \
  --debug

成功输出

{
  "success": true,
  "chatid": "chatcf0675d404188xxxx",
  "openConversationId": "cidL+NXxxxx+MSA==",
  "conversationTag": 2
}
  • openConversationId 是群会话唯一标识(推荐使用),后续发消息、管理群时需要此值
  • chatid 已废弃,请使用 openConversationId
  • conversationTag: 2 表示企业群

错误输出

{
  "success": false,
  "error": {
    "code": "49013",
    "message": "群主不能为空"
  }
}

错误码速查

errcode errmsg 解决方案
43007 需要授权 检查 access_token / 应用权限
43009 参数需要是 json 格式 内部错误,检查脚本
40031 无效的 useridlist 列表 检查 userId 是否存在
40035 群名称不能为空 --name 必填
400002 参数过长 --name 不超过 20 字符
49013 群主不能为空 --owner 必填
49010 群成员不能为空 --members 必填
49011 群成员长度超限 --members 单次最多 40 人
1002 组织建群超出上限 改用会话 2.0 建群 API

注意事项

  1. --owner 的 userId 必须包含在 --members 列表中(脚本会自动校验)
  2. 获取 userId 可通过「根据手机号查询用户」接口
  3. access_token 由脚本自动获取,无需手动管理
  4. 日志信息输出到 stderr,结果 JSON 输出到 stdout,方便管道处理

2. 修改群信息(待实现)

POST https://oapi.dingtalk.com/chat/update?access_token=ACCESS_TOKEN

3. 获取群信息(待实现)

GET https://oapi.dingtalk.com/chat/get?access_token=ACCESS_TOKEN&chatid=CHATID

4. 成员管理(待实现)

  • 添加成员:POST https://oapi.dingtalk.com/chat/member/add
  • 移除成员:POST https://oapi.dingtalk.com/chat/member/remove

5. 解散群(待实现)

POST https://oapi.dingtalk.com/chat/disband?access_token=ACCESS_TOKEN

安全使用建议
This skill appears to do what it says (create/manage DingTalk groups) and requires only your DingTalk app key and secret. Before installing or running it: 1) Confirm you trust the publisher (source is unknown); 2) Do not supply broader credentials — only set DINGTALK_APP_KEY and DINGTALK_APP_SECRET for an app that has minimal permissions (group management only); 3) Because there is no install spec, run it in a controlled environment (container or isolated VM) after installing ts-node and the declared npm packages from the official registry; 4) Ask the publisher to update the registry metadata to declare the required env vars and to provide an install script or README so you know exactly which packages will be installed; 5) If you can't verify the source, consider reviewing or running the script in a sandbox before giving it access to real credentials.
功能分析
Type: OpenClaw Skill Name: dingtalk-group Version: 1.0.0 The skill bundle provides a legitimate implementation for managing DingTalk internal groups via the official DingTalk Open Platform API. The core logic in `scripts/create-group.ts` uses standard Alibaba Cloud SDKs for authentication and performs authorized API calls to `oapi.dingtalk.com`. No evidence of data exfiltration, malicious execution, or prompt injection was found.
能力评估
Purpose & Capability
The code and SKILL.md match the stated purpose (creating/managing DingTalk internal groups) and legitimately require DingTalk app credentials. However, the registry metadata lists no required environment variables or primary credential even though SKILL.md and the code explicitly require DINGTALK_APP_KEY and DINGTALK_APP_SECRET — this mismatch is an inconsistency that should be explained by the publisher.
Instruction Scope
Runtime instructions and the included script confine network calls to the DingTalk Open Platform (oapi.dingtalk.com) and only access the two DingTalk-related environment variables. The script prints debugging info to stderr/stdout and otherwise stays within the stated scope (no filesystem crawling, no unrelated network endpoints).
Install Mechanism
There is no install spec despite the code depending on external Node/TypeScript packages (@alicloud/dingtalk, @alicloud/openapi-client) and ts-node. That increases supply-chain/install ambiguity: a user must install these packages manually or run in an environment that already has them. Lack of declared installation steps is a practical risk (missing or malicious dependency substitution) and should be remedied by the publisher.
Credentials
The only required secrets in SKILL.md and the script are DINGTALK_APP_KEY and DINGTALK_APP_SECRET, which are proportionate to the skill's purpose. However, the registry metadata does not declare these required environment variables or a primary credential, which is a mismatch that can lead to accidental credential exposure or misuse if installers are unaware. No other unrelated credentials or paths are requested.
Persistence & Privilege
The skill does not request persistent or elevated platform privileges (always:false). It does not attempt to modify other skills or system-wide configuration. Autonomous invocation is allowed by default but is not combined with other high-risk behaviors here.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install dingtalk-group
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /dingtalk-group 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of dingtalk-group skill: - Provides group chat management via DingTalk Open Platform API. - Supports creating internal groups, including detailed command-line parameters. - Requires app credentials and group management permissions. - Outputs clear success/error JSON, with troubleshooting guidance. - Features for modifying group info, retrieving group info, managing members, and dissolving groups are outlined for future implementation.
元数据
Slug dingtalk-group
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

钉钉群聊管理 是什么?

调用钉钉开放平台 API,提供群聊管理功能(创建群、修改群、解散群、成员管理等). 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 334 次。

如何安装 钉钉群聊管理?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install dingtalk-group」即可一键安装,无需额外配置。

钉钉群聊管理 是免费的吗?

是的,钉钉群聊管理 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

钉钉群聊管理 支持哪些平台?

钉钉群聊管理 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 钉钉群聊管理?

由 文宁(@n-wen)开发并维护,当前版本 v1.0.0。

💬 留言讨论