agentleFS
zwjbendnzwjbendn/weight-loss-skill/notification-manager/SKILL.md

notification-manager

Skill1 starsChanged 8 months agoMITView on GitHub

Cron infrastructure and reminder lifecycle management for the AI weight loss companion. Creates, syncs, and removes meal/weight reminder cron jobs. Manages the engagement lifecycle (Active → Pause → Recall → Silent). Handles adaptive timing and user reminder setting changes. Use this skill when: meal-planner completes onboarding (to bootstrap reminders), user requests reminder setting changes, or another skill needs to verify/fix cron state. Do NOT use for composing reminder content or handling replies — that is notification-composer's job.

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    All cron job creation must go through this skill's script:

    line 24
  2. Distinctive:

    Use the cron tool directly for listing and removing:

    line 90
  3. Distinctive:

    Adjust timing: remove old job + create new one

    line 93
  4. Distinctive:

    Do all of this silently — do not mention it to the user.

    line 109
  5. Very specific:

    Every meal cron --message MUST tell the agent to run notification-composer for that meal.

    line 117
  6. Very specific:

    When a meal time changes, update health-profile.md > Meal Schedule — auto-sync will fix the cron on next activation.

    line 193

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Notification Manager

⚠️ SILENT OPERATION: Never narrate internal actions, skill transitions, or tool calls to the user. No "Let me check...", "Now I'll transition to...", "Reading your profile...". Just do it silently and respond with the result.

Orchestration layer for reminders — cron CRUD, lifecycle management, adaptive timing, and setting changes. This skill decides when to send and whether to keep sending. The actual message content is composed by notification-composer.

Cron Infrastructure

Script

All cron job creation must go through this skill's script:

bash {baseDir}/scripts/create-reminder.sh

This script (migrated from the former scheduled-reminders skill) auto-resolves delivery config for multiple channels (Slack, WeChat, WeCom, etc.).

One-shot reminder

bash {baseDir}/scripts/create-reminder.sh \
  --agent <your-agent-id> \
  --channel <channel> \
  --name "Descriptive name" \
  --message "Reminder content" \
  --at "2m"

--at accepts relative time (2m, 1h, 30s) or ISO timestamp (2026-03-04T10:00:00Z). One-shot reminders auto-delete after running. Use --keep to preserve them.

Recurring reminder

bash {baseDir}/scripts/create-reminder.sh \
  --agent <your-agent-id> --channel <channel> --name "Lunch reminder" \
  --message "Run notification-composer for lunch." \
  --cron "0 12 * * *"

--tz auto-detects from the agent workspace's timezone.json. Falls back to Asia/Shanghai if not found. You can override explicitly with --tz.

Parameters

ParamRequiredDescription
--agent✅Your agent ID (e.g. wechat-dm-xxx, 007-zhuoran)
--channel❌Delivery channel (wechat, wecom, slack, etc.). Defaults to slack if omitted (backward-compatible)
--name✅Descriptive job name (shown in cron list)
--message✅Prompt sent to user when the job fires
--atone ofOne-shot: relative time or ISO timestamp
--cronone ofRecurring: 5-field cron expression
--tz❌Timezone for cron (auto-detects from timezone.json, fallback: Asia/Shanghai)
--keep❌Don't auto-delete one-shot jobs after running
--to❌Explicit delivery target. Overrides auto-detection. Required for channels other than slack/wechat/wecom

How it works

The script resolves the delivery target (--to) based on the channel:

ChannelAuto-detectionExample
slack (default)Looks up Slack user ID from ~/.openclaw/openclaw.json bindings → user:<id>--agent 007-zhuoran → user:U12345
wechat / wecomExtracts userId from agent ID (wechat-dm-xxx → xxx)--agent wechat-dm-abc123 → abc123
OthersNo auto-detection — must pass --to explicitly--to "123456789"

Timezone auto-detection searches these paths in order:

  1. ~/.openclaw/workspace-$AGENT/timezone.json
  2. ~/.openclaw/workspace-nutritionist/$AGENT/timezone.json

Then calls openclaw cron add with sessionTarget = "isolated" and payload.kind = "agentTurn" automatically.

Managing existing jobs

Use the cron tool directly for listing and removing:

  • List: cron tool with action: "list"
  • Remove: cron tool with action: "remove" and jobId
  • Adjust timing: remove old job + create new one

Auto-sync on Activation

