applex250

Cron Reminder Skill

0
0
# Install this skill:
npx skills add applex250/cron-reminder

Or install specific skill: npx add-skill https://github.com/applex250/cron-reminder

# Description

Clawdbot Cron Reminder Skill - Telegram定时提醒功能

# SKILL.md

Cron Reminder Skill

定时提醒功能 - 为用户设置 Telegram 消息提醒

用法

当用户说以下内容时使用此 skill:
- "提醒我 X 分钟后做某事"
- "X 点提醒我..."
- "定个闹钟..."
- "每天/每周提醒我..."

配置流程

1. 计算时间戳

$now = Get-Date
$timestamp = ([DateTimeOffset]$now).ToUnixTimeMilliseconds()
$minutesLater = $timestamp + (X * 60 * 1000)  # X 分钟

2. 设置提醒(直接发送)

{
  "agentId": "main",
  "name": "提醒名称",
  "enabled": true,
  "schedule": {"kind": "at", "atMs": 时间戳},
  "sessionTarget": "isolated",
  "wakeMode": "now",
  "payload": {
    "deliver": true,
    "message": "提醒内容",
    "to": "5625001745",
    "channel": "telegram",
    "kind": "agentTurn"
  }
}

3. 验证设置

clawdbot cron status

用户偏好

  • 用户ID: 5625001745
  • 时区: GMT+8
  • 提醒方式: 直接发送简短消息,不经过大模型
  • 常用短语: "记得喝点水 💧"、"该睡觉了 😴"、"该运动了 🏃"

注意事项

  1. sessionTarget=main 必须使用 payload.kind="systemEvent"
  2. sessionTarget=isolated 使用 payload.kind="agentTurn" 可直接发送
  3. wakeMode="now" 立即触发(推荐)
  4. Gateway 超时:执行 clawdbot gateway restart
  5. 删除旧任务:clawdbot cron remove --id <jobId>

测试

设置前可以先用 1 分钟测试,确认功能正常后再设置实际时间。

# README.md

Cron Reminder - 快速参考

一句话说明

为用户设置 Telegram 定时提醒,使用 isolated session + agentTurn 直接发送消息。

核心配置

# 1. 计算时间戳(5分钟后)
$now = Get-Date
$ts = ([DateTimeOffset]$now).ToUnixTimeMilliseconds() + 300000

# 2. 设置提醒
clawdbot cron add --name "喝水提醒" --at $ts --session isolated --wake now --message "记得喝点水 💧"

常用命令

# 查看所有任务
clawdbot cron list

# 查看执行记录
clawdbot cron runs --id <jobId>

# 删除任务
clawdbot cron remove --id <jobId>

# 重启 gateway(如果超时)
clawdbot gateway restart

测试流程

  1. 设置 1 分钟测试
  2. 等待触发
  3. 检查是否收到消息
  4. 确认无误后设置实际时间

用户信息

  • Telegram ID: 5625001745
  • 时区: GMT+8
  • 偏好: 简短消息,直接发送

# Supported AI Coding Agents

This skill is compatible with the SKILL.md standard and works with all major AI coding agents:

Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.