Install
openclaw skills install whoop-guruWHOOP AI Fitness Coach - WHOOP手环数据获取、健康分析、恢复预测、AI教练、个性化训练计划
openclaw skills install whoop-guruWHOOP Guru 是完整的WHOOP健康管理系统,整合数据获取、分析、图表可视化、AI教练和个性化训练计划。
核心功能:
# 进入 skill 目录(根据实际安装路径调整)
cd /path/to/whoop-guru
# 获取综合报告
python3 scripts/whoop_data.py summary --days 7
# 睡眠数据
python3 scripts/whoop_data.py sleep --days 7
# 恢复评分
python3 scripts/whoop_data.py recovery --days 30
# 训练/cycle数据
python3 scripts/whoop_data.py cycles --days 7
# workouts
python3 scripts/whoop_data.py workouts --days 30
# 用户档案
python3 scripts/whoop_data.py profile
# 身体数据
python3 scripts/whoop_data.py body
# 首次登录
python3 scripts/whoop_auth.py login --client-id YOUR_ID --client-secret YOUR_SECRET
# 检查状态
python3 scripts/whoop_auth.py status
# 睡眠分析图表
python3 scripts/whoop_chart.py sleep --days 30
# 恢复评分图表
python3 scripts/whoop_chart.py recovery --days 30
# Strain趋势
python3 scripts/whoop_chart.py strain --days 90
# HRV趋势
python3 scripts/whoop_chart.py hrv --days 90
# 综合仪表盘
python3 scripts/whoop_chart.py dashboard --days 30
使用 references/health_analysis.md 进行科学分析:
# 开启教练对话
python3 whoop-guru.py coach
# 生成今日计划
python3 whoop-guru.py plan
# 生成16周计划
python3 whoop-guru.py 16week --goal 增肌
| 时间 | 内容 | 命令 |
|---|---|---|
| 08:00 | 健康早报 | daily-report.sh |
| 09:00 | 教练早安 | push-morning.py |
| 18:00 | 晚间追踪 | push-evening.py |
| 20:00 | 打卡提醒 | push-checkin.py |
| 22:00 | 详细日报 | detailed-report.sh |
| 类别 | 目标 | 周期 |
|---|---|---|
| 🏃 跑步 | 3公里新手 | 8周 |
| 🏃 跑步 | 5公里 | 10周 |
| 🏃 跑步 | 10公里 | 12周 |
| 🏃 跑步 | 半程马拉松 | 24周 |
| 🏃 跑步 | 全程马拉松 | 52周 |
| 🏃 跑步 | 超级马拉松 | 52周+ |
| 💪 力量 | 增肌 | 16周 |
| 💪 力量 | 减脂 | 12周 |
| 🏥 康复 | 伤痛恢复 | 按需 |
WHOOP 使用 OAuth 2.0 授权,配置步骤:
python3 scripts/whoop_auth.py login --client-id YOUR_ID --client-secret YOUR_SECRET~/.clawdbot/whoop-tokens.json替代方案:也可以手动创建 ~/.clawdbot/whoop-credentials.env 文件,包含:
WHOOP_CLIENT_ID=your_client_id
WHOOP_CLIENT_SECRET=your_client_secret
WHOOP_REFRESH_TOKEN=your_refresh_token
用于 AI 个性化分析。配置方式:
data/config/llm_config.json凭证存储在本地,不上传。数据流向:
data/profiles/ - 用户健身档案data/plans/ - AI训练计划data/logs/ - 打卡记录data/config/llm_config.json - LLM API密钥~/.clawdbot/whoop-tokens.json - WHOOP OAuth令牌whoop-guru/
├── SKILL.md
├── CLAWHUB.md
├── _meta.json
├── whoop-guru.py # 主入口
├── scripts/
│ ├── whoop_auth.py # OAuth认证
│ ├── whoop_data.py # 数据获取
│ ├── whoop_chart.py # 图表生成
│ ├── daily-report.sh # 08:00早报
│ ├── detailed-report.sh # 22:00日报
│ ├── coach-push.sh # 推送调度
│ ├── push-morning.py # 09:00早安
│ ├── push-evening.py # 18:00晚间
│ └── push-checkin.py # 20:00打卡
├── lib/
│ ├── llm.py # LLM集成
│ ├── data_cleaner.py # 数据清洗
│ ├── data_processor.py # 数据处理
│ ├── sync.py # 数据同步
│ ├── tracker.py # 打卡追踪(包含quick_checkin)
│ ├── goals.py # 目标管理
│ ├── goals_marathon.py # 马拉松目标
│ ├── dynamic_planner.py # 动态规划
│ ├── pusher.py # 推送生成(包含checkin_reminder重写)
│ ├── coach_interface.py # 教练接口
│ ├── coach/ # 教练核心模块
│ ├── needs_analyzer.py # 需求分析
│ ├── plan_generator.py # 计划生成
│ ├── health_score.py # 健康评分
│ ├── ml_predictor.py # ML预测
│ ├── comprehensive_analysis.py # 综合分析
│ ├── health_advisor.py # 健康建议
│ ├── enhanced_reports.py # 增强报告
│ ├── marathon_analyzer.py # 马拉松分析
│ ├── marathon_commands.py # 马拉松指令
│ ├── checkin_auto.py # 自动打卡检测(新增)
│ ├── feedback_learning.py # 反馈学习系统(增强)
│ ├── notifications.py # 通知系统
│ ├── user_profile.py # 用户档案
│ ├── tz.py # 统一时区工具(新增)
│ ├── ml/ # ML预测模块
│ ├── prompts/ # Prompt模板
│ └── reports/ # 报告生成
├── references/
│ ├── api.md # API文档
│ └── health_analysis.md # 健康分析指南
└── data/
├── config/ # LLM配置
├── profiles/ # 用户档案
├── plans/ # 生成的计划
├── processed/ # 处理后的数据
└── logs/ # 打卡记录
| 类型 | 要求 |
|---|---|
| 运行环境 | Python 3.8+ |
| 必需命令 | python3, curl |
| Python包 | requests, pandas, matplotlib |
安装方式:pip install requests pandas matplotlib
| 变量 | 说明 | 必需 | 默认值 |
|---|---|---|---|
| OPENCLAW_WORKSPACE | OpenClaw工作区目录 | 否 | 自动检测 |
| WHOOP_DATA_DIR | WHOOP数据存储目录 | 否 | 自动检测 |
| WHOOP_SKILL_DIR | Skill数据目录 | 否 | 自动检测 |
注意:WHOOP OAuth 凭证不是环境变量,而是 CLI 参数,详见上方配置说明。
推送由 OpenClaw 的 cron 系统触发(不是独立服务)。
用户需要在 OpenClaw 中配置 cron 规则:
# 示例 crontab 配置
0 8 * * * python3 /path/to/daily-report.sh
0 9 * * * python3 /path/to/push-morning.py
0 18 * * * python3 /path/to/push-evening.py
0 20 * * * python3 /path/to/push-checkin.py
0 22 * * * python3 /path/to/detailed-report.sh
quick_checkin() 快速打卡接口(无需 completed/feedback)