一键导入
diet-pattern-detection
One-time cron-only skill (never user-triggered): checks if the user's actual eating pattern fits a different diet mode, then self-destructs.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
One-time cron-only skill (never user-triggered): checks if the user's actual eating pattern fits a different diet mode, then self-destructs.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Trigger on emotional signals, negative AND positive: body-image distress, guilt about eating, hopelessness, self-criticism — or pride, milestones, excitement about progress. Takes priority over ALL logging, data collection, and reminders — when a message carries both data (food/weight/exercise) and emotion, emotional presence comes FIRST; log later or briefly after.
Reference companion for expert interventions. Trigger when the prompt carries a 'Pending Expert Intervention (auto-injected)' section — the injected file is the runtime authority; read this skill when you need the full workflow background (intervention kinds, negotiation state machine, logging, file lifecycle).
Creates calorie-controlled diet templates and weekly meal plans from the user's calorie target and preferences (multiple diet modes). Trigger on: meal/diet plan requests, 'what should I eat to lose weight', '帮我做个饮食计划', meal prep and portion-control help, recipe suggestions tied to weight loss. Requires a calorie target (from PLAN.md or user-stated). On-the-spot restaurant/dining decisions → restaurant-meal-finder.
Per-trigger execution logic for daily reminders. Runs pre-send checks, composes meal/weight reminder messages, and manages recall messages. Use this skill when: a cron job fires and needs to decide whether/what to send. Do NOT use for cron management, lifecycle transitions, or reminder settings — that is notification-manager's job.
Cron infrastructure and reminder lifecycle (Active → Recall → Weekly/Monthly → Silent). Use when: onboarding completes (bootstrap meal/weight reminder crons), reminder timing/settings change, or another skill needs cron state verified/fixed. Leave/vacation requests → leave-manager. Composing reminder content → notification-composer. User-requested reminder CRUD → reminder-manager.
Returns meal-logging streak data (current_streak, pending_milestone) — called BY other skills (notification-composer at Stage-1 meal reminders; weekly-report), never a standalone conversation skill. Only user-triggered case: explicit streak questions ('我连续打卡几天了', 'what's my streak'). Never proactively mention streaks; silence after a break.
| name | diet-pattern-detection |
| version | 1.0.0 |
| description | One-time cron-only skill (never user-triggered): checks if the user's actual eating pattern fits a different diet mode, then self-destructs. |
| metadata | {"openclaw":{"emoji":"bar_chart","homepage":"https://github.com/NanoRhino/weight-loss-skill"}} |
⚠️ Cron-only skill. Never triggered by user messages. Activated by a daily cron job created by
notification-managerat onboarding completion.
When this skill sends a message to the user (diet pattern detection result, mode switch suggestion, or any output), the first line MUST be the section banner based on user locale:
| USER.md locale | First line |
|---|---|
zh / zh-CN / zh-TW / unset | 🔄——饮食模式调整——🔄 |
en / en-* | 🔄——Diet Mode Adjustment——🔄 |
Then one blank line, then the message body.
✅ Correct (Chinese user):
🔄——饮食模式调整——🔄
📋 我注意到一个有趣的现象...
❌ Wrong — missing banner, or banner not on first line, or no blank line after banner.
Daily cron job. Start date: Onboarding Completed + 3 days (from health-profile.md > Automation). Cron time: dinner_time + 3h.
Check precondition — read health-profile.md > Automation > Pattern Detection Completed. If already has a date → skip (should not happen, but defensive).
Run detection (handles data sufficiency check internally):
python3 {baseDir}/scripts/detect-pattern.py \
--data-dir {workspaceDir}/data/meals \
--current-mode <from health-profile.md > Diet Config > Diet Mode> \
--weight <current weight from latest weight.json entry> \
--target-weight <target weight from PLAN.md> \
--tz-offset {tz_offset}
If result has reason: "insufficient_data" (< 3 days) → reply exactly NO_REPLY (suppresses delivery; do NOT emit a free-text explanation). Cron preserved, retry tomorrow.
Handle result:
has_pattern: true → read references/diet-pattern-response.md, compose and send message to user. If user agrees to switch → update health-profile.md > Diet Config > Diet Mode and recalculate targets.has_pattern: false → no message (pattern matches current mode, all good).Self-destruct (when result is has_pattern true or false, NOT insufficient_data):
bash {reminder-manager:baseDir}/scripts/list-reminders.sh --agent {agentId}bash {reminder-manager:baseDir}/scripts/delete-reminder.sh --agent {agentId} --job <jobId>health-profile.md > Automation > Pattern Detection Completed: <YYYY-MM-DD>⚠️ Never call the
crontool directly (cron list/cron remove) — always go through the reminder-manager scripts above (AGENTS.md red line; cross-user cron deletion incident).
references/diet-pattern-response.md — user notification template (when pattern detected)