← 返回
内容创作 中文

Reminder

Create one-time reminder tasks using OpenClaw cron. User specifies reminder time and task content in natural language via Discord, and the task result will b...
使用 OpenClaw cron 创建一次性提醒任务。用户可通过 Discord 以自然语言指定提醒时间与任务内容。
skyan
内容创作 clawhub v1.0.5 1 版本 99714.6 Key: 无需
★ 0
Stars
📥 2,446
下载
💾 25
安装
1
版本
#latest

概述

Reminder Skill

Create one-time reminder tasks using OpenClaw cron.

Usage

When user says "remind me to XXX in 30 seconds" or "remind me at 3pm", I create a cron job that executes the task and returns the result when the time comes.

Parameter Configuration

Fixed Parameters

  • --session main - Use main session to inherit Discord context
  • --system-event - System event payload for main session
  • --channel discord - Discord channel
  • --announce - Send result directly to Discord
  • --delete-after-run - Delete task after execution

Dynamic Parameters (from current session context)

Use session_status tool to get current session's deliveryContext:

  • --agent - Get from deliveryContext.accountId (e.g., machu)
  • --to - Get from deliveryContext.to (e.g., channel:1476104553148452958)

How to get:

# Get current session info
session_status
# Output contains deliveryContext:
# {
#   "channel": "discord",
#   "to": "channel:1476104553148452958",
#   "accountId": "machu"
# }

Time Parsing

Parse user input 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 format for cron.

Usage Example

User says "remind me to check weather in 30 seconds":

# 1. Get current session's deliveryContext
session_status
# Assume output:
# {
#   "deliveryContext": {
#     "channel": "discord",
#     "to": "channel:1476104553148452958",
#     "accountId": "machu"
#   }
# }

# 2. Calculate time 30 seconds later
date -u -d "+30 seconds" +"%Y-%m-%dT%H:%M:%SZ"
# Result: 2026-02-26T13:30:00Z

# 3. Create cron job (using main session + system-event)
openclaw cron add \
  --name "reminder-weather" \
  --at "2026-02-26T13:30:00Z" \
  --session main \
  --system-event "Check Beijing weather" \
  --agent machu \
  --announce \
  --channel discord \
  --to "channel:1476104553148452958" \
  --delete-after-run

Task Content (SECURITY)

User-specified task content must be sanitized before passing to cron:

  1. Validation Method: REJECT dangerous patterns (not escape)

The script rejects any input containing:

  • Command substitution: $(), backticks ` ``
  • Shell metacharacters: ;, |, &, >, <
  • Double quotes: " (breaks CLI quoting)
  • Newlines: \n (can inject multiple commands)
  • Dangerous command prefixes: sudo, rm, wget, curl, bash, etc.
  1. Sanitization Script:

Use scripts/sanitize-message.sh to validate input:

```bash

./scripts/sanitize-message.sh "user's task content"

# Exit code 0 = safe, non-zero = rejected

```

  1. 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

  1. Time must be in the future, not the past
  2. Task content should be concise and clear
  3. If time exceeds 48 hours, suggest using calendar
  4. Always use --session main + --system-event for reliable Discord delivery
  5. Validate task content with sanitize-message.sh before creating job

版本历史

共 1 个版本

  • v1.0.5 当前
    2026-03-29 07:11 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

productivity

Arxiv Translate

skyan
通过论文的arXiv ID或URL提供其中文翻译的直接下载链接。
★ 0 📥 1,647
content-creation

Baidu Wenku AIPPT

ide-rea
使用百度文库 AI 智能生成 PPT,自动根据内容选择模板。
★ 66 📥 46,144
content-creation

AdMapix

fly0pants
广告情报与应用数据分析助手,支持搜索广告素材、分析应用排名、下载量、收入及市场洞察,用于广告素材和竞品分析。
★ 295 📥 136,433