add-dingtalk
Skill98 starsChanged 8 months agoApache-2.0View on GitHub
Add DingTalk as a channel. Uses Stream Mode (WebSocket, no public URL needed). Auto-registers groups on first message.
- Reads credentials
1 other project uses a version of this.
Adopted by
Most recently taken up by
- FISHers6/clawBrotheir own version, first seen Oct 8, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- FISHers6/clawBro★ 28same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository20 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- add-discordSkill
- add-gmailSkill
- add-ollama-toolSkill
- add-parallelSkill
- add-slackSkill
- add-telegramSkill
- add-telegram-swarmSkill
- add-vaspSkill
- add-voice-transcriptionSkill
- add-whatsappSkill
- convert-to-apple-containerSkill
- customizeSkill
- debugSkill
- get-qodo-rulesSkill
- qodo-pr-resolverSkill
- setupSkill
- update-matclawSkill
- use-local-whisperSkill
- x-integrationSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
20 rules. About 0 are common, 11 are distinctive, and 9 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈11
Distinctive · estimate
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 14
Read .matclaw/state.yaml. If dingtalk is in applied_skills, skip to Phase 3 (Setup).
- Distinctive: line 18
Do they already have a DingTalk app configured?: If yes, collect the Client ID and Client Secret now.
- Distinctive: line 22
Run the skills engine to apply this skill's code package.
- Very specific: line 26
If .matclaw/ directory doesn't exist yet:
- Distinctive: line 46
If the apply reports merge conflicts, read the intent file:
- Very specific: line 62
If the user doesn't have a DingTalk app, share DINGTALK_SETUP.md or guide them through these steps:
- Distinctive: line 71
Add the bot to a DingTalk group chat
- Distinctive: line 73
Wait for the user to provide both credentials.
- Distinctive: line 77
Run the auth script:
- Very specific: line 122
No manual registration step is needed.
- Distinctive: line 146
Verify Stream Mode is enabled in the DingTalk app settings
- Distinctive: line 147
Verify the app has been published/released
- Distinctive: line 148
Verify the bot has been added to the group
- Very specific: line 149
Check service is running: systemctl --user status matclaw
- Distinctive: line 153
Verify Client ID (AppKey) and Client Secret (AppSecret) are correct
- Distinctive: line 154
Make sure the app type is "Enterprise Internal App" (not ISV)
- Very specific: line 159
Check logs for send errors: grep "DingTalk.*send\|DingTalk.*failed" logs/matclaw.log
- Very specific: line 161
Verify the app has qyapi_robot_sendmsg permission
- Very specific: line 166
Check that conversationType is being read correctly in logs
- Very specific: line 167
Verify the group's requiresTrigger setting matches expectations
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Add DingTalk Channel
This skill adds DingTalk support to MatClaw using the skills engine for deterministic code changes, then walks through interactive setup.
Phase 1: Pre-flight
Check if already applied
Read .matclaw/state.yaml. If dingtalk is in applied_skills, skip to Phase 3 (Setup). The code changes are already in place.
Ask the user
Do they already have a DingTalk app configured? If yes, collect the Client ID and Client Secret now. If no, we'll create one in Phase 3.
Phase 2: Apply Code Changes
Run the skills engine to apply this skill's code package.
Initialize skills system (if needed)
If .matclaw/ directory doesn't exist yet:
npx tsx scripts/apply-skill.ts --initApply the skill
npx tsx scripts/apply-skill.ts .claude/skills/add-dingtalkThis deterministically:
- Adds
src/channels/dingtalk.ts(DingTalkChannel class with self-registration viaregisterChannel) - Adds
src/dingtalk-auth.ts(interactive credential setup) - Appends
import './dingtalk.js'to the channel barrel filesrc/channels/index.ts - Installs the
dingtalk-streamnpm dependency - Adds
auth:dingtalknpm script - Records the application in
.matclaw/state.yaml
If the apply reports merge conflicts, read the intent file:
modify/src/channels/index.ts.intent.md— what changed and invariants
Validate code changes
npx tsc --noEmit
npm run buildBuild must be clean before proceeding.
Phase 3: Setup
Create DingTalk App
If the user doesn't have a DingTalk app, share DINGTALK_SETUP.md or guide them through these steps:
- Go to DingTalk Open Platform
- Click "Create App" (create an H5 Micro App or Enterprise Internal App)
- In the app settings, go to "Robot" section and enable "Robot configuration"
- Set message receiving mode to Stream Mode (Stream 模式)
- Copy the Client ID (AppKey) and Client Secret (AppSecret) from the credentials page
- In "Permissions", grant:
qyapi_robot_sendmsg,qyapi_chat_manage - Publish/release the app
- Add the bot to a DingTalk group chat
Wait for the user to provide both credentials.
Configure credentials
Run the auth script:
npm run auth:dingtalkThis interactively:
- Collects Client ID and Client Secret
- Tests the connection by fetching an access token
- Saves credentials to
store/dingtalk-credentials.json(mode 0600)
Alternatively, users can create the file manually:
{
"clientId": "your-app-key",
"clientSecret": "your-app-secret"
}Build and restart
npm run buildFor systemd:
systemctl --user restart matclawFor launchd:
launchctl kickstart -k gui/$(id -u)/com.matclawPhase 4: Registration
DingTalk groups are auto-registered on first message. When a user sends a message mentioning the bot in a DingTalk group (or sends a 1-on-1 message), the channel automatically:
- Creates a group folder (
groups/dingtalk_<id>/) - Writes a default
CLAUDE.md - Registers the group in the database
- Delivers the message to the agent
No manual registration step is needed. The JID format is: dingtalk:<conversationId>.
Phase 5: Verify
Test the connection
Tell the user:
- Make sure the bot has been added to your DingTalk group
- Send a message in the group:
@BotName hello- For 1-on-1 chats: send any message directly to the bot
- The bot should respond within a few seconds
Check logs if needed
tail -f logs/matclaw.log | grep -i dingtalkTroubleshooting
Bot not responding
- Check credentials:
cat store/dingtalk-credentials.json - Verify Stream Mode is enabled in the DingTalk app settings
- Verify the app has been published/released
- Verify the bot has been added to the group
- Check service is running:
systemctl --user status matclaw
"invalid client" error
- Verify Client ID (AppKey) and Client Secret (AppSecret) are correct
- Make sure the app type is "Enterprise Internal App" (not ISV)
- Re-run
npm run auth:dingtalkto re-enter credentials
Bot receives messages but doesn't reply
- Check logs for send errors:
grep "DingTalk.*send\|DingTalk.*failed" logs/matclaw.log - The bot uses session webhook for replies (fast) and falls back to OpenAPI
- Verify the app has
qyapi_robot_sendmsgpermission
Message not reaching the bot
- In group chats, messages must @mention the bot to trigger it
- Check that
conversationTypeis being read correctly in logs - Verify the group's
requiresTriggersetting matches expectations
After Setup
The DingTalk channel supports:
- Group chats — Bot responds when @mentioned (trigger required)
- 1-on-1 chats — Bot responds to all messages (no trigger needed)
- Auto-registration — New groups/chats register automatically
- Markdown formatting — Responses use DingTalk markdown
- Multi-channel — Runs alongside Feishu, Slack, or other channels
Known Limitations
- No image upload — DingTalk's robot API has limited image support. Plots and images generated by the agent are sent as text links rather than inline images.
- No typing indicator — DingTalk's Bot API does not expose a typing indicator. Users won't see "bot is typing..." while the agent works.
- Session webhook expiry — The session webhook (for fast replies) expires after ~1 hour. Replies after expiry use the OpenAPI fallback, which requires additional permissions.
- Markdown subset — DingTalk supports a limited subset of markdown. Some formatting may not render as expected.
- No file sending — File attachments referenced in agent output are shown as text links.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

