Xby Todolist

Other

为大型语言模型和AI代理提供外部工作记忆和任务管理功能,支持复杂多步骤任务的可靠执行。

Install

openclaw skills install @alinklab/xby-todolist

AI代理任务管理服务

为大型语言模型和AI代理提供外部工作记忆和任务管理功能,支持复杂多步骤任务的可靠执行。


⚠️ 强制要求:API 密钥

此 Skill 必须配置 API 密钥才能使用。

  • 首次使用时,如果 .env 中没有 XBY_APIKEY必须使用 AskUserQuestion 工具向用户询问 API 密钥
  • 拿到用户提供的密钥后,调用 scripts.config.set_api_key(api_key) 保存,然后继续处理
  • 获取 API 密钥:https://xiaobenyang.com
  • 禁止在缺少 API 密钥时自行搜索或编造数据

工作流程(必须遵守)

你(大模型)是路由层,负责理解用户意图、选择工具、提取参数。代码只负责调用API。

用户输入 → 你选择工具 → 提取该工具需要的参数 → 调用 scripts.tools 中的函数 → 返回结果给用户

步骤

  1. 检查 API 密钥:如果 scripts.config.settings.api_key 为空,使用 AskUserQuestion 询问用户,拿到后调用 scripts.config.set_api_key(key) 保存
  2. 选择工具:根据用户意图从下方工具列表中选择对应的工具函数
  3. 提取参数:根据选中的工具,提取该工具需要的参数
  4. 调用工具:使用关键字参数调用 scripts.tools 中的函数,例如 scripts.tools.search_schools(score='520', province='北京', category='综合')
  5. 返回结果:将工具返回的 raw 数据整理后展示给用户

工具选择规则

根据用户意图选择对应的工具函数:

用户意图工具函数
Use this tool to read the current to-do list for the session. This tool should be used proactively and frequently to ensure that you are aware of
the status of the current task list. You should make use of this tool as often as possible, especially in the following situations:
  • At the beginning of conversations to see what's pending
  • Before starting new tasks to prioritize work
  • When the user asks about previous tasks or plans
  • Whenever you're uncertain about what to do next
  • After completing tasks to update your understanding of remaining work
  • After every few messages to ensure you're on track

Usage:

  • This tool takes in no parameters. So leave the input blank or empty. DO NOT include a dummy object, placeholder string or a key like "input" or "empty". LEAVE IT BLANK.
  • Returns a list of todo items with their status, priority, and content
  • Use this information to track progress and plan next steps
  • If no todos exist yet, an empty list will be returned | scripts.tools.todo_read | | Use this tool to create and manage a structured task list for your current coding session. This helps you track progress, organize complex tasks, and demonstrate thoroughness to the user. It also helps the user understand the progress of the task and overall progress of their requests.

When to Use This Tool

Use this tool proactively in these scenarios:

  1. Complex multi-step tasks - When a task requires 3 or more distinct steps or actions
  2. Non-trivial and complex tasks - Tasks that require careful planning or multiple operations
  3. User explicitly requests todo list - When the user directly asks you to use the todo list
  4. User provides multiple tasks - When users provide a list of things to be done (numbered or comma-separated)
  5. After receiving new instructions - Immediately capture user requirements as todos
  6. When you start working on a task - Mark it as in_progress BEFORE beginning work. Ideally you should only have one todo as in_progress at a time
  7. After completing a task - Mark it as completed and add any new follow-up tasks discovered during implementation

When NOT to Use This Tool

Skip using this tool when:

  1. There is only a single, straightforward task
  2. The task is trivial and tracking it provides no organizational benefit
  3. The task can be completed in less than 3 trivial steps
  4. The task is purely conversational or informational

NOTE that you should not use this tool if there is only one trivial task to do. In this case you are better off just doing the task directly.

