OpenClaw Health Brief
Daily health metrics from Oura, WHOOP, and Withings → normalized JSON + Markdown brief.
Setup (3 steps)
Step 1: Configure secrets
Option A: 1Password (recommended)
CODEBLOCK0
Create items in your vault with these titles and fields:
- -
OpenClaw Whoop → client_id, client_secret, token, INLINECODE4 - INLINECODE5 →
client_id, client_secret, token, INLINECODE9 - INLINECODE10 →
client_id, client_secret, access_token, refresh_token, INLINECODE15
See ./docs/1PASSWORD_CONVENTIONS.md for full field details.
Option B: Environment variables
CODEBLOCK1
Step 2: Authorize providers
CODEBLOCK2
This opens your browser for each provider. Click authorize, and tokens are saved to both 1Password and ~/.openclaw/secrets/health_tokens.json automatically.
You can also re-auth individually: INLINECODE18
Step 3: Run your first brief
CODEBLOCK3
That's it. Token rotation is handled automatically — refreshed tokens persist to the local file so you don't need to re-auth again.
Add to OpenClaw cron
Wire it into your morning routine with an OpenClaw cron job:
CODEBLOCK4
The cron job runs as an isolated agent session — it executes the brief, reads the output, and delivers a formatted summary to your preferred channel.
Smoke test (no creds needed)
CODEBLOCK5
Runs in sample mode, validates JSON schema. Good for checking the skill is installed correctly.
Troubleshooting
Check individual providers
CODEBLOCK6
Common errors
- -
has_token: false → credentials not found. Check 1Password item names or env vars. - INLINECODE20 → refresh token expired. Run INLINECODE21
- INLINECODE22 → clientid/clientsecret not set.
Validate output JSON
CODEBLOCK7
References
- -
./docs/1PASSWORD_CONVENTIONS.md — field naming for 1Password items - INLINECODE24 ,
./docs/WHOOP.md, ./docs/WITHINGS.md — provider API notes - INLINECODE27 — morning brief intent and format
OpenClaw 健康简报
来自 Oura、WHOOP 和 Withings 的每日健康指标 → 标准化 JSON + Markdown 简报。
设置(3 步)
第 1 步:配置密钥
选项 A:1Password(推荐)
bash
export OPSERVICEACCOUNT_TOKEN=your-token
export OPENCLAW1PVAULT=Assistant # 或你的保险库名称
在你的保险库中创建包含以下标题和字段的项目:
- - OpenClaw Whoop → clientid、clientsecret、token、refreshtoken
- OpenClaw Oura → clientid、clientsecret、token、refreshtoken
- OpenClaw Withings → clientid、clientsecret、accesstoken、refreshtoken、user_id
完整字段详情请参阅 ./docs/1PASSWORD_CONVENTIONS.md。
选项 B:环境变量
bash
WHOOP
export WHOOP
ACCESSTOKEN=... WHOOP
REFRESHTOKEN=... WHOOP
CLIENTID=... WHOOP
CLIENTSECRET=...
Oura
export OURA
PERSONALACCESS
TOKEN=... # 或 OAuth:OURAREFRESH
TOKEN + OURACLIENT
ID + OURACLIENT_SECRET
Withings
export WITHINGS
CLIENTID=... WITHINGS
CLIENTSECRET=... WITHINGS
REFRESHTOKEN=... WITHINGS
USERID=...
第 2 步:授权提供商
bash
python3 ./bin/health-reauth all
这将为每个提供商打开你的浏览器。点击授权,令牌将自动保存到 1Password 和 ~/.openclaw/secrets/health_tokens.json。
你也可以单独重新授权:python3 ./bin/health-reauth whoop
第 3 步:运行你的第一个简报
bash
./bin/health-brief --date $(date +%F) --sources whoop,oura,withings --out ./out/dailyhealth$(date +%F).json
就这样。 令牌轮换会自动处理——刷新的令牌会持久保存到本地文件,因此你无需再次重新授权。
添加到 OpenClaw 定时任务
通过 OpenClaw 定时任务将其接入你的晨间流程:
bash
openclaw cron add \
--name morning-health-brief \
--schedule 0 8 * \
--tz America/New_York \
--session-target isolated \
--message 运行健康简报:
source ~/.openclaw/secrets/gateway.env
export OPENCLAW1PVAULT=YourVault
./bin/health-brief --date $(date +%F) --sources whoop,oura,withings --out /tmp/dailyhealth$(date +%F).json
读取 JSON 输出。仅报告非空指标,并附上绿色/黄色/红色评级。
该定时任务作为隔离的代理会话运行——它执行简报,读取输出,并将格式化摘要发送到你偏好的渠道。
冒烟测试(无需凭据)
bash
./bin/smoke
以示例模式运行,验证 JSON 模式。适用于检查技能是否正确安装。
故障排除
检查单个提供商
bash
./bin/whoop --date $(date +%F)
./bin/oura --date $(date +%F)
./bin/withings --date $(date +%F)
常见错误
- - hastoken: false → 未找到凭据。检查 1Password 项目名称或环境变量。
- refreshfailed → 刷新令牌已过期。运行 python3 ./bin/health-reauth
- missingcredentials → 未设置 clientid/client_secret。
验证输出 JSON
bash
./bin/validate-json --in ./out/daily
healthYYYY-MM-DD.json
参考资料
- - ./docs/1PASSWORDCONVENTIONS.md — 1Password 项目的字段命名
- ./docs/OURA.md、./docs/WHOOP.md、./docs/WITHINGS.md — 提供商 API 说明
- ./docs/MORNINGBRIEF.md — 晨间简报意图和格式