← ClaudeAtlas

whoop-copilotlisted

Read real WHOOP recovery/strain/sleep/workout data via the official WHOOP developer API (OAuth 2.0) and reason about it directly — training advice, recovery trends, sleep debt, whether today is a good day to push hard. Can also act on that reasoning by writing to macOS Calendar/Reminders (adjust today's training, block recovery time, log a note) via AppleScript. Triggered when the user asks about their WHOOP data, recovery score, strain, sleep, wants training/schedule advice grounded in it, or wants today's calendar/reminders adjusted based on it (e.g. "我今天recovery怎么样", "该不该练", "帮我看看这周睡眠趋势", "根据我的恢复情况调整今天安排").
YunhaoDou/whoop-copilot · ★ 1 · AI & Automation · score 77
Install: claude install-skill YunhaoDou/whoop-copilot
# whoop-copilot 把真实 WHOOP Recovery / Strain / Sleep / Workout 数据接进 Claude Code / Codex 这类 agent。走 WHOOP 官方 OAuth API,不是抓包,不是逆向。 ## 前置检查 ```bash pip install -r "${CLAUDE_SKILL_DIR}/requirements.txt" ``` ## 一次性授权(首次使用) 1. 在 [developer-dashboard.whoop.com](https://developer-dashboard.whoop.com) 用你的 WHOOP 账号登录,创建 Team → 创建 App 2. App 的 Redirect URI 填 `http://localhost:8721/callback`(必须和下面的环境变量完全一致) 3. Scopes 全部勾选:`read:recovery` `read:cycles` `read:sleep` `read:workout` `read:profile` `read:body_measurement` `offline`(**offline 必须勾**,不然拿不到 refresh_token,access_token 一小时后就得重新走一遍授权) 4. 复制 App 的 Client ID / Client Secret: ```bash export WHOOP_CLIENT_ID=xxxxx export WHOOP_CLIENT_SECRET=xxxxx python "${CLAUDE_SKILL_DIR}/scripts/oauth_setup.py" ``` 会自动开浏览器跳转 WHOOP 授权页,授权后 token 存到 `~/.whoop-copilot/tokens.json`(不进仓库,权限 600)。之后每次调用会用 refresh_token 自动续期,不用重新授权,除非你在 WHOOP 里手动撤销了这个 App 的访问权限。 ## 用法 ```bash export WHOOP_CLIENT_ID=xxxxx WHOOP_CLIENT_SECRET=xxxxx python "${CLAUDE_SKILL_DIR}/scripts/report.py" --days 7 ``` 输出最近 7 天的 recovery / strain / sleep / workout 真实数据(数字直接来自 API response,脚本不做任何解读)。拿到这份输出后,agent 自己基于真实数字给建议——不是脚本编好话术,是当场读数据推理。 ## 写入日历/提醒事项(Phase 2) `calendar_tool.py` 只负责执行,不做判断——先用 `report.py` 读真实数据,agent 自己推理该怎么调整,再调用这个工具落地: ```bash python "${CLAUDE_SKILL_DIR}/scripts/calendar_tool.py" list-calendars python "${CLAUDE_SKILL_DIR}/scripts/calendar_tool.py" list-reminder-lists python "${CLAUDE_SKILL_DIR}/scripts/calendar_tool.py" list-today-events --calendar 健身