dingtalk-message

breath57/dingtalk-skills · updated Apr 8, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/breath57/dingtalk-skills --skill dingtalk-message
0 commentsdiscussion
summary

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

skill.md

钉钉消息技能

负责钉钉消息发送的所有操作。本文件为策略指南;完整 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

各通道所需配置

通道 所需配置 来源说明
Webhook DINGTALK_WEBHOOK_URL(加签额外需 DINGTALK_WEBHOOK_SECRET 群设置 → 智能群助手 → 添加自定义机器人
机器人消息 DINGTALK_APP_KEY + DINGTALK_APP_SECRET 开放平台 → 应用管理 → 凭证信息
工作通知 DINGTALK_APP_KEY + DINGTALK_APP_SECRET + DINGTALK_AGENT_ID agentId 在应用管理 → 基本信息
  • 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

执行脚本模板

#!/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"
#!/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 --nocachebash "$HELPER" --old-token --nocache

references/api.md 查阅索引

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
how to use dingtalk-message

How to use dingtalk-message on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add dingtalk-message
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills add https://github.com/breath57/dingtalk-skills --skill dingtalk-message

The skills CLI fetches dingtalk-message from GitHub repository breath57/dingtalk-skills and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/dingtalk-message

Reload or restart Cursor to activate dingtalk-message. Access the skill through slash commands (e.g., /dingtalk-message) or your agent's skill management interface.

Security & Verification Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

User Story & Requirements Generation

Create detailed user stories, acceptance criteria, and feature specs

Example

Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios

Reduce spec writing time by 50%, ensure comprehensive coverage

Competitive Analysis

Research competitors, compare features, identify gaps

Example

Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities

Complete competitive research in 2 hours instead of 2 days

Roadmap Prioritization

Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs

Example

Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale

Make data-driven prioritization decisions faster

Stakeholder Communication

Draft PRDs, status updates, and stakeholder presentations

Example

Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement

Save 3-5 hours/week on communication overhead

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client
  • Access to product documentation and roadmap tools (Jira, Notion, etc.)
  • Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
  • Stakeholder contact information and communication channels

Time Estimate

30-60 minutes to see productivity improvements

Installation Steps

  1. 1.Install product management skill
  2. 2.Start with user story generation for known feature
  3. 3.Progress to competitive analysis: research 2-3 competitors
  4. 4.Use for roadmap prioritization: apply RICE/ICE scoring
  5. 5.Draft stakeholder communications and refine based on feedback
  6. 6.Build template library for recurring PM tasks
  7. 7.Share effective prompts with product team

Common Pitfalls

  • Not validating competitive research—verify facts before sharing
  • Accepting user stories without involving engineering team
  • Over-relying on frameworks without qualitative judgment
  • Not customizing outputs to company culture and communication style
  • Skipping stakeholder validation of generated requirements

Best Practices

✓ Do

  • +Validate research and competitive analysis with real data
  • +Collaborate with engineering when generating technical requirements
  • +Customize frameworks and templates to your company context
  • +Use skill for first drafts, refine with stakeholder input
  • +Document successful prompt patterns for PM tasks
  • +Combine AI efficiency with human judgment and intuition

✗ Don't

  • Don't publish competitive analysis without fact-checking
  • Don't finalize user stories without engineering review
  • Don't make prioritization decisions solely on AI scoring
  • Don't skip customer validation of generated requirements
  • Don't ignore company-specific context and culture

💡 Pro Tips

  • Provide context: company goals, constraints, customer feedback
  • Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
  • Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
  • Use skill for 70% generation + 30% customization to company needs

When to Use This

✓ Use When

Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.

✗ Avoid When

Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.

Learning Path

  1. 1Basic: user stories, feature specs, status updates
  2. 2Intermediate: competitive analysis, prioritization frameworks, PRDs
  3. 3Advanced: product strategy, go-to-market planning, OKR setting
  4. 4Expert: product vision, market positioning, business model innovation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.834 reviews
  • Carlos Reddy· Dec 28, 2024

    We added dingtalk-message from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Min Srinivasan· Dec 12, 2024

    Useful defaults in dingtalk-message — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Zaid Dixit· Dec 8, 2024

    dingtalk-message has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • James White· Nov 27, 2024

    dingtalk-message fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Camila Agarwal· Nov 19, 2024

    Solid pick for teams standardizing on skills: dingtalk-message is focused, and the summary matches what you get after install.

  • Xiao Thomas· Nov 3, 2024

    dingtalk-message is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Neel Johnson· Oct 22, 2024

    Keeps context tight: dingtalk-message is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Henry Sethi· Oct 18, 2024

    We added dingtalk-message from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Nikhil Huang· Oct 10, 2024

    dingtalk-message has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Oshnikdeep· Sep 17, 2024

    I recommend dingtalk-message for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

showing 1-10 of 34

1 / 4