task-reminder

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

提醒调度技能

Reminder Scheduling Skill

核心流程

Core Workflow

  1. 确定可用的 Python 命令。
  2. 检查服务是否运行(健康检查)。
  3. 将用户请求转换为提醒命令。
  4. 执行提醒命令并反馈结果(提醒通过邮件发送)。
  1. Determine Available Python Command.
  2. Check if the service is running (health check).
  3. Convert user requests into reminder commands.
  4. Execute the reminder command and feed back the result (reminders are sent via email).

1) 确定 Python 命令

1) Determine Available Python Command

优先顺序(第一个可用的为准):
  • <skill_root>/.venv/Scripts/python.exe
    (if exists)
  • py
  • python
  • python3
若都不可用,请用户安装 Python。
Priority order (use the first available one):
  • <skill_root>/.venv/Scripts/python.exe
    (if exists)
  • py
  • python
  • python3
If none are available, ask the user to install Python.

2) 确保服务运行

2) Ensure Service is Running

读取配置文件:
  • <skill_root>/config/app_config.json
优先使用
web_api_base
,否则拼接
http://{host}:{port}
。 说明:先读取配置,以确定健康检查所用的端口与地址。
健康检查:
  • GET {api_base}/health
若健康检查失败:
  • 使用选定的 Python 命令运行
    <skill_root>/scripts/start_server.py
  • 再次请求
    GET {api_base}/health
  • 若仍失败,报告错误并停止。
后台运行:
  • 可用
    --daemon
    参数启动后台服务(会写入
    <skill_root>/server.pid
    )。
  • 若用户未明确说明,先询问是否需要后台常驻;用户同意则使用
    --daemon
    ,否则默认前台。
Read configuration file:
  • <skill_root>/config/app_config.json
Prioritize using
web_api_base
, otherwise concatenate
http://{host}:{port}
. Note: Read the configuration first to determine the port and address for health check.
Health Check:
  • GET {api_base}/health
If health check fails:
  • Use the selected Python command to run
    <skill_root>/scripts/start_server.py
    .
  • Request
    GET {api_base}/health
    again.
  • If it still fails, report the error and stop.
Run in Background:
  • Use the
    --daemon
    parameter to start the background service (will write to
    <skill_root>/server.pid
    ).
  • If the user does not specify explicitly, first ask if background persistence is needed; if the user agrees, use
    --daemon
    , otherwise run in foreground by default.

3) 解析用户请求(两类意图)

3) Parse User Requests (Two Types of Intentions)

A) 相对时间(无需追问)

A) Relative Time (No Follow-up Needed)

示例:
  • “提醒我 2小时后吃饭”
  • “3天后提醒我提交报告”
转换为:
python remind.py <offset> <content>
其中
<offset>
1d2h30m10s
这类组合,
<content>
为提醒内容。
内容增强(统一改写语气):
  • 提取原始意图文本(去掉“提醒我/提醒我在/…后”等引导词)
  • 改写为更友好的提示语
  • 示例:
    • 原始意图:吃饭
    • 改写内容:主人~该吃饭啦!别饿着~
Examples:
  • "Remind me to eat in 2 hours"
  • "Remind me to submit the report in 3 days"
Convert to:
python remind.py <offset> <content>
Where
<offset>
is a combination like
1d2h30m10s
, and
<content>
is the reminder content.
Content Enhancement (Unified Tone Rewriting):
  • Extract the original intent text (remove guiding words like "Remind me/Remind me to... later")
  • Rewrite into a friendlier prompt
  • Example:
    • Original intent: Eat
    • Rewritten content: Hey, it's time to eat! Don't go hungry!

B) 相对日期 / 指定时间(可能需要追问)

B) Relative Date / Specific Time (Follow-up May Be Needed)

示例:
  • “明天早上8点提醒我开会”
  • “后天 9点提醒我交作业”
  • “2026-02-07 09:00 提醒我开会”
转换为:
python remind.py --at "<time>" <content>
规则:
  • 用户说“明天/后天/下周…”但没有具体时间时,必须追问:“几点提醒?”
  • 若用户提供了具体时间,原样传给
    --at
  • 最大允许未来时间:30 天(脚本会校验)。 直接把提醒内容作为唯一内容参数传入。
内容增强(带时间语气):
  • 在内容里加入时间提示
  • 示例:
    • 原始意图:开会
    • 用户时间:明天 08:00
    • 改写内容:主人~现在是 08:00,到了开会时间啦!
Examples:
  • "Remind me to attend the meeting at 8 AM tomorrow"
  • "Remind me to hand in my homework at 9 AM the day after tomorrow"
  • "Remind me to attend the meeting at 09:00 on 2026-02-07"
Convert to:
python remind.py --at "<time>" <content>
Rules:
  • When the user says "tomorrow/the day after tomorrow/next week..." but does not specify a specific time, must follow up: "What time should I remind you?"
  • If the user provides a specific time, pass it to
    --at
    as is.
  • Maximum allowed future time: 30 days (verified by the script). Pass the reminder content directly as the only content parameter.
Content Enhancement (With Time Prompt Tone):
  • Add time prompt to the content
  • Example:
    • Original intent: Attend the meeting
    • User-specified time: 08:00 tomorrow
    • Rewritten content: Hey, it's 08:00 now, it's time for the meeting!

4) 执行提醒命令

4) Execute Reminder Command

在此工作目录运行:
  • <skill_root>/scripts
示例:
python remind.py 2h30m 提交报告
python remind.py --at "明天 08:00" 开会
Run in this working directory:
  • <skill_root>/scripts
Examples:
python remind.py 2h30m Submit report
python remind.py --at "tomorrow 08:00" Attend meeting

输出给用户

Output to User

  • 成功:确认提醒内容与时间(邮件已发送/将按时发送)。
  • 失败:展示脚本错误信息,并提示检查服务或配置。
  • Success: Confirm the reminder content and time (email has been sent/will be sent on time).
  • Failure: Display the script error message, and prompt to check the service or configuration.