weight-manager
Skill29 starsChanged 4 months agoMITView on GitHub
Weight management: record user-provided weight goals, track progress, translate daily fluctuations into robust trends, generate a share-safe weight truth card, log exercise, calculate BMI/BMR/TDEE, and analyze body composition. Integrates with diet-tracker and mediwise-health-tracker.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- Yungho/family-doctortheir own version, first seen Mar 23, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- Yungho/family-doctor★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository6 other files it gives its agents.
- diet-trackerSkill
- health-monitorSkill
- mediwise-health-trackerSkill
- mediwise-health-suiteSkill
- sleep-trackerSkill
- wearable-syncSkill
The file
Files
MediWise · 体重与运动 Skill
概述
提供体重目标设定、进度追踪、趋势分析、体重波动翻译、可分享图卡、热量估算、BMI/BMR/TDEE 估算、运动记录和身体围度记录功能。体重数据复用 health_metrics 表(weight 类型),饮食热量数据来自 diet_records 表,运动消耗数据来自 exercise_records 表。
本 Skill 只记录和展示数据、用户目标差异与模型估算,不提供减重、增重、饮食、运动或其他健康指导。运动消耗只代表已记录活动;缺少完整基础代谢与日常活动数据时,不得把结果表述为真实热量缺口或预测治疗效果。
数据模型
weight_goals(体重目标)
| 字段 | 说明 |
| id | 目标 ID |
| member_id | 成员 ID |
| goal_type | 目标类型: lose/gain/maintain |
| start_weight | 起始体重 kg |
| target_weight | 目标体重 kg |
| start_date | 开始日期 |
| target_date | 目标日期 |
| daily_calorie_target | 每日热量目标 kcal |
| status | 状态: active/completed/abandoned |
| note | 备注 |
exercise_records(运动记录)
| 字段 | 说明 |
| id | 记录 ID |
| member_id | 成员 ID |
| exercise_type | 运动类型: running/walking/cycling/swimming/strength/yoga/hiit/other |
| exercise_name | 自定义名称 |
| duration | 时长(分钟) |
| calories_burned | 消耗热量 kcal |
| exercise_date | 运动日期 YYYY-MM-DD |
| exercise_time | 运动时间 HH:MM |
| intensity | 强度: low/medium/high |
| note | 备注 |
体重记录复用
health_metrics表的 weight 类型,不重复建表。 身体围度记录复用health_metrics表,metric_type 为 waist/hip/chest/arm/thigh/body_fat。
功能列表
weight_goal.py — 目标管理
| 动作 | 子命令 | 必要参数 | 可选参数 | 说明 |
| set-goal | set | --member-id, --goal-type, --start-weight, --target-weight | --start-date, --target-date, --daily-calorie-target, --note | 记录用户自行确定的减重/增重/维持目标;不会自动生成热量目标 |
| view-goal | view | --member-id | 查看当前活跃目标 | |
| update-goal | update | --goal-id | --target-weight, --target-date, --daily-calorie-target, --note | 修改目标参数 |
| complete-goal | complete | --goal-id | 标记目标完成 | |
| abandon-goal | abandon | --goal-id | 放弃目标 |
weight_analysis.py — 进度分析
| 动作 | 子命令 | 必要参数 | 可选参数 | 说明 |
| weight-progress | progress | --member-id | 当前进度(已减/增多少,完成百分比) | |
| weight-trend | trend | --member-id | --days (默认 30) | 体重趋势(N 天变化,平均变化速率) |
| calorie-balance | calorie-balance | --member-id | --days (默认 7) | 分别汇总已记录饮食摄入和运动消耗,不计算热量缺口 |
| weekly-report | weekly-report | --member-id | --end-date | 周报(体重变化 + 饮食热量 + 运动记录 + 目标差异) |
| weight-projection | projection | --member-id | 按当前速度预测达标日期 |
weight_truth_card.py — 体重翻译与分享卡片
| 动作 | 子命令 | 必要参数 | 可选参数 | 说明 |
| weight-truth | analyze | --member-id | --days(默认 14)、--as-of | 将单日变化和稳健长期趋势分开解释,返回结构化分析,不生成处方 |
| generate-weight-card | generate | --member-id | --days、--format(html/png/both)、--show-exact-weight、--show-member-name、--show-exact-date、--context | 生成 1080×1440 的「体重真相卡」;默认脱敏,可导出 HTML 和 PNG |
对用户统一称为 「MediWise 体重真相卡」,是本 skill 唯一的卡片产物。
分析会先把同一天的多次体重测量聚合为中位数,再使用 Theil–Sen 稳健斜率估计长期方向,并给出最新一次称重与稳健趋势的偏差。少于 7 个记录日或覆盖跨度不足 7 天时,只显示“记录不足”,不宣称趋势已经形成。文案由确定性规则产生,不调用模型自由发挥,也不预测达标日期;相关线索不代表因果,不得写成体重变化的原因。
分享卡默认隐藏姓名、绝对体重、目标体重、精确日期、用药、检验和其他医疗数据。仅在用户明确要求时,才通过 show_exact_weight、show_member_name 或 show_exact_date 展示对应字段。context 只能用于展示已经记录的中性事实;不得把时间上同时发生的饮食、睡眠或运动记录写成体重变化原因。
exercise.py — 运动记录
| 动作 | 子命令 | 必要参数 | 可选参数 | 说明 |
| add-exercise | add | --member-id, --exercise-type | --exercise-name, --duration, --calories-burned, --exercise-date, --exercise-time, --intensity, --note | 添加运动记录 |
| list-exercises | list | --member-id | --exercise-type, --start-date, --end-date, --limit | 查看运动记录 |
| delete-exercise | delete | --id | 删除运动记录 | |
| exercise-summary | daily-summary | --member-id | --date | 某日运动摘要 |
body_stats.py — 身体指标与围度
| 动作 | 子命令 | 必要参数 | 可选参数 | 说明 |
| calculate-bmi | bmi | --member-id | 计算 BMI(中国标准分级) | |
| calculate-bmr-tdee | bmr-tdee | --member-id | --activity-level | 计算 BMR 和 TDEE(Mifflin-St Jeor 公式) |
| suggest-calories | suggest-calories | --member-id | 兼容入口;明确说明 MediWise 不生成每日热量建议 | |
| add-measurement | add-measurement | --member-id, --type, --value | --measured-at, --note | 记录身体围度 |
| list-measurements | list-measurements | --member-id | --type, --limit | 查看围度记录历史 |
| body-summary | body-summary | --member-id | 综合身体报告(BMI + 围度变化 + 体脂率趋势) |
BMI/BMR/TDEE 说明
BMI 分级(中国标准)
- < 18.5:偏瘦
- 18.5 - 24:正常
- 24 - 28:超重
= 28:肥胖
BMR 公式(Mifflin-St Jeor)
- 男: BMR = 10 × 体重(kg) + 6.25 × 身高(cm) - 5 × 年龄 + 5
- 女: BMR = 10 × 体重(kg) + 6.25 × 身高(cm) - 5 × 年龄 - 161
TDEE 活动系数
| 活动水平 | 系数 | 说明 |
| sedentary | 1.2 | 久坐不动 |
| light | 1.375 | 轻度活动(每周1-3次) |
| moderate | 1.55 | 中度活动(每周3-5次) |
| active | 1.725 | 高度活动(每周6-7次) |
| very_active | 1.9 | 极高活动(高强度体力劳动) |
热量目标边界
MediWise 不根据 TDEE 自动生成减重、增重或维持所需的每日热量目标。daily_calorie_target 只记录用户本人或专业人员已经确定的目标。
身体围度类型
| 类型 | 说明 | 单位 | 范围 |
| waist | 腰围 | cm | 30-200 |
| hip | 臀围 | cm | 30-200 |
| chest | 胸围 | cm | 30-200 |
| arm | 臂围 | cm | 10-80 |
| thigh | 大腿围 | cm | 20-100 |
| body_fat | 体脂率 | % | 2-60 |
使用流程
- 确认成员身份
- 记录身高体重(通过
mediwise-health-tracker的add-metric动作,type 填 weight / height) - 使用
calculate-bmi计算 BMI - 使用
calculate-bmr-tdee计算基础代谢和每日总消耗 - 使用
set-goal记录用户已经确定的体重目标;如用户或专业人员已确定每日热量目标,可一并记录 - 定期通过
mediwise-health-tracker记录体重 - 通过
diet-tracker记录每日饮食 - 通过
add-exercise记录运动消耗 - 使用
calorie-balance查看热量收支(含运动消耗) - 使用
add-measurement记录身体围度 - 使用
body-summary查看综合身体报告 - 使用
weekly-report获取综合周报(含运动统计) - 使用
weight-projection预测达标日期 - 使用
weight-truth区分单日波动和稳健长期趋势 - 需要可保存、可分享的图片时使用
generate-weight-card生成体重真相卡;除非用户明确要求,否则保留默认脱敏设置
注意事项
- 当前公开版本只用于个人本地档案;身份隔离由安装时的个人模式和 action 适配层处理,不向普通用户暴露或索取
owner_id。 - goal_type 支持: lose(减重)、gain(增重)、maintain(维持)
- 每个成员同时只能有一个 active 状态的目标
- 体重数据通过 health_metrics 表记录,本 skill 只读取不写入体重数据
- 热量收支分析需要 diet-tracker 的饮食记录支持
- 运动消耗数据通过 exercise_records 表记录
- BMI/BMR/TDEE 计算需要成员有身高、体重、性别和出生日期信息
- 身体围度数据存储在 health_metrics 表中,与其他健康指标共用
- 预测功能基于近期体重变化趋势,仅供参考
- 体重真相卡聚焦体重波动,只陈述记录事实和稳健趋势
- 所有健康卡片都只陈述记录事实和统计趋势;相关线索不代表因果,不得据此自动生成饮食、热量或运动处方
- PNG 导出需要 Chrome/Chromium;未安装时仍会返回可直接打开的本地 HTML
- 附件管理:身材照片、运动截图等文件的上传和管理通过
mediwise-health-tracker的附件功能完成(attachment.py),本 skill 不直接处理文件存储。使用add-attachment动作并指定 category 为body_photo或exercise_photo
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
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.

