
Wecomcli Edit Todo
Create, update, delete WeCom todos and change assignee status from agent chat using wecom-cli todo commands.
Overview
wecomcli-edit-todo is an agent skill for the Operate phase that creates, updates, deletes, and statuses 企业微信 todos via wecom-cli.
Install
npx skills add https://github.com/wecomteam/wecom-cli --skill wecomcli-edit-todoWhat is this skill?
- Four write operations: create_todo, update_todo, delete_todo, and user status changes
- create_todo supports content, follower_list assignees, and remind_time (`YYYY-MM-DD HH:mm:ss`)
- update_todo full-replaces follower_list—merge existing assignees before submit
- Automatic retry on HTTP errors, up to three attempts
- Returns todo_id on successful create for follow-up updates
- 4 todo write operations: create, update, delete, and user status change
- HTTP error retry policy: maximum 3 attempts
Adoption & trust: 2.4k installs on skills.sh; 2.2k GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
You need to mutate WeCom todos from the agent but risk wrong JSON, lost assignees on update, or flaky HTTP without retries.
Who is it for?
WeCom-authenticated dev environments where PM-style todo edits should stay in the CLI/agent loop.
Skip if: Read-only todo queries (use a lookup/list skill), non-WeCom task systems, or bulk migrations without reviewing follower_list merge rules.
When should I use this skill?
User needs todo write ops: 创建待办, 分派任务, 标记完成, 删除待办, 建提醒, 更新内容, 改提醒时间, 接受或拒绝待办.
What do I get? / Deliverables
The agent runs the right todo subcommand, returns todo_id or confirmation JSON, and retries transient failures up to three times.
- New todo_id from create_todo responses
- Updated or deleted todo state per WeCom API errcode JSON
Recommended Skills
Journey fit
Todo write operations are ongoing execution hygiene—Operate is where you track and adjust work items after shipping, not where you design the product. Iterate subphase covers changing tasks, reminders, and completion state as you run the business day to day.
How it compares
Targeted wecom-cli todo writer—not a full project-management methodology skill.
Common Questions / FAQ
Who is wecomcli-edit-todo for?
Indie builders and small teams on WeCom who want agents to create, assign, complete, or delete todos without opening the mobile app.
When should I use wecomcli-edit-todo?
Use in Operate/iterate when users ask to create, assign, update reminders, accept/reject, or delete todos; occasionally after Ship when turning release checklists into tracked todos.
Is wecomcli-edit-todo safe to install?
It performs destructive deletes and assignment changes via API; review the Security Audits panel on this page and confirm todo_id and follower_list before the agent executes.
SKILL.md
READMESKILL.md - Wecomcli Edit Todo
# 企业微信待办事项编辑技能 > `wecom-cli` 是企业微信提供的命令行程序,所有操作通过执行 `wecom-cli` 命令完成。 通过 `wecom-cli` 对企业微信待办事项进行写操作,支持四种操作:创建待办、更新待办、删除待办、变更用户状态。 ## 行为策略 **重试策略**: 遭遇"返回 HTTP 错误"或"HTTP 请求失败"时,主动重试,最多重试三次。 --- ## 操作 ### 1. 创建待办 创建一个新的待办事项,可指定内容、分派人和提醒时间: ```bash wecom-cli todo create_todo '<json格式的入参>' ``` **参数说明:** 需要遵循 “注意事项”中的格式要求: | 参数 | 类型 | 必填 | 说明 | |------|------|------|------| | `content` | string | ✅ | 待办内容 | | `follower_list` | object | ❌ | 分派人列表,格式见注意事项第 7 条 | | `remind_time` | string | ❌ | 提醒时间,格式:`YYYY-MM-DD HH:mm:ss` | **调用示例:** ```bash wecom-cli todo create_todo '{"content": "<待办的内容>", "remind_time": "2025-06-01 09:00:00"}' ``` **返回格式:** ```json { "errcode": 0, "errmsg": "ok", "todo_id": "TODO_ID" } ``` --- ### 2. 更新待办 修改已有待办事项的内容、分派人、状态或提醒时间: ```bash wecom-cli todo update_todo '<json格式的入参>' ``` **参数说明:** 需要遵循 “注意事项”中的格式要求: | 参数 | 类型 | 必填 | 说明 | |------|------|------|------| | `todo_id` | string | ✅ | 待办 ID | | `content` | string | ❌ | 新的待办内容 | | `follower_list` | object | ❌ | 新的分派人列表(全量替换,非追加),格式见注意事项第 7 条。若要新增分派人,需先查出现有分派人,合并后一起提交 | | `todo_status` | number | ❌ | 新的待办状态:`0`-已完成,`1`-进行中。删除请使用 `delete_todo` | | `remind_time` | string | ❌ | 新的提醒时间 | **调用示例:** ```bash wecom-cli todo update_todo '{"todo_id": "TODO_ID", "content": "<待办的内容>", "remind_time": "2025-07-01 09:00:00"}' ``` **返回格式:** ```json { "errcode": 0, "errmsg": "ok" } ``` --- ### 3. 删除待办 删除指定的待办事项: ```bash wecom-cli todo delete_todo '<json格式的入参>' ``` **参数说明:** 需要遵循 “注意事项”中的格式要求: | 参数 | 类型 | 必填 | 说明 | |------|------|------|------| | `todo_id` | string | ✅ | 待办 ID | **调用示例:** ```bash wecom-cli todo delete_todo '{"todo_id": "TODO_ID"}' ``` **返回格式:** ```json { "errcode": 0, "errmsg": "ok" } ``` > 删除操作不可撤销,执行前应向用户确认。 > 注意:`delete_todo` 与 `update_todo` 设置 `todo_status=2` 效果相同,优先使用 `delete_todo`。 --- ### 4. 变更用户待办状态 更改当前用户在某个待办中的状态(拒绝/接受/已完成): ```bash wecom-cli todo change_todo_user_status '<json格式的入参>' ``` **参数说明:** 需要遵循 “注意事项”中的格式要求: | 参数 | 类型 | 必填 | 说明 | |------|------|------|------| | `todo_id` | string | ✅ | 待办 ID | | `user_status` | number | ✅ | 用户状态:`0`-拒绝,`1`-接受,`2`-已完成 | **调用示例:** ```bash wecom-cli todo change_todo_user_status '{"todo_id": "TODO_ID", "user_status": 2}' ``` **返回格式:** ```json { "errcode": 0, "errmsg": "ok" } ``` --- ## 典型工作流 ### 创建待办并分派给同事 用户问:"帮我创建一个待办,让张三下周一前完成需求文档" 1. 第一步:通过 wecomcli-lookup-contact 技能查询张三的 userid,在返回结果中筛选姓名为"张三"的成员,获取其 userid 2. 第二步:创建待办并分派:`wecom-cli todo create_todo '{"content": "<待办的内容>", "follower_list": {"followers": [{"follower_id": "zhangsan", "follower_status": 1}]}, "remind_time": "2025-03-24 09:00:00"}'` > `follower_id` 必须来自 `wecomcli-lookup-contact` 技能的 `get_userlist` 接口返回的 `userid`,禁止自行猜测。若搜索结果有多个同名人员,需展示候选列表让用户确认。 ### 标记待办完成 需要区分两种场景:**标记待办本身完成**(改 `todo_status`)和**标记我的参与状态为完成**(改 `user_status`)。 #### 场景 A:标记待办本身完成 用户问:"把'完成Q2规划文档'这个待办标记为完成" / "关闭这个待办" 1. 第一步:通过 wecomcli-get-todo-list 获取待办列表,找到目标待办的 todo_id:`wecom-cli todo get_todo_list '{}'` 2. 第二步:通过 wecomcli-get-todo-detail 获取详情,确认是目标待办:`wecom-cli todo get_todo_detail '{"todo_id_list": ["TODO_ID"]}'` 3. 第三步:确认后,将待办状态改为已完成:`wecom-cli todo update_todo '{"todo_id": "TODO_ID", "todo_status": 0}'` #### 场景 B:标记我的参与状态为完成 用户问:"我已经完成了这个待办" / "标记我的部分为完成" 1. 第一步:通过 wecomcli-get-todo-list 获取待办列表,找到目标待办的 todo_id:`wecom-cli todo get_todo_list '{}'` 2. 第二步:通过 wecomcli-get-todo-detail 获取详情,确认是目标待办:`wecom-cli todo get_todo_detail '{"todo_id_list": ["TODO_ID"]}'` 3. 第三步:确认后,变更当前用户的参与状态为已完成:`wecom-cli todo change_todo_user_status '{"todo_id": "TODO_ID", "user_status": 2}'` > **如何判断用户意图:** 如果用户说"标记完成"且该待办是自己创建的、没有其他分派人,通常指场景 A(标记待办本身完成)。如果该待办有多个参与人,用户可能只是想标记自己那部分完成(场景 B)。不确定时应向用户确认。 > 用户提供的是待办内容描述而非 ID,所以需要先通