← 返回
效率工具 中文

Focus Break Reminder

Workspace wellness break reminder with configurable work interval, cooldown, idle reset, quiet hours, and per-day caps. Use when users want OpenClaw to remin...
工作空间健康休息提醒,支持配置工作间隔、冷却时间、空闲重置、静音时段及每日上限。
lxj0276
效率工具 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 1
Stars
📥 898
下载
💾 10
安装
1
版本
#latest

概述

Focus Break Reminder

Implement a lightweight per-user/session state machine that triggers rest reminders without spamming.

Configure

Create or load references/config.example.json as the default schema.

Required settings:

  • enabled
  • timezone
  • work_minutes
  • cooldown_minutes
  • idle_reset_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 reset: 15 minutes
  • daily cap: 4

Track state

Maintain minimal state per user (or per DM/chat for first version):

  • session_start_at
  • last_active_at
  • last_remind_at
  • remind_count_today
  • today_key

Persist to a small JSON file so reminders survive restarts.

Update activity

On each inbound user message:

  1. If date changed in configured timezone, reset remind_count_today and today_key.
  2. If idle time since last_active_at >= idle_reset_minutes, reset session_start_at to now.
  3. Set last_active_at to now.

Evaluate reminder eligibility

Only remind when all conditions pass:

  1. enabled is true.
  2. Not in quiet hours.
  3. Not snoozed (now < snooze_until means skip).
  4. Daily cap not exceeded.
  5. Active duration (now - session_start_at) >= work_minutes.
  6. Cooldown passed (now - last_remind_at) >= cooldown_minutes.

If all pass, send one reminder and set:

  • 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 status → show current config + next eligible reminder window
  • /break set → update work_minutes
  • /break snooze → set snooze_until = now + minutes

Validate numeric ranges (e.g., 15–180 for work interval).

Heartbeat integration

Use heartbeat polling to run eligibility checks when there is recent activity. Avoid noisy polling loops.

Recommended behavior:

  • If no user activity for a long period, skip checks.
  • 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 settings needed for reminder logic.
  • Use clear language when data is missing: “待补充”.

Testing checklist

Use references/test-cases.md.

At minimum verify:

  • triggers at/after work interval
  • cooldown suppresses duplicates
  • idle reset restarts session timer
  • quiet hours suppress reminders
  • snooze suppresses reminders until expiry
  • daily cap blocks additional reminders

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-30 02:10 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

productivity

Obsidian

steipete
操作 Obsidian 仓库(纯 Markdown 笔记)并通过 obsidian-cli 自动化。
★ 430 📥 103,707
productivity

Word / DOCX

ivangdavila
创建、检查和编辑 Microsoft Word 文档及 DOCX 文件,支持样式、编号、修订记录、表格、分节符及兼容性检查等功能。
★ 438 📥 147,229
productivity

Nano Pdf

steipete
使用nano-pdf CLI通过自然语言指令编辑PDF
★ 275 📥 114,742