360 Secure SkillHub
360 安全技能中心

WHOOP

通过一次性 OAuth 授权访问 WHOOP API,运行 whoop-morning 脚本抓取最新 Recovery、Sleep 与 Cycle/Strain 数据,生成当日简短建议,可用 Gateway cron 每日定时推送。

Borahm
Borahm
热度 71.86
最近更新 2026-05-11 15:50:48
分类:生活依赖:代码执行 / 第三方 API / 读写文件应用场景:健康 / 推荐

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add whoop
Metadata
name
whoop
description
WHOOP morning check-in (recovery/sleep/strain) with suggestions.
metadata
{"clawdbot":{"config":{"requiredEnv":["WHOOP_CLIENT_ID","WHOOP_CLIENT_SECRET","WHOOP_REFRESH_TOKEN"]}}}

whoop

WHOOP morning check-in:

  • fetches your latest WHOOP data (Recovery, Sleep, Cycle/Strain)
  • generates a short set of suggestions for the day

Quick Start (User + Bot)

What the user does (one-time)

  1. Create a WHOOP app and get credentials:
  • WHOOP_CLIENT_ID
  • WHOOP_CLIENT_SECRET
  1. In the WHOOP developer dashboard, set Redirect URL:
  • https://localhost:3000/callback
  1. Put secrets into ~/.clawdbot/.env:
WHOOP_CLIENT_ID=...
WHOOP_CLIENT_SECRET=...
  1. Authorize once (get refresh token):
node /home/claw/clawd/skills/whoop/bin/whoop-auth --redirect-uri https://localhost:3000/callback
  • Open the printed URL on your phone/browser
  • Tap Allow/Authorize
  • Copy the code from the callback URL and paste it back

This writes WHOOP_REFRESH_TOKEN=... into ~/.clawdbot/.env.

What the bot does (each run)

Run:

node /home/claw/clawd/skills/whoop/bin/whoop-morning

Then send the output back to the user.

Automation (daily)

Recommended: schedule with Gateway cron (daily morning).

  • Command: node /home/claw/clawd/skills/whoop/bin/whoop-morning
  • Bot should send the output as a message.

Notes

  • OAuth endpoints:
    • auth: https://api.prod.whoop.com/oauth/oauth2/auth
    • token: https://api.prod.whoop.com/oauth/oauth2/token
  • Requires offline scope to receive refresh tokens.
  • WHOOP rotates refresh tokens; the newest refresh token must be saved.