oura-ring
Fetch Oura Ring readiness/sleep + 7-day readiness trends via Oura Cloud API V2, and generate a Morning Readiness Brief.
- License 许可
- MIT
- 最近更新
- 2026-08-23
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- oura-ring
- description
- Fetch Oura Ring readiness/sleep + 7-day readiness trends via Oura Cloud API V2, and generate a Morning Readiness Brief.
02 资源文件 6
- 参考文档_meta.json281 B
- 脚本cli.py14.8 KB
- 脚本probe_v2_sessions.py996 B
- 脚本probe_v2.py908 B
- 参考文档requirements.txt38 B
- 脚本scripts/morning_brief.sh3.4 KB
03 SKILL.md 正文
Oura Ring (V1)
This skill provides a small, public-facing reference implementation for pulling Readiness, Sleep, and 7-day Readiness trends from the Oura V2 API (/v2/usercollection/*).
Quick Reference
-
CLI (raw data):
python3 skills/oura-ring/cli.py --format json --pretty readinesspython3 skills/oura-ring/cli.py --format json --pretty sleeppython3 skills/oura-ring/cli.py --format json --pretty trendspython3 skills/oura-ring/cli.py --format json --pretty resiliencepython3 skills/oura-ring/cli.py --format json --pretty stress
-
Morning brief (formatted):
./skills/oura-ring/scripts/morning_brief.sh
Features
- Morning Readiness Brief: Tactical recommendation based on latest scores.
- Trend Analysis: Insights on score changes over the last 7 days.
- Resilience Tracking: Real-time capacity mapping for stress management.
Setup
1) Install dependencies (recommended: venv)
macOS/Homebrew Python often blocks system-wide pip install (PEP 668), so use a virtualenv:
python3 -m venv skills/oura-ring/.venv
source skills/oura-ring/.venv/bin/activate
python -m pip install -r skills/oura-ring/requirements.txt
2) Create your .env
Create skills/oura-ring/.env:
cp skills/oura-ring/.env.example skills/oura-ring/.env
# then edit skills/oura-ring/.env
The CLI reads:
OURA_TOKEN(required)OURA_BASE_URL(optional; defaults tohttps://api.ouraring.com/v2/usercollection)
Getting an Oura token (OAuth2)
Oura V2 uses OAuth2 bearer tokens.
- Create an Oura API application:
- Set a Redirect URI (for local testing, something like
http://localhost:8080/callback). - Open the authorization URL (replace
CLIENT_ID,REDIRECT_URI, andscope):
https://cloud.ouraring.com/oauth/authorize?response_type=code&client_id=CLIENT_ID&redirect_uri=REDIRECT_URI&scope=readiness%20sleep
- After approving, you’ll be redirected to your Redirect URI with a
code=...query parameter. - Exchange the code for an access token:
curl -X POST https://api.ouraring.com/oauth/token \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d grant_type=authorization_code \
-d client_id=CLIENT_ID \
-d client_secret=CLIENT_SECRET \
-d redirect_uri=REDIRECT_URI \
-d code=AUTH_CODE
- Put the returned
access_tokenintoskills/oura-ring/.envasOURA_TOKEN=....
Notes:
- Access tokens can expire; you may need to refresh using the
refresh_token. - Do not commit your
.envfile.
Usage
Readiness
python3 skills/oura-ring/cli.py --env-file skills/oura-ring/.env --format json --pretty readiness
Sleep
python3 skills/oura-ring/cli.py --env-file skills/oura-ring/.env --format json --pretty sleep
Trends (last 7 days; paginated)
python3 skills/oura-ring/cli.py --env-file skills/oura-ring/.env --format json --pretty trends
Wrapper: Morning Readiness Brief
./skills/oura-ring/scripts/morning_brief.sh
Override the env file location:
OURA_ENV_FILE=/path/to/.env ./skills/oura-ring/scripts/morning_brief.sh
Run in mock mode (no token):
OURA_MOCK=1 ./skills/oura-ring/scripts/morning_brief.sh
Verification (no token required)
python3 skills/oura-ring/cli.py --mock readiness --format json
python3 skills/oura-ring/cli.py --mock sleep --format json
python3 skills/oura-ring/cli.py --mock trends --format json
04 同仓库更多 Skills
crowd-prompting
A marketplace where AI agents improve prompts, system instructions, tool descriptions, and other text-based content with domain expertise from real-world operations — and earn tokens for valuable contributions.
dilemm-ai
Compete in DilemmAI, the prisoner's dilemma AI arena at dilemm.ai. Use when an OpenClaw agent wants to create an account, design and submit strategy prompts for their bot, enter matchmaking, analyze historical matches and leaderboards, and iterate on bot strategy. Requires headless browser automation (no API available yet).
arxiv-paper-reviews
Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, or submitting paper reviews via API at http://150.158.152.82:8000.
arxiv-paper-reviews
Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, or submitting paper reviews via API at http://150.158.152.82:8000.
git-summary
Get a quick summary of the current Git repository including status, recent commits, branches, and contributors.
agent-constitution
Interact with AgentConstitution governance contracts on Base Sepolia. Check compliance, read rules, log actions, query governance state.