CtrlK
BlogDocsLog inGet started
Tessl Logo

priority-task-reader

按优先级读取任务 Skill - 从 todos.json 读取 in-progress 和 pending 任务,按 P0-P9 优先级排序

48

Quality

50%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide

SecuritybySnyk

Low

Low-risk findings worth noting

Fix and improve this skill with Tessl

tessl review fix ./.trae/openclaw-skills/priority-task-reader/SKILL.md
SKILL.md
Quality
Evals
Security

Priority Task Reader Skill

按优先级读取任务,从 todos.json 读取 in-progress 和 pending 任务,按 P0-P9 优先级排序。

核心功能

  1. 读取任务 - 从 todos.json 读取所有任务
  2. 筛选任务 - 只选择 in-progress 和 pending 状态的任务
  3. 按优先级排序 - 按 P0(最高)→ P9(最低)优先级排序
  4. 分组展示 - 按优先级分组展示任务列表
  5. 获取下一个任务 - 识别下一个应该由 AI 执行的任务

优先级排序规则

排序优先级(从高到低):

  1. 优先级分数:P0 (0) → P1 (1) → P2 (2) → ... → P9 (9)
  2. 状态:in-progress 优先于 pending
  3. 创建时间:越早创建的优先

向后兼容:high (2), medium (5), low (8)

使用方法

基本使用 - 显示任务列表

cd /Users/bytedance/CS-Notes/.trae/openclaw-skills/priority-task-reader
python3 main.py

输出 JSON 格式

python3 main.py --json

显示下一个应该执行的任务

python3 main.py --next

显示接下来 K 个应该执行的任务

python3 main.py --next --next-count 3

同时使用多个选项

python3 main.py --json --next --next-count 5

输出示例

任务列表输出

================================================================================
📋 按优先级排序的任务列表
================================================================================

================================================================================
🔸 优先级: P0 (1 个任务)
================================================================================

  1. ⏸️ [todo-20260219-050]
     标题: 精炼整理知乎文章:关于 AI Agent 的内容
     负责人: ai

================================================================================
🔸 优先级: P1 (6 个任务)
================================================================================

  1. 🚀 [todo-20260223-041344]
     标题: 解决子agent遇到gateway pairing问题
     负责人: ai
...

================================================================================
📊 总计: 48 个任务 (in-progress + pending)
================================================================================

下一个任务输出

================================================================================
🎯 下一个应该执行的任务
================================================================================
{
  "id": "todo-20260219-050",
  "title": "精炼整理知乎文章:关于 AI Agent 的内容",
  "status": "pending",
  "priority": "P0",
  "assignee": "ai",
  ...
}

配置

默认配置在 skill.json 中:

{
  "todos_json_path": "/Users/bytedance/CS-Notes/.trae/todos/todos.json",
  "workspace": "/Users/bytedance/CS-Notes"
}

可以通过 --config 参数指定自定义配置文件。

在推进todo指令中使用

当用户说"推进todo"时,AI 应该:

  1. 先调用这个 skill 获取按优先级排序的任务列表
  2. 从列表中选择最高优先级且适合 AI 执行的任务
  3. 优先执行 Assignee: AI 且 Feedback Required: false 的任务
  4. 按优先级从高到低执行

重要原则

  • P0 优先:笔记整理任务固定为 P0,必须最高优先级处理
  • in-progress 优先:正在进行的任务比待处理任务优先级高
  • 跳过需要确认的任务:Feedback Required: true 的任务需要用户确认后再执行
Repository
huangruiteng/CS-Notes
Last updated
First committed

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.