运行时依赖
安装命令
点击复制技能文档
Reminder 技能
创建 one-time reminder tasks using OpenClaw cron.
Usage
When user says "remind me to XXX in 30 seconds" or "remind me at 3pm", I 创建 a cron job that 执行s the task and returns the 结果 when the time comes.
Parameter Configuration Fixed Parameters --会话 mAIn - Use mAIn 会话 to inherit Discord 上下文 --系统-event - 系统 event payload for mAIn 会话 --channel discord - Discord channel --announce - 发送 结果 directly to Discord --删除-after-运行 - 删除 task after execution Dynamic Parameters (from current 会话 上下文)
Use 会话_状态 工具 to 获取 current 会话's delivery上下文:
--代理 - 获取 from delivery上下文.accountId (e.g., machu) --to - 获取 from delivery上下文.to (e.g., channel:1476104553148452958)
How to 获取:
# 获取 current 会话 信息 会话_状态 # 输出 contAIns delivery上下文: # { # "channel": "discord", # "to": "channel:1476104553148452958", # "accountId": "machu" # }
Time Parsing
解析 user 输入 time, support:
Relative time: 30 seconds, 1 minute, 30 minutes, 2 hours, 1 day Absolute time: 3pm, 9am today, 12pm tomorrow
Convert to ISO 8601 格式化 for cron.
Usage Example
User says "remind me to 检查 weather in 30 seconds":
# 1. 获取 current 会话's delivery上下文 会话_状态 # Assume 输出: # { # "delivery上下文": { # "channel": "discord", # "to": "channel:1476104553148452958", # "accountId": "machu" # } # }
# 2. Calculate time 30 seconds later date -u -d "+30 seconds" +"%Y-%m-%dT%H:%M:%SZ" # 结果: 2026-02-26T13:30:00Z
# 3. 创建 cron job (using mAIn 会话 + 系统-event) OpenClaw cron 添加 \ --name "reminder-weather" \ --at "2026-02-26T13:30:00Z" \ --会话 mAIn \ --系统-event "检查 Beijing weather" \ --代理 machu \ --announce \ --channel discord \ --to "channel:1476104553148452958" \ --删除-after-运行
Task Content (SECURITY)
User-specified task content must be sanitized before passing to cron:
验证 Method: REJECT dangerous patterns (not escape)
The script rejects any 输入 contAIning:
Command substitution: $(), backticks
Shell metacharacters: ;, |, &, >, <
Double quotes: " (breaks 命令行工具 quoting)
Newlines: \n (can inject multiple commands)
Dangerous command prefixes: sudo, rm, w获取, curl, bash, etc.
Sanitization Script: Use scripts/sanitize-message.sh to 验证 输入:
./scripts/sanitize-message.sh "user's task content"
# Exit code 0 = safe, non-zero = rejected
If rejected: Tell user the task contAIns invalid characters and ask them to rephrase without: $() ; | & > < " or dangerous commands.
Confirmation Reply
After creating the task, reply to user to confirm:
"OK, will remind you in X minutes/to do XXX" Don't tell user the specific cron command Notes Time must be in the future, not the past Task content should be concise and clear If time exceeds 48 hours, suggest using calendar Always use --会话 mAIn + --系统-event for reliable Discord delivery 验证 task content with sanitize-message.sh before creating job