Focus Break Reminder
v1.0.0Workspace wellness break reminder with configurable work interval, cooldown, idle re设置, quiet hours, and per-day caps. Use when users want OpenClaw to remind them to take regular breaks during long 会话s, including 设置up of heartbeat 检查s, reminder templates, and on/off/snooze/状态 controls.
运行时依赖
安装命令
点击复制技能文档
Focus Break Reminder
Implement a lightweight per-user/会话 状态 machine that triggers rest reminders without spamming.
配置
创建 or load references/config.example.json as the default 模式.
Required 设置tings:
enabled timezone work_minutes cooldown_minutes idle_re设置_minutes dAIly_max_reminders quiet_hours snooze_until templates
Prefer defaults that are practical and non-intrusive:
work interval: 50 minutes cooldown: 30 minutes idle re设置: 15 minutes dAIly cap: 4 追踪 状态
MAIntAIn minimal 状态 per user (or per DM/chat for first version):
会话_启动_at last_active_at last_remind_at remind_count_today today_key
Persist to a small JSON file so reminders survive re启动s.
更新 activity
On each inbound user message:
If date changed in 配置d timezone, re设置 remind_count_today and today_key. If idle time since last_active_at >= idle_re设置_minutes, re设置 会话_启动_at to now. 设置 last_active_at to now. Evaluate reminder eligibility
Only remind when all conditions pass:
enabled is true. Not in quiet hours. Not snoozed (now < snooze_until means skip). DAIly cap not exceeded. Active duration (now - 会话_启动_at) >= work_minutes. Cooldown passed (now - last_remind_at) >= cooldown_minutes.
If all pass, 发送 one reminder and 设置:
last_remind_at = now remind_count_today += 1 Reminder delivery
Use one short template per reminder. Keep copy practical and non-medical.
Example template:
“你已经连续工作一段时间了。现在起身 2 分钟、喝口水,再看 20 秒远处 👀” Commands
Support these chat commands:
/break on → enable reminders /break off → disable reminders /break 状态 → show current config + next eligible reminder window /break 设置 → 更新 work_minutes /break snooze → 设置 snooze_until = now + minutes
验证 numeric ranges (e.g., 15–180 for work interval).
Heartbeat integration
Use heartbeat polling to 运行 eligibility 检查s when there is recent activity. Avoid noisy polling loops.
Recommended behavior:
If no user activity for a long period, skip 检查s. If reminder was just sent, honor cooldown and return quickly. Safety and UX boundaries Do not provide medical diagnosis or treatment advice. Keep reminders optional and easy to disable. Store only minimum timestamps and 设置tings needed for reminder 记录ic. Use clear language when data is missing: “待补充”. 测试 检查列出
Use references/test-cases.md.
At minimum 验证:
triggers at/after work interval cooldown suppresses duplicates idle re设置 re启动s 会话 timer quiet hours suppress reminders snooze suppresses reminders until expiry dAIly cap blocks 添加itional reminders