Every time this skill is activated (by a cron trigger, by another skill like meal-planner, or by any interaction), verify that existing cron jobs match the current meal times in health-profile.md > Meal Schedule:

  1. List existing reminder cron jobs (action: "list").
  2. Derive the expected cron times from health-profile.md > Meal Schedule (each meal time minus 15 min).
  3. Compare:
    • Missing jobs (expected time has no matching cron) → create them.
    • Stale jobs (cron exists but its time doesn't match any current meal time) → remove then recreate.
    • Legacy jobs (cron exists and time matches, but --message references daily-notification or daily-notification-skill instead of notification-composer) → remove then recreate with the correct notification-composer message. This ensures old cron jobs from before the skill split are automatically migrated.
    • Matching jobs (time matches AND message references notification-composer) → no action.
  4. Also verify the weight reminder cron job exists (Mon & Thu, 30 min before breakfast — see § "Weight reminders" below). Create if missing.
  5. Do all of this silently — do not mention it to the user.

Cron Job Definitions

Create recurring cron jobs using the script above. Derive the cron times from health-profile.md > Meal Schedule (each meal time minus 15 min). Do NOT pass --tz — the script auto-detects from timezone.json. Pass --channel to match the agent's delivery channel (e.g. wechat, slack). If omitted, defaults to slack for backward compatibility.

Every meal cron --message MUST tell the agent to run notification-composer for that meal. Keep it minimal — notification-composer owns pre-send checks, message composition, and reply handling. Do not duplicate its rules in the cron message.

# Example: 3 meals, reminders 15 min before each (adjust times from health-profile.md)
bash {baseDir}/scripts/create-reminder.sh \
  --agent <your-agent-id> --channel <channel> --name "Breakfast reminder" \
  --message "Run notification-composer for breakfast." \
  --cron "45 6 * * *"

bash {baseDir}/scripts/create-reminder.sh \
  --agent <your-agent-id> --channel <channel> --name "Lunch reminder" \
  --message "Run notification-composer for lunch." \
  --cron "45 11 * * *"

bash {baseDir}/scripts/create-reminder.sh \
  --agent <your-agent-id> --channel <channel> --name "Dinner reminder" \
  --message "Run notification-composer for dinner." \
  --cron "45 17 * * *"

Weight reminders (2x/week)

Cron time = breakfast time minus 30 min (not 15 min like meals). Derive from health-profile.md > Meal Schedule.

# Example assumes breakfast at 07:00 → weight cron at 06:30
bash {baseDir}/scripts/create-reminder.sh \
  --agent <your-agent-id> --channel <channel> --name "Weight check-in reminder" \
  --message "Run notification-composer for weight." \
  --cron "30 6 * * 1,4"

Lifecycle: Active → Recall → Silent

Stage 1: ACTIVE — normal reminders
    │
    └── 2 full calendar days: zero replies + zero messages
           │
Stage 2: PAUSE — stop all reminders, send first recall
    │
    ├── User replies → back to Stage 1
    └── 3 days, no reply
           │
Stage 3: SECOND RECALL — one final message
    │
    ├── User replies → back to Stage 1
    └── No reply → Stage 4
           │
Stage 4: SILENT — send nothing. Wait for user to return.

Recall replaces the next meal reminder slot — don't send at random hours. Weight reminders also stop at Stage 2. Write current stage to data/engagement.json > notification_stage.

Stage transition logic: This skill periodically checks data/engagement.json > last_interaction to detect when the user has gone silent. When a stage transition occurs, update data/engagement.json > notification_stage. The notification-composer reads this value to decide whether to send a normal reminder, a recall message, or nothing at all.

When a silent user returns: Reset to Stage 1. Resume normal reminders. The warm welcome message itself is composed by notification-composer.


Adaptive Timing (within Stage 1)

SignalAction
Consistently replies 30+ min lateShift that meal's reminder time — update health-profile.md > Meal Schedule (the auto-sync logic will fix the cron on next activation)
Never replies to breakfast (2+ weeks)Stop breakfast reminders

When a meal time changes, update health-profile.md > Meal Schedule — auto-sync will fix the cron on next activation.


Reminder Settings Changes

Users may ask to change reminders in natural language. Handle inline:

User saysAction
"Stop breakfast reminders"Stop that meal's reminders. Update data/engagement.json > reminder_config. Confirm: "Done — no more breakfast reminders. Let me know if you change your mind."
"Change dinner to 8 PM"Update health-profile.md > Meal Schedule with the new time. The auto-sync will update the cron on next activation. Confirm: "Got it — dinner reminders moved to 7:45 PM."
"Stop all reminders"Stop everything, move to Stage 4. "All reminders off. I'm still here if you want to chat. 💛"
"Remind me more" / "Can you also remind me for snacks"Outside current scope — acknowledge and note for future: "I can only do meals and weight for now, but I'll keep that in mind."
"Resume reminders" / "Start reminding me again"Restart Stage 1 with previous config. Confirm schedule.

Workspace

Reads

SourceField / PathPurpose
health-profile.mdMeal ScheduleReminder schedule + max reminders/day
data/engagement.jsonlast_interactionStage detection

Writes

PathHowWhen
data/engagement.jsonnotification_stage — direct writeStage transitions
data/engagement.jsonreminder_config — direct writeAdaptive timing changes, user setting changes
health-profile.md > Meal Scheduledirect writeAdaptive timing updates, user-requested time changes

Skill Routing

See SKILL-ROUTING.md for the full conflict resolution system. This skill is Priority Tier P4 (Reporting). It handles the orchestration side of reminders — cron management, lifecycle, and settings. The execution side (composing messages, handling replies) is handled by notification-composer.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.