360 Secure SkillHub
360 安全技能中心

Vitamin Tracker Channel

该 Skill 读取工作区的 VITAMINS.md 补充剂时间表,通过 Python 脚本调用 OpenClaw cron 删除旧提醒任务并按各时段重建,从而在指定频道推送维生素提醒。需要配置频道、时区和可选的 workspace 环境变量。

cdmichaelb
cdmichaelb
热度 40.01
最近更新 2026-05-11 17:40:19
分类:生活依赖:代码执行 / 读写文件应用场景:健康 / 日程安排 / 工作流 / 自动化脚本

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add vitamin-tracker-channel
Metadata
name
vitamin-tracker-channel
version
1.0.1
description
Manage vitamin/supplement reminders across configurable daily time slots via cron jobs. Use when adjusting supplement schedules, adding/removing supplements, or handling vitamin-related channel interactions. Triggers on "vitamin", "supplement", "vitamin reminder", "vitamin schedule".
env
{"VITAMIN_CHANNEL_ID":{"description":"Channel ID for vitamin reminders","required":true},"VITAMIN_TIMEZONE":{"description":"IANA timezone for scheduling (e.g. America/New_York)","required":true},"WORKSPACE":{"description":"Root workspace directory for data files","required":false}}

Vitamin Tracker Channel

Manage supplement reminders across configurable daily time slots using OpenClaw cron jobs.

Configuration

Set the following environment variables:

  • VITAMIN_CHANNEL_ID — the channel to post reminders in
  • VITAMIN_TIMEZONE — IANA timezone for scheduling (e.g. America/New_York, Europe/Berlin)
  • WORKSPACE — root workspace directory (defaults to ~/.openclaw/workspace)

Supplement names and schedules are configured in VITAMINS.md in the workspace root. Edit the schedule section to match your regimen.

Schedule Format

VITAMINS.md should have a ## Schedule section with time labels and HH:MM times, followed by ### Label subsections listing supplements:

## Schedule

- Breakfast: 09:00
- Lunch: 13:00
- Dinner: 18:00

### Breakfast

- Multivitamin
- Vitamin C
- Vitamin D₃

### Lunch

- Fiber (keep 2h away from minerals)

### Dinner

- Magnesium

Update Script

After editing VITAMINS.md, run the update script to sync all cron jobs:

python3 scripts/update_vitamin_crons.py

This reads VITAMINS.md, removes existing vitamin cron jobs, and recreates them with the updated schedule.

What the Script Handles

  • Parses the ## Schedule section for times
  • Parses each ### Label section for supplement lists
  • Creates one cron job per time slot (up to 5 configurable slots)
  • Formats reminder messages: "Vitamin reminder: Breakfast time. Take Multivitamin, Vitamin C, and Vitamin D₃."
  • Removes old jobs before recreating to avoid duplicates

Cron Job Naming

Jobs are named vitamins-{label}-reminder (e.g. vitamins-breakfast-reminder, vitamins-lunch-reminder).

Runtime Requirements

  • python3 — the update script is Python
  • openclaw CLI — the script calls openclaw cron to manage jobs

Data Access

This skill:

  • Reads $WORKSPACE/VITAMINS.md — your supplement schedule (user-created)
  • Manages cron jobs via the openclaw cron CLI — removes existing vitamin jobs, then recreates them
  • Posts messages to the configured channel via cron delivery (requires network when cron fires)
  • No data files written — schedule lives in VITAMINS.md, state is in the cron system

Note: The update script removes all existing vitamins-*-reminder cron jobs before recreating them. Back up existing jobs if needed.

Required Files

  • scripts/update_vitamin_crons.py — cron job sync script (included in bundle)
  • $WORKSPACE/VITAMINS.md — supplement schedule (user-created, not included)