← Back to Skills Marketplace
n-wen

钉钉群聊管理

by 文宁 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
334
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install dingtalk-group
Description
调用钉钉开放平台 API,提供群聊管理功能(创建群、修改群、解散群、成员管理等)
README (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

Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install dingtalk-group
  3. After installation, invoke the skill by name or use /dingtalk-group
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Slug dingtalk-group
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is 钉钉群聊管理?

调用钉钉开放平台 API,提供群聊管理功能(创建群、修改群、解散群、成员管理等). It is an AI Agent Skill for Claude Code / OpenClaw, with 334 downloads so far.

How do I install 钉钉群聊管理?

Run "/install dingtalk-group" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is 钉钉群聊管理 free?

Yes, 钉钉群聊管理 is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does 钉钉群聊管理 support?

钉钉群聊管理 is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created 钉钉群聊管理?

It is built and maintained by 文宁 (@n-wen); the current version is v1.0.0.

💬 Comments