ClawSkills logoClawSkills

Todo management

每个工作区的 SQLite 待办事项管理器 (./todo.db),包含分组和任务状态 (pending/in_progress/done/skipped),通过 {baseDir}/scripts/todo.sh 操作以添加

介绍

# Todo Management

## 此技能控制的内容 每个工作区一个 SQLite 数据库: - 默认值:`./todo.db` - 覆盖方式:`TODO_DB=/path/to/todo.db`

所有更改必须通过 CLI 进行: `bash {baseDir}/scripts/todo.sh ...`

## 状态 `pending`(默认)、`in_progress`、`done`、`skipped`

默认列表会隐藏 `done` 和 `skipped`,除非使用了 `--all` 或 `--status=...`。

---

# 不可协商的规则

## 1) 禁止写入文件(永远禁止) - 不要创建或编辑任何文件(例如 `todos.md`、notes、markdown、exports)。 - 不要输出“文件名块”,例如 `todos.md (...)`。 - 唯一的持久化状态位于 `todo.db` 中,由 `todo.sh` 修改。

## 2) 除非明确要求,否则绝不打印待办事项列表 - 如果用户没有要求“显示/列出/打印我的待办事项”,请勿粘贴列表。 - 修改后的默认行为:仅输出一行简短的确认信息。

## 3) 保持回复极短 - 成功后:回复一行,最多约 5 个单词(请自行翻译为用户的语言)。 - 除非用户明确要求列表/详细信息,否则不要包含项目符号、表格、代码块或工具输出。

允许的确认信息(英文示例;请根据需要翻译): - “完成。” - “已添加。” - “已更新。” - “已移除。” - “已移动。” - “已重命名。” - “已清除。” - “已添加到列表。”

## 4) 歧义处理(规则 #2 的唯一例外) 如果用户请求破坏性操作但未指定 ID(例如“移除买牛奶的任务”): 1) 运行 `entry list`(可选择使用 `--group=...`) 2) 显示结果(最简表格) 3) 询问要对哪个 ID 进行操作

这是唯一一种可以在用户未明确要求的情况下显示列表的情况。

## 5) 分组删除安全 - `group remove "X"` 会将条目移动到 Inbox(默认)。 - 仅在用户明确选择时才删除条目: - 询问:“将条目移动到 Inbox(默认)还是同时删除条目?” - 仅在此时使用 `--delete-entries`。

---

# 命令(请准确使用这些命令)

### 条目 (Entries) - 添加: - `bash {baseDir}/scripts/todo.sh entry create "Buy milk"` - `bash {baseDir}/scripts/todo.sh entry create "Ship feature X" --group="Work" --status=in_progress` - 列出(仅当用户询问时,或用于解决歧义): - `bash {baseDir}/scripts/todo.sh entry list` - `bash {baseDir}/scripts/todo.sh entry list --group="Work"` - `bash {baseDir}/scripts/todo.sh entry list --all` - `bash {baseDir}/scripts/todo.sh entry list --status=done` - 显示单个条目: - `bash {baseDir}/scripts/todo.sh entry show 12` - 编辑文本: - `bash {baseDir}/scripts/todo.sh entry edit 12 "Buy oat milk instead"` - 移动: - `bash {baseDir}/scripts/todo.sh entry move 12 --group="Inbox"` - 更改状态: - `bash {baseDir}/scripts/todo.sh entry status 12 --status=done` - `bash {baseDir}/scripts/todo.sh entry status 12 --status=skipped` - 移除: - `bash {baseDir}/scripts/todo.sh entry remove 12`

### 分组 (Groups) - 创建 / 列出: - `bash {baseDir}/scripts/todo.sh group create "Work"` - `bash {baseDir}/scripts/todo.sh group list` - 重命名(别名:edit): - `bash {baseDir}/scripts/todo.sh group rename "Work" "Work (Project A)"` - `bash {baseDir}/scripts/todo.sh group edit "Work" "Work (Project A)"` - 移除: - 默认(将条目移动到 Inbox): - `bash {baseDir}/scripts/todo.sh group remove "Work"` - 同时删除条目(仅当用户明确要求时): - `bash {baseDir}/scripts/todo.sh group remove "Work" --delete-entries`

---

# “清空列表”行为(不打印列表) 要清空待办事项列表: 1) 运行 `entry list --all` 以获取 ID(请勿粘贴结果) 2) 使用 `entry remove ID` 移除每个 ID 3) 回复一行:“已清除。”

如果用户随后要求查看列表,请运行 `entry list` 并显示它。

---

# 对话示例(预期行为)

User: "I need to buy milk, add it to my todo list" Agent: "Done."

User: "Oh, and I also need to clean the room" Agent: "Added to the list."

User: "Show my todos" Agent: (prints the list)

User: "Remove the milk one" Agent: (lists matching tasks + asks for ID, then removes when ID is provided)

更多产品