Task Runner
Manage tasks and projects across sessions with persistent tracking.
Quick Start
Add a task
CODEBLOCK0
List all tasks
CODEBLOCK1
List tasks for a specific project
CODEBLOCK2
Complete a task
CODEBLOCK3
Change task priority
CODEBLOCK4
Export project to markdown
CODEBLOCK5
Features
- - Persistent storage - Tasks survive session restarts (stored in
~/.openclaw/workspace/tasks_db.json) - Project organization - Group tasks by project for better organization
- Priority levels - low, medium (default), high
- Status tracking - pending vs completed with timestamps
- Flexible filtering - View all tasks or filter by project
- Markdown export - Export projects to clean markdown for sharing
Security
Path Validation (v1.0.1+)
The
export function validates output paths to prevent malicious writes:
- - ✅ Allowed:
~/.openclaw/workspace/, /tmp/, and home directory - ❌ Blocked: System paths (
/etc/, /usr/, /var/, etc.) - ❌ Blocked: Sensitive dotfiles (
~/.bashrc, ~/.ssh, etc.)
This prevents prompt injection attacks that could attempt to write to system files for privilege escalation.
Task Storage
The task storage is JSON-based and only writes to
~/.openclaw/workspace/tasks_db.json.
Usage Patterns
For multi-session projects
CODEBLOCK6
For autonomous agent workflows
Track your own tasks across sessions:
CODEBLOCK7
For sprint planning
CODEBLOCK8
Task Priorities
| Priority | Emoji | When to Use |
|---|
| high | 🔴 | Blocking issues, urgent, must do now |
| medium |
🟡 | Normal work, do soon |
| low | 🟢 | Nice to have, backlog items |
Output Format
Task listing shows:
- - Status icon (✅ completed, ⏳ pending)
- Project name
- Task ID number
- Priority emoji
- Creation date
- Task description
- Completion date (if completed)
Export Format
Markdown export includes:
- - Project title with task counts
- Pending tasks section
- Completed tasks section (most recent first)
- Task IDs, priorities, and timestamps
Examples
Managing a coding project
CODEBLOCK9
Tracking autonomous agent experiments
CODEBLOCK10
Daily task management
CODEBLOCK11
Best Practices
- 1. Use meaningful project names -
income-experiments not INLINECODE11 - Set priorities consistently - helps with focus
- Mark tasks complete promptly - keeps list clean
- Export before major changes - backup progress
- Review and clean up - archive old projects regularly
Integration with Other Skills
Combine with research-assistant for complete project management:
- - Use
research-assistant for notes and knowledge - Use
task-runner for actionable tasks - Export both to create comprehensive project docs
任务运行器
跨会话管理任务和项目,支持持久化跟踪。
快速开始
添加任务
bash
task_runner.py add <描述> [项目] [优先级]
列出所有任务
bash
task_runner.py list
列出特定项目的任务
bash
task_runner.py list <项目>
完成任务
bash
task_runner.py complete <任务ID>
更改任务优先级
bash
task_runner.py priority <任务ID> <低|中|高>
将项目导出为Markdown
bash
task_runner.py export <项目> <输出文件>
功能特性
- - 持久化存储 - 任务在会话重启后依然保留(存储在 ~/.openclaw/workspace/tasks_db.json)
- 项目组织 - 按项目分组任务,便于管理
- 优先级级别 - 低、中(默认)、高
- 状态跟踪 - 待办与已完成状态,附带时间戳
- 灵活筛选 - 查看所有任务或按项目筛选
- Markdown导出 - 将项目导出为整洁的Markdown格式,便于分享
安全性
路径验证(v1.0.1+)
export 函数会验证输出路径,防止恶意写入:
- - ✅ 允许:~/.openclaw/workspace/、/tmp/ 和主目录
- ❌ 阻止:系统路径(/etc/、/usr/、/var/ 等)
- ❌ 阻止:敏感点文件(~/.bashrc、~/.ssh 等)
这可以防止通过提示注入攻击尝试写入系统文件以提升权限。
任务存储
任务存储基于JSON格式,仅写入 ~/.openclaw/workspace/tasks_db.json。
使用模式
多会话项目
bash
添加实验任务
task_runner.py add 搭建开发环境 项目X 高
task_runner.py add 编写初始测试 项目X 中
task_runner.py add 记录API端点 项目X 低
列出项目进度
task_runner.py list 项目X
逐步完成任务
task_runner.py complete 1
task_runner.py complete 2
自主代理工作流
跨会话跟踪自己的任务:
bash
规划实验
task_runner.py add 构建并发布技能 收入实验 高
task_runner.py add 测试内容管道 收入实验 中
根据学习情况更新优先级
task_runner.py priority 2 高
导出进度报告
task_runner.py export 收入实验 ./进度报告.md
冲刺规划
bash
规划本周工作
task_runner.py add 构建功能X 冲刺5 高
task_runner.py add 修复Bug Y 冲刺5 高
task_runner.py add 更新文档 冲刺5 中
查看进度
task_runner.py list 冲刺5
导出用于站会
task_runner.py export 冲刺5 ./站会.md
任务优先级
| 优先级 | 表情符号 | 使用场景 |
|---|
| 高 | 🔴 | 阻塞性问题、紧急事项、必须立即处理 |
| 中 |
🟡 | 正常工作、尽快处理 |
| 低 | 🟢 | 锦上添花、待办事项 |
输出格式
任务列表显示:
- - 状态图标(✅ 已完成,⏳ 待办)
- 项目名称
- 任务ID编号
- 优先级表情符号
- 创建日期
- 任务描述
- 完成日期(如已完成)
导出格式
Markdown导出包含:
- - 项目标题及任务数量
- 待办任务部分
- 已完成任务部分(最新优先)
- 任务ID、优先级和时间戳
示例
管理编码项目
bash
设置
task_runner.py add 克隆仓库 我的项目 高
task_runner.py add 安装依赖 我的项目 高
task_runner.py add 设置数据库 我的项目 中
跟踪进度
task_runner.py list 我的项目
task_runner.py complete 1
task_runner.py complete 2
导出用于文档
task_runner.py export 我的项目 ./我的项目任务.md
跟踪自主代理实验
bash
规划实验
task_runner.py add 实验1:发布技能 自主收入 高
task_runner.py add 实验2:内容自动化 自主收入 中
task_runner.py add 实验3:服务MVP 自主收入 低
逐步执行
task_runner.py list 自主收入
task_runner.py complete 1
根据学习情况调整
task_runner.py add 实验2a:研究无需API密钥的工具 自主收入 高
task_runner.py priority 2 低
日常任务管理
bash
规划当天工作
task_runner.py add 审查拉取请求 日常 高
task_runner.py add 编写文档 日常 中
task_runner.py add 回复邮件 日常 低
当日结束回顾
task_runner.py list
归档已完成工作
task_runner.py export 日常 ./$(date +%Y-%m-%d)-任务.md
最佳实践
- 1. 使用有意义的项目名称 - 使用 收入实验 而非 想法
- 一致设置优先级 - 有助于保持专注
- 及时标记任务完成 - 保持列表整洁
- 重大变更前导出 - 备份进度
- 定期审查清理 - 归档旧项目
与其他技能的集成
与 研究助手 结合使用,实现完整的项目管理:
- - 使用 研究助手 记录笔记和知识
- 使用 任务运行器 管理可执行任务
- 同时导出两者,创建全面的项目文档