Task States and Management

  1. Task States: Use these states to track progress:

    • pending: Task not yet started
    • in_progress: Currently working on (limit to ONE task at a time)
    • completed: Task finished successfully
  2. Task Management:

    • Update task status in real-time as you work
    • Mark tasks complete IMMEDIATELY after finishing (don't batch completions)
    • Only have ONE task in_progress at any time
    • Complete current tasks before starting new ones
    • Remove tasks that are no longer relevant from the list entirely
  3. Task Completion Requirements:

    • ONLY mark a task as completed when you have FULLY accomplished it
    • If you encounter errors, blockers, or cannot finish, keep the task as in_progress
    • When blocked, create a new task describing what needs to be resolved
    • Never mark a task as completed if:
      • Tests are failing
      • Implementation is partial
      • You encountered unresolved errors
      • You couldn't find necessary files or dependencies
  4. Task Breakdown:

    • Create specific, actionable items
    • Break complex tasks into smaller, manageable steps
    • Use clear, descriptive task names

When in doubt, use this tool. Being proactive with task management demonstrates attentiveness and ensures you complete all requirements successfully.

Args: todos: The updated todo list. Each todo item must contain: - content: Task description (string, minimum 1 character) - id: Unique task identifier (string) - priority: Priority level ("high", "medium", "low") - status: Task status ("pending", "in_progress", "completed")

Returns: Success message or auto-clear notification if all tasks completed | scripts.tools.todo_write |

如果参数不完整,使用 AskUserQuestion 向用户询问缺失的参数。


工具函数说明


scripts.tools.todo_read

工具描述:Use this tool to read the current to-do list for the session. This tool should be used proactively and frequently to ensure that you are aware of the status of the current task list. You should make use of this tool as often as possible, especially in the following situations:

  • At the beginning of conversations to see what's pending
  • Before starting new tasks to prioritize work
  • When the user asks about previous tasks or plans
  • Whenever you're uncertain about what to do next
  • After completing tasks to update your understanding of remaining work
  • After every few messages to ensure you're on track

Usage:

  • This tool takes in no parameters. So leave the input blank or empty. DO NOT include a dummy object, placeholder string or a key like "input" or "empty". LEAVE IT BLANK.
  • Returns a list of todo items with their status, priority, and content
  • Use this information to track progress and plan next steps
  • If no todos exist yet, an empty list will be returned

参数定义

参数名称参数类型是否必填默认值描述

scripts.tools.todo_write

工具描述:Use this tool to create and manage a structured task list for your current coding session. This helps you track progress, organize complex tasks, and demonstrate thoroughness to the user. It also helps the user understand the progress of the task and overall progress of their requests.

When to Use This Tool

Use this tool proactively in these scenarios:

  1. Complex multi-step tasks - When a task requires 3 or more distinct steps or actions
  2. Non-trivial and complex tasks - Tasks that require careful planning or multiple operations
  3. User explicitly requests todo list - When the user directly asks you to use the todo list
  4. User provides multiple tasks - When users provide a list of things to be done (numbered or comma-separated)
  5. After receiving new instructions - Immediately capture user requirements as todos
  6. When you start working on a task - Mark it as in_progress BEFORE beginning work. Ideally you should only have one todo as in_progress at a time
  7. After completing a task - Mark it as completed and add any new follow-up tasks discovered during implementation

When NOT to Use This Tool

Skip using this tool when:

  1. There is only a single, straightforward task
  2. The task is trivial and tracking it provides no organizational benefit
  3. The task can be completed in less than 3 trivial steps
  4. The task is purely conversational or informational

NOTE that you should not use this tool if there is only one trivial task to do. In this case you are better off just doing the task directly.

Task States and Management

  1. Task States: Use these states to track progress:

    • pending: Task not yet started
    • in_progress: Currently working on (limit to ONE task at a time)
    • completed: Task finished successfully
  2. Task Management:

    • Update task status in real-time as you work
    • Mark tasks complete IMMEDIATELY after finishing (don't batch completions)
    • Only have ONE task in_progress at any time
    • Complete current tasks before starting new ones
    • Remove tasks that are no longer relevant from the list entirely
  3. Task Completion Requirements:

    • ONLY mark a task as completed when you have FULLY accomplished it
    • If you encounter errors, blockers, or cannot finish, keep the task as in_progress
    • When blocked, create a new task describing what needs to be resolved
    • Never mark a task as completed if:
      • Tests are failing
      • Implementation is partial
      • You encountered unresolved errors
      • You couldn't find necessary files or dependencies
  4. Task Breakdown:

    • Create specific, actionable items
    • Break complex tasks into smaller, manageable steps
    • Use clear, descriptive task names

When in doubt, use this tool. Being proactive with task management demonstrates attentiveness and ensures you complete all requirements successfully.

Args: todos: The updated todo list. Each todo item must contain: - content: Task description (string, minimum 1 character) - id: Unique task identifier (string) - priority: Priority level ("high", "medium", "low") - status: Task status ("pending", "in_progress", "completed")

Returns: Success message or auto-clear notification if all tasks completed

参数定义

参数名称参数类型是否必填默认值描述
todosarraytruenull


返回值处理

工具函数返回 dict 对象:

  • result["raw"] - API 原始返回数据(JSON),直接将此数据整理后展示给用户
  • result["success"] - 是否成功(True/False)
  • result["message"] - 状态消息

项目结构

xiaobenyang_gaokao_skill/
├── scripts/
│   ├── __init__.py
│   ├── config.py       # 配置管理 + set_api_key()
│   ├── call_api.py      # API 客户端 + call_api()
│   └── tools.py         # 工具函数(直接调用)
├── requirements.txt
└── SKILL.md

注意事项

  1. API 密钥是必需的,无密钥时必须通过 AskUserQuestion 询问用户
  2. 禁止在缺少 API 密钥时自行搜索或编造数据