A Claude Code skill for the WHOOP API v2. Also works standalone as a Python CLI/library — no Claude Code required.
- Full API coverage — All v2 endpoints: workouts, sleep, recovery, cycles, body measurements, user profile
- OAuth2 authentication — Authorization code flow with automatic token refresh and secure storage
- Auto-pagination — Transparently iterate through all pages of collection endpoints
- Rate limit handling — Automatic retry on 429 with backoff (100 req/min, 10K req/day)
- Webhooks v2 — Event handling with HMAC-SHA256 signature verification (Flask + Express examples)
- Domain knowledge — Strain (0-21), Recovery (0-100%), Sleep stages, HRV, heart rate zones
- CLI + Library — Use the bundled client from the command line or import it in your code
- Go to developer-dashboard.whoop.com
- Sign in with your WHOOP account
- Click Create App
- Select all scopes you need (tip: select all +
offlinefor refresh tokens) - Under Redirect URLs, add:
http://localhost:8080/callback - Click Create
- Copy your Client ID and Client Secret
# Start the auth flow
python3 whoop/scripts/whoop_auth.py auth \
--client-id YOUR_CLIENT_ID \
--client-secret YOUR_CLIENT_SECRET \
--redirect-uri http://localhost:8080/callbackThis prints a URL. Open it in your browser, log in, and click Authorize.
Your browser will redirect to a page that won't load (that's expected). Look at the URL bar — it will look like:
http://localhost:8080/callback?code=abc123xyz...&state=...
Copy the code value and run:
python3 whoop/scripts/whoop_auth.py exchange --code PASTE_CODE_HEREYou should see Tokens saved successfully.
python3 whoop/scripts/whoop_client.py profileThis should print your name and email. You're all set.
claude skill add /path/to/whoop-skill/whoopNow Claude automatically knows the WHOOP API whenever you mention it.
# Recent workouts
python3 whoop/scripts/whoop_client.py workouts --start 2024-01-01
# All sleep data (auto-paginates)
python3 whoop/scripts/whoop_client.py sleep --start 2024-01-01 --all
# Recovery scores
python3 whoop/scripts/whoop_client.py recovery --start 2024-01-01
# Body measurements
python3 whoop/scripts/whoop_client.py body
# Token status
python3 whoop_auth.py statusOr as a Python library:
from whoop_client import WhoopClient
client = WhoopClient.from_stored_tokens()
workouts = client.get_all_workouts(start="2024-01-01T00:00:00.000Z")whoop/
├── SKILL.md # Skill definition for Claude Code
├── scripts/
│ ├── whoop_auth.py # OAuth2 auth (login, token refresh)
│ └── whoop_client.py # API client (all endpoints, pagination, rate limits)
└── references/
├── api_reference.md # Full endpoint docs, schemas, 100+ sport types
└── webhooks.md # Webhook v2 setup with Flask + Express examples
- Python 3.8+
- A WHOOP membership
MIT