ding-agent
Installation
SKILL.md
SKILL: ding-agent
ding-agent is a skill for quickly locating and contacting other Agents (demo1, demo2, etc.) within DingTalk group chats.
Usage
/ding-agent <Agent名称>
Core Resolution Rules (No Hardcoded agentId)
-
Match Agent — From the OpenClaw
agents.listconfiguration, match the user's input againstidentity.name:- Input "demo1" → match
nameoridentity.namecontaining "demo1" → resolveagentId - Input "demo2" → match
identity.namecontaining "demo2" → resolveagentId
- Input "demo1" → match
-
Find Binding — From
bindings, find theaccountIdandchannelfor the matchedagentId:- e.g.,
agentId: "demo-agent-1"→accountId: "demo-bot-1",channel: "dingtalk-connector"
- e.g.,
-
Compose Session Key — Derive from current session info:
agent:<agentId>:<channel>:group:<当前群ID>:<当前发送者ID> -
Attempt Contact — Use
sessions_sendto the target session:- Success → return result
- Failure → prompt "需要在钉钉群中 @<Agent名称>"
Security Guidelines
- Do not hardcode
agentId,accountId, or session keys into any file. - All agent resolution is done dynamically from the OpenClaw configuration at runtime.
- Do not expose internal session details (accountId, channel, session key) in user-facing chat output.
- Self-contact prevention: If the resolved session key belongs to the current agent (same agentId), refuse to send and prompt the user: "你正在尝试联系自己,请确认目标 Agent 名称。"
- Contact failures are handled gracefully with user-friendly prompts.
How to Execute
- First invocation only — read
${CLAUDE_SKILL_DIR}/docs/setup.mdfor configuration and runtime detection. - Match the action from the table below.
- Read the corresponding doc file for detailed steps.
- If no arguments or unrecognized action, show the help table below.
- If the user asks about ding-agent (what it is, how to use it) — read
${CLAUDE_SKILL_DIR}/docs/help.mdand follow the instructions there.
Actions
| Action | Description | Details |
|---|---|---|
contact |
Contact a specified Agent by name | docs/actions-contact.md |
list-agents |
List all available Agents from config | docs/actions-query.md |
current-session |
Show current session information | docs/actions-query.md |
list-sessions |
List sessions for a specific Agent | docs/actions-query.md |
help |
FAQ and help | docs/help.md |
help (or no arguments) — Show available actions
| Action | Usage | Description |
|---|---|---|
contact |
/ding-agent contact <Agent名称> <message> |
Contact a specified Agent by name |
list-agents |
/ding-agent list-agents |
List all available Agents from config |
current-session |
/ding-agent current-session |
Show current session information |
list-sessions |
/ding-agent list-sessions <Agent名称> |
List sessions for a specific Agent |
help |
/ding-agent help <question> |
Answer questions about ding-agent |
Related skills