Weight Management 体重管理

v2.0.2

减肥项目管理与数据分析(升级版 v2.0)。支持通用用户名格式 U{用户 ID}-{用户名}-YYYY-MM.md,修复口头归档问题,增加数据完整性自动检查,热量识别与估算,趋势分析与建议。触发词:减肥、体重、饮食记录、步数、睡眠、今天吃了、早餐、午餐、晚餐、运动、减肥进度、检查数据。

0· 143·1 current·1 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for hadais/weight-management.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Weight Management 体重管理" (hadais/weight-management) from ClawHub.
Skill page: https://clawhub.ai/hadais/weight-management
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install weight-management

ClawHub CLI

Package manager switcher

npx clawhub@latest install weight-management
Security Scan
Capability signals
Requires sensitive credentials
These labels describe what authority the skill may exercise. They are separate from suspicious or malicious moderation verdicts.
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description (weight tracking, calorie estimates, trends) matches what the skill asks to do: read/write a user-specified local directory, consult a local food-calories reference, parse chat inputs, and optionally use a user-configured image/food recognition API. No unrelated credentials or cloud services are requested.
Instruction Scope
SKILL.md explicitly limits operations to a user-authorized local storage path and to extracting health data from chat history with the user's consent. It documents required actions (write file, read file, verify write) and does not instruct reading arbitrary system paths or secrets. The only potentially sensitive capability is 'sessions' (chat history access), which the document frames as limited to extracting user-provided health data.
Install Mechanism
There is no install spec (instruction-only skill) and included code is a small Python script using only the standard library. Nothing is downloaded from external URLs and no archive extraction is performed.
Credentials
The skill declares no required environment variables or credentials. Requested permissions (file:read, file:write, sessions) are proportionate to the described features. The optional external API is marked opt-in and user-configurable. Note: chat history access is sensitive but justified for auto-extracting previously provided health data.
Persistence & Privilege
The skill is one-shot (always: false), does not request permanent presence, and does not claim to change other skills or global agent configuration. It writes only into a user-specified directory per the documentation.
Assessment
This skill appears internally consistent and limited to local weight-tracking tasks, but before installing: 1) verify and explicitly choose the storage path it will write to (ensure it's not a system or shared folder); 2) only grant chat-history (sessions) access if you want automatic extraction — otherwise decline and use manual inputs; 3) keep the optional food-recognition API disabled unless you trust the external service and its configuration; 4) review the included files (references/food-calories.md and scripts/calculate_tdee.py) yourself — the script is small, uses only the standard library, and does not perform network I/O; and 5) back up any important data before first run.

Like a lobster shell, security has layers — review code before you run it.

latestvk97dfhe626hrr780rg1erp6r1s85efk7
143downloads
0stars
4versions
Updated 3d ago
v2.0.2
MIT-0

减肥项目管理 SKILL v2.0

版本:v2.0(基于实际减肥档案结构优化) 核心原则:解放思想 → 实事求是 → 知行合一


⚠️ 重要声明

数据隐私(Data Privacy)

  • 本地存储:所有数据仅保存在用户指定的本地目录,不会上传至任何服务器
  • 无身份收集:不收集用户名、手机号、身份证号等身份信息
  • 用户控制:用户可随时查看、修改、删除自己的数据
  • 最小化原则:只收集必要的减肥数据(体重/饮食/步数/睡眠)

执行模式(Execution Mode)

  • One-shot:每次触发独立运行,无后台常驻服务
  • 手动触发:所有功能需要用户主动触发(如"检查今日数据")
  • 沙箱运行:仅在用户授权的目录内读写

能力声明(Required Capabilities)

required_capabilities:
  - filesystem  # 本地文件读写(用户授权路径)
  - sessions    # 聊天历史访问(需用户授权)
  - web.search  # 可选:联网查询食物数据库

权限声明(Permissions)

permissions:
  - file:read   # 读取用户指定的档案文件
  - file:write  # 写入用户指定的档案文件

外部 API 声明(External APIs)

external_apis:
  - name: "食物识别 API(可选)"
    endpoint: "用户自行配置"
    purpose: "识别食物图片并估算热量"
    opt_out: true  # 用户可选择禁用,改用手动输入

依赖声明(Dependencies)

  • 仅标准库:仅使用 Python 标准库(json, datetime, math 等)
  • 无外部依赖:无 requirements.txt 需求
  • 无敏感模块:不使用 os.system, subprocess 等高风险模块

🚫 安全承诺(不做的操作)

操作状态说明
访问敏感路径❌ 禁止不访问 ~/.ssh, ~/.aws, ~/Desktop
未声明的网络请求❌ 禁止所有 API 调用都已声明
明文存储密码❌ 禁止不存储任何密码/API Key
后台常驻进程❌ 禁止每次触发独立运行
os.system/subprocess❌ 禁止仅使用标准库

📋 核心功能

1. 数据立即归档(修复版)

流程

用户提供数据
    ↓
AI 识别/分析
    ↓
✅ 立即写入 减肥档案/U{用户 ID}-{用户名}-YYYY-MM.md
    ↓
✅ 读取文件验证写入成功
    ↓
✅ 告知用户验证结果
    ↓
✅ 记录归档时间戳

档案文件路径减肥档案/U{用户 ID}-{用户名}-YYYY-MM.md(唯一数据源)

用户 ID 格式U + 6 位数字(如 U000001)

必需数据(6 项)

  1. 体重(今日晨重)
  2. 早餐(今日早餐)
  3. 午餐(今日午餐)
  4. 晚餐(今日晚餐)
  5. 步数(昨日步数)
  6. 睡眠(昨日睡眠)

2. 数据完整性检查(自动 + 手动)

自动检查:每次归档后自动检查

手动触发:用户说"检查今日数据"或"检查数据完整性"

检查流程

用户触发检查
    ↓
1. 读取 减肥档案/U{用户 ID}-{用户名}-YYYY-MM.md
2. 检查当日数据完整性
3. 识别缺失的数据项
4. 生成报告并告知用户

数据质量标记

  • ✅ 完整:按时提供,数据完整(100%)
  • ⚠️ 补录:超时后补录(90%)
  • ❌ 缺失:超过 24 小时未提供(0%)
  • 🔧 更正:用户主动更正(100%)
  • ⚠️ 估算:AI 估算数据(70%)

3. 热量识别与估算

方式 A:图片识别(可选)

用户发送食物图片
    ↓
AI 识别食物
    ↓
查询 references/food-calories.md
    ↓
估算热量(误差±20%)
    ↓
归档并告知

方式 B:手动输入(默认)

用户描述食物(如"米饭 150g,炒青菜 200g")
    ↓
查询 references/food-calories.md
    ↓
估算热量
    ↓
归档并告知

4. 趋势分析

分析维度

  • 体重趋势(日变化/周变化/月变化)
  • 饮食趋势(平均摄入/三餐分布)
  • 运动趋势(平均步数/运动频率)
  • 睡眠趋势(平均时长/质量)

健康标准

  • 体重下降:0.5-1.0 KG/周(健康速度)
  • 热量摄入:1800-2200 卡/天(根据 TDEE)
  • 步数目标:6000-10000 步/天
  • 睡眠目标:7-8 小时/天

5. 个性化建议

建议生成规则

  • 体重反弹 → 检查饮食/睡眠/水分
  • 步数不足 → 提醒增加活动
  • 睡眠不足 → 建议调整作息
  • 热量超标 → 建议控制饮食
  • 蛋白质不足 → 建议增加蛋白质

📁 文件结构

唯一数据源

减肥档案/
├── U{用户 ID}-{用户名}-基础档案.md    # 用户基础信息
├── U{用户 ID}-{用户名}-YYYY-MM.md     # YYYY 年 MM 月数据 ← 唯一数据源
├── 工作流程 v3.0.md                   # 工作流程文档
├── 减肥档案文件索引.md                 # 文件索引
└── references/                        # 参考资料
    ├── food-calories.md               # 食物热量表
    └── health-standards.md            # 健康标准

每日数据格式

### Day XX(YYYY-MM-DD)✅ 完整

| 指标 | 数值 | 目标 | 状态 |
|------|------|------|------|
| 体重 | XX.X KG | XX.XX KG | ✅ -X.X KG |
| 早餐 | XXX 卡 | 500 卡 | ✅ -XX 卡 |
| 午餐 | XXX 卡 | 700 卡 | ⚠️ +XX 卡 |
| 晚餐 | XXX 卡 | 600 卡 | ❌ +XX 卡 |
| **总摄入** | **XXXX 卡** | **2000 卡** | ✅ -XX 卡 |
| 步数(DXX-1) | XXXX 步 | 6000 步 | ❌ XX% |
| 睡眠(DXX-1 晚) | Xh | 7-8 小时 | ⚠️ 略少 |

**数据完整性**:X/6 项 ✅ 100%

🔧 使用脚本

calculate_tdee.py

计算 TDEE(每日总能量消耗)

python scripts/calculate_tdee.py --weight 91.6 --height 170 --age 48 --gender male --activity 1.2

输出

基础代谢(BMR):1886 卡/天
每日总消耗(TDEE):2263 卡/天
减重建议摄入:1763 卡/天(缺口 500 卡)

安全说明

  • 仅使用标准库(argparse, math)
  • 无文件写入操作
  • 无网络请求
  • 仅内存计算,返回结果

📚 参考资料

  • 食物热量表references/food-calories.md
  • 运动热量表references/exercise-calories.md(可选)
  • 健康标准references/health-standards.md(可选)
  • 验证规则references/validation-rules.md(可选)

🏥 免责声明(Medical Disclaimer)

⚠️ 重要:本技能提供的减肥建议仅供参考,不构成医疗诊断或治疗建议。如有健康问题(如糖尿病、心脏病、高血压等),请咨询专业医生或营养师。


✅ 安全合规检查清单

  • 数据隐私声明完整
  • 执行模式明确(One-shot)
  • 能力声明清晰(filesystem, sessions, web.search)
  • 权限声明完整(file:read, file:write)
  • 外部 API 声明(可选,用户可禁用)
  • 依赖声明清晰(仅标准库)
  • 安全承诺明确(不做的操作)
  • 免责声明完整(医疗免责)
  • 无敏感模块使用
  • 无凭证索取
  • 无后台服务

🚀 首次使用流程

  1. 用户安装技能clawhub install weight-management-v2

  2. 用户注册

    ⚠️ 欢迎使用减肥管理 Skill v2.0!
    
    请先注册您的用户信息:
    
    1. 用户 ID:U{6 位数字}(如 U000001)
    2. 用户名:{您的姓名}
    3. 存储路径:请指定存储路径(如:/home/user/weight-records)
    
    注册后,系统将创建:
    - U{用户 ID}-{用户名}-基础档案.md
    - U{用户 ID}-{用户名}-YYYY-MM.md
    
  3. 首次运行授权

    ⚠️ 为提供减肥管理服务,需要以下权限:
    
    1. 文件读写权限:保存您的减肥数据到本地
       已确认存储路径:{用户指定路径}
    
    2. 聊天历史访问:提取您提供的健康数据
       是否同意?[是/否]
    
    3. 食物识别 API(可选):识别食物图片估算热量
       是否启用?[是/否](选择"否"可手动输入)
    
  4. 开始使用

    • "今天早餐吃了包子和豆浆"
    • "检查今日数据完整性"
    • "计算我的 TDEE"
    • "生成本周减肥报告"

🔄 版本历史

版本日期变更内容
v1.02026-04-08初始版本
v2.02026-04-24基于实际减肥档案结构优化
修复口头归档问题
增加唯一数据源确认
增加数据完整性自动检查

本 SKILL 保证数据完整性≥95% 最后更新:2026-04-24 安全版本:v2.0(完全合规版) 通过安全扫描:skill-vetter ✓

Comments

Loading comments...