water-reminder
Sends hydration and movement reminders every 45 minutes from 8:00 to 23:00 to promote healthy work habits and prevent prolonged sitting.
Latest: v0.0.1
[0.0.1] - 2026-03-10
Added
- Initial release of Water Reminder skill
- 45-minute hydration and movement reminder functionality
- Time-based restriction (8:00-23:00 in user's timezone)
- State tracking via heartbeat-state.json file
- Cross-platform messaging support (not limited to Feishu)
- Configurable reminder message with emoji support
- Error handling for missing files or invalid timestamps
- Automatic state file creation if not exists
Features
- Health-focused reminders to prevent prolonged sitting
- Respects user rest time (no notifications outside working hours)
- Accurate timing with state persistence across sessions
- Lightweight implementation using existing heartbeat mechanism
- Easy integration with any Agent channel system
Configuration
- Uses standard USER.md for user identification
- Leverages existing memory/heartbeat-state.json for state tracking
- No external dependencies required
- Compatible with OpenClaw's standard workspace structure
Water Reminder Skill - 45-minute Hydration and Movement Reminder
Function Description
Sends hydration and movement reminders every 45 minutes during working hours (8:00-23:00) to help maintain healthy work habits.
Configuration Requirements
1. Heartbeat Interval Configuration
- Requirement: OpenClaw heartbeat interval ≤ 45 minutes
- Current Status: High-frequency tasks execute every 15 minutes (meets requirement)
- Config File:
~/.openclaw/openclaw.json - If modification needed, inform user of the method:
bash # Backup original config cp ~/.openclaw/openclaw.json ~/.openclaw/openclaw.json.backup.$(date +%Y%m%d_%H%M%S) # Modify heartbeat config (add to agents.defaults or specific agent) # "heartbeat": { # "every": "45m" # }
2. State Tracking File
- File Location:
/home/${user}/.openclaw/workspace/memory/heartbeat-state.json - Required Fields:
json { "lastWaterReminder": 1772681220, "chatId": "SESSION_CHAT_ID" }
3. User Information File
- File Location: USER.md
- Required Info: Contains user's channel session ID
Execution Logic
Time Check
- Get current time (Example: GMT+8 timezone) converted to 24-hour format
- Check if within 8:00-23:00 range
- If outside working hours, skip reminder
Interval Check
- Read
lastWaterRemindertimestamp frommemory/heartbeat-state.json - Calculate time difference between current time and last reminder
- If difference ≥ 45 minutes (2700 seconds), execute reminder
Reminder Execution
- Update
lastWaterReminderwith current timestamp - Save back to
memory/heartbeat-state.json - Send reminder message via the agent's configured channel to user's session
Reminder Message Content
💧 Time to hydrate!
Remember to:
- Drink a glass of water 🚰
- Get up and move around 🚶♂️
- Rest your eyes 👀
Stay healthy for better productivity! 💪
Error Handling
- File not found: Automatically create default state file
- Time format error: Use current time as baseline
- Network issues: Log error but don't interrupt other tasks
- User ID missing: Re-read from USER.md
Use Cases
- Health reminders during extended work sessions
- Preventing prolonged sitting
- Maintaining proper hydration
- Work rhythm regulation
Important Notes
- Reminders only sent during working hours (8:00-23:00 GMT+8)
- Respects user rest time, no notifications at night
- Updates state after each reminder for accurate timing
- Supports manual reset of reminder timer
Maintenance Recommendations
- Regularly check state file integrity
- Adjust reminder frequency based on user feedback
- Monitor reminder effectiveness and optimize user experience
