1---2name: weight-manager3description: 体重管理、减脂增重目标、运动记录与身体指标分析。用于设定体重目标、追踪进度、 计算 BMI/BMR/TDEE、分析热量收支,并结合 `diet-tracker` 与 `mediwise-health-tracker` 形成饮食、运动、体重和围度的管理闭环。 Use when setting weight goals, tracking progress, logging exercise, or analyzing calorie balance and body composition.4---56# weight-manager78## 概述910提供体重目标设定、进度追踪、趋势分析、热量收支计算、达标预测、BMI/BMR/TDEE 计算、运动记录和身体围度记录功能。体重数据复用 `health_metrics` 表(weight 类型),饮食热量数据来自 `diet_records` 表,运动消耗数据来自 `exercise_records` 表,身体围度数据复用 `health_metrics` 表,形成完整的"饮食 → 运动 → 热量 → 体重 → 身体成分"管理闭环。1112## 数据模型1314### weight_goals(体重目标)15| 字段 | 说明 |16|------|------|17| id | 目标 ID |18| member_id | 成员 ID |19| goal_type | 目标类型: lose/gain/maintain |20| start_weight | 起始体重 kg |21| target_weight | 目标体重 kg |22| start_date | 开始日期 |23| target_date | 目标日期 |24| daily_calorie_target | 每日热量目标 kcal |25| status | 状态: active/completed/abandoned |26| note | 备注 |2728### exercise_records(运动记录)29| 字段 | 说明 |30|------|------|31| id | 记录 ID |32| member_id | 成员 ID |33| exercise_type | 运动类型: running/walking/cycling/swimming/strength/yoga/hiit/other |34| exercise_name | 自定义名称 |35| duration | 时长(分钟) |36| calories_burned | 消耗热量 kcal |37| exercise_date | 运动日期 YYYY-MM-DD |38| exercise_time | 运动时间 HH:MM |39| intensity | 强度: low/medium/high |40| note | 备注 |4142> 体重记录复用 `health_metrics` 表的 weight 类型,不重复建表。43> 身体围度记录复用 `health_metrics` 表,metric_type 为 waist/hip/chest/arm/thigh/body_fat。4445## 功能列表4647### weight_goal.py — 目标管理4849| 动作 | 子命令 | 必要参数 | 可选参数 | 说明 |50|------|--------|----------|----------|------|51| set-goal | set | --member-id, --goal-type, --start-weight, --target-weight | --start-date, --target-date, --daily-calorie-target, --activity-level, --note | 设定减重/增重/维持目标,未指定热量目标时自动根据 BMR/TDEE 推算 |52| view-goal | view | --member-id | | 查看当前活跃目标 |53| update-goal | update | --goal-id | --target-weight, --target-date, --daily-calorie-target, --note | 修改目标参数 |54| complete-goal | complete | --goal-id | | 标记目标完成 |55| abandon-goal | abandon | --goal-id | | 放弃目标 |5657### weight_analysis.py — 进度分析5859| 动作 | 子命令 | 必要参数 | 可选参数 | 说明 |60|------|--------|----------|----------|------|61| weight-progress | progress | --member-id | | 当前进度(已减/增多少,完成百分比) |62| weight-trend | trend | --member-id | --days (默认 30) | 体重趋势(N 天变化,平均变化速率) |63| calorie-balance | calorie-balance | --member-id | --days (默认 7) | 热量收支(含饮食摄入 + 运动消耗 + TDEE 估算) |64| weekly-report | weekly-report | --member-id | --end-date | 周报(体重变化 + 饮食热量 + 运动统计 + 建议) |65| weight-projection | projection | --member-id | | 按当前速度预测达标日期 |6667### exercise.py — 运动记录6869| 动作 | 子命令 | 必要参数 | 可选参数 | 说明 |70|------|--------|----------|----------|------|71| add-exercise | add | --member-id, --exercise-type | --exercise-name, --duration, --calories-burned, --exercise-date, --exercise-time, --intensity, --note | 添加运动记录 |72| list-exercises | list | --member-id | --exercise-type, --start-date, --end-date, --limit | 查看运动记录 |73| delete-exercise | delete | --id | | 删除运动记录 |74| exercise-summary | daily-summary | --member-id | --date | 某日运动摘要 |7576### body_stats.py — 身体指标与围度7778| 动作 | 子命令 | 必要参数 | 可选参数 | 说明 |79|------|--------|----------|----------|------|80| calculate-bmi | bmi | --member-id | | 计算 BMI(中国标准分级) |81| calculate-bmr-tdee | bmr-tdee | --member-id | --activity-level | 计算 BMR 和 TDEE(Mifflin-St Jeor 公式) |82| suggest-calories | suggest-calories | --member-id | --activity-level, --goal-type | 根据 TDEE + 目标类型推算每日热量目标 |83| add-measurement | add-measurement | --member-id, --type, --value | --measured-at, --note | 记录身体围度 |84| list-measurements | list-measurements | --member-id | --type, --limit | 查看围度记录历史 |85| body-summary | body-summary | --member-id | | 综合身体报告(BMI + 围度变化 + 体脂率趋势) |8687## BMI/BMR/TDEE 说明8889### BMI 分级(中国标准)90- < 18.5:偏瘦91- 18.5 - 24:正常92- 24 - 28:超重93- >= 28:肥胖9495### BMR 公式(Mifflin-St Jeor)96- 男: BMR = 10 × 体重(kg) + 6.25 × 身高(cm) - 5 × 年龄 + 597- 女: BMR = 10 × 体重(kg) + 6.25 × 身高(cm) - 5 × 年龄 - 1619899### TDEE 活动系数100| 活动水平 | 系数 | 说明 |101|----------|------|------|102| sedentary | 1.2 | 久坐不动 |103| light | 1.375 | 轻度活动(每周1-3次) |104| moderate | 1.55 | 中度活动(每周3-5次) |105| active | 1.725 | 高度活动(每周6-7次) |106| very_active | 1.9 | 极高活动(高强度体力劳动) |107108### 热量推算规则109- 减重: TDEE - 500 kcal(约每周减 0.45kg)110- 增重: TDEE + 300 kcal111- 维持: TDEE112- 最低限制: 男 1500 kcal / 女 1200 kcal113114## 身体围度类型115116| 类型 | 说明 | 单位 | 范围 |117|------|------|------|------|118| waist | 腰围 | cm | 30-200 |119| hip | 臀围 | cm | 30-200 |120| chest | 胸围 | cm | 30-200 |121| arm | 臂围 | cm | 10-80 |122| thigh | 大腿围 | cm | 20-100 |123| body_fat | 体脂率 | % | 2-60 |124125## 使用流程1261271. 确认成员身份1282. 记录身高体重(health_metric add --type weight / --type height)1293. 使用 `calculate-bmi` 计算 BMI1304. 使用 `calculate-bmr-tdee` 计算基础代谢和每日总消耗1315. 使用 `set-goal` 设定体重管理目标(自动推算热量目标)1326. 定期通过 `mediwise-health-tracker` 记录体重1337. 通过 `diet-tracker` 记录每日饮食1348. 通过 `add-exercise` 记录运动消耗1359. 使用 `calorie-balance` 查看热量收支(含运动消耗)13610. 使用 `add-measurement` 记录身体围度13711. 使用 `body-summary` 查看综合身体报告13812. 使用 `weekly-report` 获取综合周报(含运动统计)13913. 使用 `weight-projection` 预测达标日期140141## 注意事项142143- goal_type 支持: lose(减重)、gain(增重)、maintain(维持)144- 每个成员同时只能有一个 active 状态的目标145- 体重数据通过 health_metrics 表记录,本 skill 只读取不写入体重数据146- 热量收支分析需要 diet-tracker 的饮食记录支持147- 运动消耗数据通过 exercise_records 表记录148- BMI/BMR/TDEE 计算需要成员有身高、体重、性别和出生日期信息149- 身体围度数据存储在 health_metrics 表中,与其他健康指标共用150- 预测功能基于近期体重变化趋势,仅供参考151- **附件管理**:身材照片、运动截图等文件的上传和管理通过 `mediwise-health-tracker` 的附件功能完成(`attachment.py`),本 skill 不直接处理文件存储。使用 `add-attachment` 动作并指定 category 为 `body_photo` 或 `exercise_photo`