SKILL.md 1.4 KB


name: wechat-get-conversations

description: 获取微信会话列表,按联系人分组,含最近消息摘要。用于快速了解有谁在找你。

wechat-get-conversations

按联系人分组返回所有有过消息记录的会话,每条含最近一条消息摘要。适合"最近谁找过我"这类概览问题。

触发场景

  • 用户问:"最近谁发过微信给我?"
  • 用户问:"有哪些活跃会话?"
  • 决定优先回复哪个对话前的选型

执行步骤

exec/bash 工具执行:

API_BASE=$(node -e "console.log(JSON.parse(require('fs').readFileSync(require('path').join(require('os').homedir(),'.openclaw','wechat-credentials.json'),'utf8')).wechatApiBase)")
curl -s --max-time 10 -X GET "$API_BASE/conversations"

响应字段

{
  "ret": 200,
  "data": [
    {
      "wxid": "wxid_abc123",
      "nickName": "张三",
      "lastMessage": "明天能开会吗",
      "lastTime": "2026-04-17T09:30:00.000Z",
      "lastType": "text",
      "direction": "received"
    }
  ]
}

后续动作

  • 用户想看某会话详情 → 用 data[].wxidwechat-get-messageswxid=xxx
  • 用户想回复某会话 → 用 data[].wxidwechat-send-text

重要提示

  • 无需参数,直接 GET
  • 只返回有消息记录的联系人;没消息记录的好友不在这里,用 wechat-get-contact-list