养虾指南
OpenClaw System Guide
翻拉更多案例
OpenClaw 小龙虾真实案例

Todoist 任务管理:让智能体的工作进度可视化

把 OpenClaw 的推理过程和执行进度同步到 Todoist,随时掌握长任务的最新状态

awesome-openclaw-usecases2026-03-095 min read
任务管理自动化效率

通过将内部推理过程和执行日志实时同步到 Todoist,最大化长时间运行的智能体工作流的透明度。

痛点

当智能体在执行复杂的多步任务(比如构建一个全栈应用或做深度调研)时,你经常搞不清楚它现在在干什么、哪些步骤已经完成、卡在哪里了。对于后台运行的任务,手动翻聊天记录看进度实在太累了。

它能做什么

这个用例利用 todoist-task-manager 技能来:

  1. 状态可视化:在 In Progress、Waiting 等分区中创建任务
  2. 推理外化:把智能体内部的"计划"写入任务描述
  3. 实时日志:将每个子步骤的完成情况作为评论实时添加到任务中
  4. 自动巡检:一个心跳脚本检测卡住的任务并通知用户

需要的技能

不需要预装任何技能。只要按照下面的搭建指南给 OpenClaw 下指令,让它帮你创建相应的 bash 脚本就行。OpenClaw 可以管理自己的文件系统并执行 shell 命令,所以它会在你的请求下"构建"这个技能。

详细搭建指南

1. 配置 Todoist

创建一个项目(例如"OpenClaw Workspace")并获取其 ID。创建以下分区来表示不同状态:

  • In Progress
  • Waiting
  • Done

2. 实现:"智能体自建"技能

你不需要安装技能,而是让 OpenClaw 帮你创建以下脚本。每个脚本负责与 Todoist API 通信的不同部分。

scripts/todoist_api.sh(核心 API 封装):

#!/bin/bash
# Usage: ./todoist_api.sh <endpoint> <method> [data_json]
ENDPOINT=$1
METHOD=$2
DATA=$3
TOKEN="YOUR_TODOIST_API_TOKEN"

if [ -z "$DATA" ]; then
  curl -s -X "$METHOD" "https://api.todoist.com/rest/v2/$ENDPOINT" \
    -H "Authorization: Bearer $TOKEN"
else
  curl -s -X "$METHOD" "https://api.todoist.com/rest/v2/$ENDPOINT" \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json" \
    -d "$DATA"
fi

scripts/sync_task.sh(任务与状态管理):

#!/bin/bash
# Usage: ./sync_task.sh <task_content> <status> [task_id] [description] [labels_json_array]
CONTENT=$1
STATUS=$2
TASK_ID=$3
DESCRIPTION=$4
LABELS=$5
PROJECT_ID="YOUR_PROJECT_ID"

case $STATUS in
  "In Progress") SECTION_ID="SECTION_ID_PROGRESS" ;;
  "Waiting")     SECTION_ID="SECTION_ID_WAITING" ;;
  "Done")        SECTION_ID="SECTION_ID_DONE" ;;
  *)             SECTION_ID="" ;;
esac

PAYLOAD="{\"content\": \"$CONTENT\""
[ -n "$SECTION_ID" ] && PAYLOAD="$PAYLOAD, \"section_id\": \"$SECTION_ID\""
[ -n "$PROJECT_ID" ] && [ -z "$TASK_ID" ] && PAYLOAD="$PAYLOAD, \"project_id\": \"$PROJECT_ID\""
if [ -n "$DESCRIPTION" ]; then
  ESC_DESC=$(echo "$DESCRIPTION" | sed ':a;N;$!ba;s/\n/\\n/g' | sed 's/"/\\"/g')
  PAYLOAD="$PAYLOAD, \"description\": \"$ESC_DESC\""
fi
[ -n "$LABELS" ] && PAYLOAD="$PAYLOAD, \"labels\": $LABELS"
PAYLOAD="$PAYLOAD}"

if [ -n "$TASK_ID" ]; then
  ./scripts/todoist_api.sh "tasks/$TASK_ID" POST "$PAYLOAD"
else
  ./scripts/todoist_api.sh "tasks" POST "$PAYLOAD"
fi

scripts/add_comment.sh(进度日志):

#!/bin/bash
# Usage: ./add_comment.sh <task_id> <comment_text>
TASK_ID=$1
TEXT=$2
ESC_TEXT=$(echo "$TEXT" | sed ':a;N;$!ba;s/\n/\\n/g' | sed 's/"/\\"/g')
PAYLOAD="{\"task_id\": \"$TASK_ID\", \"content\": \"$ESC_TEXT\"}"
./scripts/todoist_api.sh "comments" POST "$PAYLOAD"

3. 使用指令

你可以用以下提示词让智能体搭建并使用这套可视化系统:

I want you to build a Todoist-based task visibility system for your own runs.

First, create three bash scripts in a 'scripts/' folder:
1. todoist_api.sh (a curl wrapper for Todoist REST API)
2. sync_task.sh (to create or update tasks with specific section_ids for In Progress, Waiting, and Done)
3. add_comment.sh (to post progress logs as comments)

Use these variables for the setup:
- Token: [Your Todoist API Token]
- Project ID: [Your Project ID]
- Section IDs: [In Progress ID, Waiting ID, Done ID]

Once created, for every complex task I give you:
1. Create a task in 'In Progress' with your full PLAN in the description.
2. For every sub-step completion, call add_comment.sh with a log of what you did.
3. Move the task to 'Done' when finished.

相关链接


本文翻译自 awesome-openclaw-usecases 开源项目。英文能力过得去的朋友欢迎阅读原版,体验原汁原味的表达。

GitHub 原文链接