WHOOP Central - OAuth + scripts to fetch WHOOP data (sleep, recovery, strain, workouts). Use when user asks about their sleep, recovery score, HRV, strain, or workout data.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install whoop-central或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install whoop-central⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/whoop-central/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: whoop description: WHOOP Central - OAuth + scripts to fetch WHOOP data (sleep, recovery, strain, workouts). Use when user asks about their sleep, recovery score, HRV, strain, or workout data. version: 1.0.2 metadata: clawdbot: emoji: "🏋️" requires: bins: ["node", "openssl"] ---
Access sleep, recovery, strain, and workout data from WHOOP via the v2 API.
# 1) One-time setup (writes ~/.clawdbot/whoop/credentials.json)
node src/setup.js
# 2) Recommended: Get tokens via Postman (see Auth section), then verify
node src/verify.js
node src/verify.js --refresh
# Prompt-friendly snapshot (includes last workout)
node src/today.js
# Daily summary (all metrics)
node src/summary.js
# Individual metrics
node src/recovery.js
node src/sleep.js
node src/strain.js
node src/workouts.js
# Bulk import to ~/clawd/health/logs/whoop/*
node src/import-historical.js
| Metric | Data Points | |--------|-------------| | Recovery | Score (0-100%), HRV, resting HR, SpO2, skin temp | | Sleep | Duration, stages (REM/deep/light), efficiency, performance | | Strain | Daily strain (0-21), calories, avg/max HR | | Workouts | Activity type, duration, strain, calories, HR |
openssl (only needed for the optional auth.js flow when using https://localhost; Postman auth does not need it) - Postman browser callback (recommended auth path): ``` https://oauth.pstmn.io/v1/browser-callback ``` - Optional local callback (only used by auth.js): ``` https://localhost:3000/callback ``` You can keep both registered at the same time.
Team note: this skill does not ship any client credentials. Each user can create their own WHOOP app, or (if you trust each other) a team can share one app's client_id/client_secret and let multiple WHOOP accounts authorize it.
Run:
node src/setup.js
This writes ~/.clawdbot/whoop/credentials.json (and optionally token.json if you paste tokens).
Postman is the most reliable bootstrap for many accounts because WHOOP may block browser-like traffic to the OAuth endpoints (or behave differently depending on headers).
Postman checklist (don’t skip these):
- https://oauth.pstmn.io/v1/browser-callback
- Scopes include offline (or you won’t get a refresh_token) - Client Authentication is Send client credentials in body (client_secret_post)
1) In WHOOP dashboard, ensure you registered the Postman callback Redirect URI:
https://oauth.pstmn.io/v1/browser-callback
2) In Postman:
- ClientId = your WHOOP client id - ClientSecret = your WHOOP client secret
- Type: OAuth 2.0 - Add auth data to: Request Headers - Grant Type: Authorization Code - Callback URL: check Authorize using browser - Auth URL: ``` https://api.prod.whoop.com/oauth/oauth2/auth ``` - Access Token URL: ``` https://api.prod.whoop.com/oauth/oauth2/token ``` - Client ID: {{ClientId}} - Client Secret: {{ClientSecret}} - Scope (space-delimited): include offline plus any read scopes you need, e.g.: ``` offline read:profile read:sleep read:recovery read:workout read:cycles read:body_measurement ``` - State: any 8+ chars (e.g. loomingState) - Client Authentication: Send client credentials in body
3) Click "Get New Access Token", sign in to WHOOP, and click "Grant".
4) In Postman’s "Manage Access Tokens" modal:
- access_token - refresh_token Postman often does not retain the refresh token for you later.
5) Save tokens to ~/.clawdbot/whoop/token.json:
token.example.json as a template - obtained_at to current time in milliseconds - redirect_uri to: ``` https://oauth.pstmn.io/v1/browser-callback ```
6) Verify (and test refresh):
node src/verify.js
node src/verify.js --refresh
auth.js (may fail on some accounts)If you prefer a fully local OAuth loop (and WHOOP allows it), you can use auth.js.
Pre-req: add this redirect URI in WHOOP dashboard:
https://localhost:3000/callback
Run:
WHOOP_REDIRECT_URI='https://localhost:3000/callback' node src/auth.js
If you need to do it from a phone/remote device:
WHOOP_REDIRECT_URI='https://localhost:3000/callback' node src/auth.js --manual
Note: for localhost HTTPS, the script generates a self-signed cert and your browser will show a TLS warning. You must proceed past the warning so the redirect can complete.
node src/verify.js
node src/summary.js
NotAuthorizedException before the login pageThis is a WHOOP-side block on browser User-Agents hitting api.prod.whoop.com OAuth endpoints.
node src/auth.js which bootstraps the login URL and sends your browser directly to id.whoop.com.node src/auth.js --manual and open the printed URL. ``` https://oauth.pstmn.io/v1/browser-callback ``` If you're using auth.js locally, also add: ``` https://localhost:3000/callback ```
Tokens auto-refresh on demand (no cron needed). If issues persist:
rm ~/.clawdbot/whoop/token.json
node src/auth.js
This usually means your access token is stale/invalidated (common if you re-auth or refresh tokens elsewhere; WHOOP refresh tokens rotate).
node src/auth.js, oraccess_token + refresh_token from Postman into ~/.clawdbot/whoop/token.json and update obtained_at.Use manual mode:
node src/auth.js --manual
Open the URL on any device, authorize, then copy the code from the callback URL.
error=request_forbidden / "The request is not allowed"This is WHOOP rejecting the authorization request after login/consent. Common causes:
https:// or whoop:// redirect URIs)If you suspect redirect URI policy, use an HTTPS tunnel:
# 1) Get a public HTTPS URL that forwards to localhost:3000 (example)
ngrok http 3000
# 2) Add the ngrok HTTPS URL + /callback to WHOOP dashboard Redirect URIs, then run:
WHOOP_REDIRECT_URI=https://YOUR-NGROK-DOMAIN.ngrok-free.app/callback node src/auth.js
If you suspect scope restrictions, try a minimal scope set:
WHOOP_SCOPES="read:profile" node src/auth.js
https://localhost:3000/callbackThis changes how the local callback server must run: it must be HTTPS (not HTTP).
...
安装 WHOOP Central 后,可以对 AI 说这些话来触发它
Help me get started with WHOOP Central
Explains what WHOOP Central does, walks through the setup, and runs a quick demo based on your current project
Use WHOOP Central to wHOOP Central - OAuth + scripts to fetch WHOOP data (sleep, recover...
Invokes WHOOP Central with the right parameters and returns the result directly in the conversation
What can I do with WHOOP Central in my data & analytics workflow?
Lists the top use cases for WHOOP Central, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/whoop-central/ 目录(个人级,所有项目可用),或 .claude/skills/whoop-central/(项目级)。重启 AI 客户端后,用 /whoop-central 主动调用,或让 AI 根据上下文自动发现并使用。
WHOOP Central 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
WHOOP Central 可免费安装使用。请查阅仓库了解许可证信息。
WHOOP Central - OAuth + scripts to fetch WHOOP data (sleep, recovery, strain, workouts). Use when user asks about their sleep, recovery score, HRV, strain, or workout data.
WHOOP Central 属于「Data & Analytics」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my data & analytics tasks using WHOOP Central
Identifies repetitive steps in your workflow and sets up WHOOP Central to handle them automatically