PluginBench
Skill
Review
Audit score 70

wecomcli-get-todo-detail

wecomteam/wecom-cli

Batch fetch WeChat Work todo details by ID, including content and assignees.

What is wecomcli-get-todo-detail?

Retrieves complete details for WeChat Work (企业微信) todo items by their IDs, including content, assignees, and status. Use this after wecomcli-get-todo-list to view full todo information when users ask about todo details, content, or who it's assigned to.

  • Batch query up to 20 todo items by ID list
  • Return complete todo details including content, status, and timestamps
  • Retrieve assignee (follower) list with individual status for each assignee
  • Get creator ID and current user status for each todo
  • Support retry logic for HTTP failures (up to 3 attempts)

How to install wecomcli-get-todo-detail

npx skills add https://github.com/wecomteam/wecom-cli --skill wecomcli-get-todo-detail
Prerequisites
  • wecom-cli binary installed and configured
  • Valid WeChat Work API credentials configured in wecom-cli
  • Todo IDs must come from wecomcli-get-todo-list (do not construct manually)
  • wecomcli-lookup-contact skill for converting user IDs to names
Claude Code
Cursor
Windsurf
Cline

How to use wecomcli-get-todo-detail

  1. 1.Call wecomcli-get-todo-list to get the todo ID list
  2. 2.Extract todo_id values from the list response
  3. 3.Call this skill with the todo_id_list (max 20 IDs): wecom-cli todo get_todo_detail '{"todo_id_list": ["ID1", "ID2"]}'
  4. 4.Retrieve contact list via wecomcli-lookup-contact to convert follower_id and creator_id to names
  5. 5.Display results with human-readable names instead of system IDs, showing content, assignees, status, and timestamps

Use cases

Good for
  • User asks 'show me details of this todo' — fetch full content and assignee info
  • User wants to know 'who is this todo assigned to' — retrieve and display assignee names
  • Combined workflow: first get todo list via wecomcli-get-todo-list, then fetch details for selected items
  • Display readable todo summaries with assignee names instead of system IDs
Who it's for
  • WeChat Work (企业微信) users managing task workflows
  • Teams needing to view complete todo information and assignments
  • Agents integrating WeChat Work todo management into larger workflows

wecomcli-get-todo-detail FAQ

Why do I need to convert follower_id and creator_id to names?

The API returns system internal IDs that users cannot recognize. You must call wecomcli-lookup-contact to get the contact list and match userid to follower_id/creator_id, then display the name field for readability.

What's the difference between todo_status and user_status?

todo_status is the overall todo state (0=completed, 1=in progress, 2=deleted). user_status is the current user's status on that todo (0=rejected, 1=accepted, 2=completed).

Can I query more than 20 todos at once?

No, todo_id_list accepts maximum 20 IDs per request. For more todos, split into multiple requests.

What should I do if the API returns an error?

Check the errcode and errmsg fields. For HTTP errors or request failures, retry up to 3 times before reporting failure to the user.

How does this skill work with wecomcli-get-todo-list?

First use wecomcli-get-todo-list to fetch the todo ID list, then pass those IDs to this skill to get full details. This two-step workflow is the standard pattern.

Full instructions (SKILL.md)

Source of truth, from wecomteam/wecom-cli.


name: wecomcli-get-todo-detail description: 企业微信待办详情批量查询技能,根据待办 ID 列表获取完整信息(包含待办内容和分派人)。在用户说"看看这个待办的详情"、"待办内容是什么"、"这个待办分派给谁了"、"告诉我待办的具体信息"等需要查看待办完整内容的场景时使用。通常配合 wecomcli-get-todo-list 使用——先获取待办 ID 列表,再用本技能获取详情。 metadata: requires: bins: ["wecom-cli"] cliHelp: "wecom-cli todo --help"

企业微信待办详情查询技能

wecom-cli 是企业微信提供的命令行程序,所有操作通过执行 wecom-cli 命令完成。

通过 wecom-cli 根据待办 ID 列表批量查询完整详情,包含待办内容和分派人信息。

行为策略

人员 ID 转姓名(关键步骤): 返回结果中的 follower_idcreator_id 都是系统内部 ID,直接展示给用户毫无意义——用户不认识这些 ID,只认识姓名。因此在向用户展示待办详情之前,必须先调用 wecomcli-lookup-contact 技能获取通讯录,将所有 follower_idcreator_id 匹配为真实姓名。具体做法:

wecom-cli contact get_userlist '{}'

如果通讯录中找不到某个 ID,展示时标注"未知用户(ID: xxx)"即可。

