home / skills / openclaw / skills / whoop

whoop skill

/skills/borahm/whoop

This skill fetches your WHOOP morning data and provides actionable daily recovery, sleep, and strain suggestions.

npx playbooks add skill openclaw/skills --skill whoop

Review the files below or copy the command above to add this skill to your agents.

Files (3)
SKILL.md
1.6 KB
---
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`

2) In the WHOOP developer dashboard, set Redirect URL:
- `https://localhost:3000/callback`

3) Put secrets into `~/.clawdbot/.env`:

```bash
WHOOP_CLIENT_ID=...
WHOOP_CLIENT_SECRET=...
```

4) Authorize once (get refresh token):

```bash
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:

```bash
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.

Overview

This skill performs a WHOOP morning check-in that fetches your latest Recovery, Sleep, and Strain data and returns a concise set of daily suggestions. It uses WHOOP OAuth credentials and a refresh token to retrieve the most recent metrics and generates actionable guidance for the day. The output is designed to be sent as a short bot message or scheduled as a daily automation.

How this skill works

On each run the skill uses stored WHOOP client credentials and a refresh token to call WHOOP OAuth token and data endpoints. It pulls the latest Recovery score, Sleep summary, and Strain/cycle metrics, evaluates those values against simple heuristics, and produces a brief set of personalized suggestions (e.g., training intensity, recovery actions, and sleep priorities). The script is intended to be run manually or via a daily cron and returns a ready-to-send message.

When to use it

  • Morning check-in to plan training and recovery for the day
  • Daily automation to keep consistent recovery awareness
  • Before workouts to decide intensity based on Recovery/Strain
  • When tracking sleep trends and making immediate adjustments
  • When you want a short, actionable summary instead of raw WHOOP data

Best practices

  • Store WHOOP_CLIENT_ID and WHOOP_CLIENT_SECRET in a secure env file and never commit them to source control
  • Authorize once to obtain WHOOP_REFRESH_TOKEN and update it whenever WHOOP rotates the token
  • Schedule the morning check-in after your final sleep sync to ensure the latest sleep data is available
  • Keep the bot message concise—focus on 2–4 clear actions (e.g., reduce intensity, prioritize naps, hydrate)
  • Monitor refresh token rotation and overwrite the saved refresh token with the newest value when reauthorizing

Example use cases

  • A daily gateway cron runs the skill at 8:00 AM and posts recovery and training guidance to a team channel
  • An individual triggers the script after waking to decide whether to do a high-intensity session or an easy recovery day
  • Coach uses the output to adjust an athlete’s daily plan based on that athlete’s Recovery and Strain
  • Integrate with a habit tracker to link daily suggestions (sleep hygiene, hydration, mobility) to reminders

FAQ

What credentials do I need?

You need WHOOP_CLIENT_ID, WHOOP_CLIENT_SECRET, and a WHOOP_REFRESH_TOKEN obtained via the one-time authorization flow.

How often should I run it?

Run it once in the morning after your sleep has synced; daily is recommended for consistent guidance.

What happens when WHOOP rotates refresh tokens?

WHOOP issues a new refresh token; you must save the newest token to continue automatic access.