重试策略: 遭遇"返回 HTTP 错误"或"HTTP 请求失败"时,主动重试,最多重试三次。


调用方式

wecom-cli todo get_todo_detail '<json格式的入参>'

参数说明

参数类型必填说明
todo_id_listarray待办 ID 列表,最多 20 个

调用示例:

wecom-cli todo get_todo_detail '{"todo_id_list": ["TODO_ID_1", "TODO_ID_2"]}'

返回格式

{
    "errcode": 0,
    "errmsg": "ok",
    "data_list": [
        {
            "todo_id": "TODO_ID",
            "todo_status": 1,
            "content": "完成Q2规划文档",
            "follower_list": {
                "followers": [
                    {
                        "follower_id": "FOLLOWER_ID",
                        "follower_status": 1,
                        "update_time": "2025-01-16 14:20:00"
                    }
                ]
            },
            "creator_id": "CREATOR_ID",
            "user_status": 1,
            "remind_time": "2025-06-01 09:00:00",
            "create_time": "2025-01-15 10:30:00",
            "update_time": "2025-01-16 14:20:00"
        }
    ]
}

返回字段说明

字段类型说明
data_listarray待办详情列表,最多 20 条
data_list[].todo_idstring待办 ID
data_list[].todo_statusnumber待办状态:0-已完成,1-进行中,2-已删除
data_list[].contentstring待办内容
data_list[].follower_list.followersarray分派人列表
data_list[].follower_list.followers[].follower_idstring分派人 ID(即 userid)— 展示前需通过 wecomcli-lookup-contact 转为姓名
data_list[].follower_list.followers[].follower_statusnumber分派人状态:0-拒绝,1-接受,2-已完成
data_list[].follower_list.followers[].update_timestring分派人状态更新时间
data_list[].creator_idstring创建人 ID — 展示前需通过 wecomcli-lookup-contact 转为姓名
data_list[].user_statusnumber当前用户状态
data_list[].remind_timestring提醒时间
data_list[].create_timestring创建时间
data_list[].update_timestring更新时间

典型工作流

列表 + 详情联合查询(三步缺一不可)

用户问:"看看我最近的待办" / "我有哪些待办事项?"

  1. 第一步:通过 wecomcli-get-todo-list 获取待办列表。
wecom-cli todo get_todo_list '{}'
  1. 第二步:根据返回的 todo_id 批量获取详情。
wecom-cli todo get_todo_detail '{"todo_id_list": ["TODO_ID_1", "TODO_ID_2", "TODO_ID_3"]}'
  1. 第三步(不要跳过!):通过 wecomcli-lookup-contact 获取通讯录,将 follower_id / creator_id 转为姓名。用返回的 userlist 中的 userid 匹配 follower_id 和 creator_id,取 name 字段作为展示姓名

第三步是展示可读结果的前提。没有这一步,用户看到的是一串无意义的 ID 而非姓名。

展示格式(注意:分派人和创建人必须显示为姓名,不是 ID):

📋 您当前的待办事项(共 3 项)

1. 🔵 完成Q2规划文档
   - 待办状态:进行中 | 我的状态:已接受
   - 提醒时间:2025-06-01 09:00
   - 分派人:张三、李四
   - 创建时间:2025-01-15

2. 🔵 提交周报
   - 待办状态:进行中 | 我的状态:已接受
   - 提醒时间:2025-03-17 18:00
   - 创建时间:2025-03-10

3. ☑️ 代码评审
   - 待办状态:已完成 | 我的状态:已完成
   - 创建时间:2025-03-01

注意事项

  1. 人员 ID 必须转姓名

    • 返回结果中的 follower_idcreator_id 是系统内部标识,用户无法识别
    • 展示待办详情前,先
    wecom-cli contact get_userlist '{}'
    

    获取通讯录

    • 用通讯录的 userid 匹配 follower_id / creator_id,用 name 替换展示
  2. todo_id 来源规则

    • todo_id 必须来自 wecomcli-get-todo-list 返回的结果,禁止自行推测或构造
    • 用户通常提供待办内容描述而非 ID,应先通过 wecomcli-get-todo-list 查列表再匹配
  3. 状态值含义

    • 待办状态(todo_status):0-已完成,1-进行中,2-已删除
    • 用户状态(user_status):0-拒绝,1-接受,2-已完成
    • 分派人状态(follower_status):0-拒绝,1-接受,2-已完成
  4. 错误处理:若 errcode 不为 0,告知用户 errmsg 中的错误信息

  5. 单次上限todo_id_list 最多传 20 个 ID,超过需要分批请求