oura-analytics
Oura Ring data integration and analytics. Fetch sleep scores, readiness, activity, HRV, and trends from the Oura Cloud API. Generate automated reports, correlations with productivity, and trigger-based alerts for low recovery days. Requires OURA_API_TOKEN (get at cloud.ouraring.com).
- License 许可
- MIT
- 最近更新
- 2026-08-23
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- oura-analytics
- metadata
- { "openclaw": { "homepage": "https://github.com/kesslerio/oura-analytics-openclaw-skill", "requires": { "env": [ "OURA_API_TOKEN" ], "bins": [ "python3" ] } } }
- description
- Oura Ring data integration and analytics. Fetch sleep scores, readiness, activity, HRV, and trends from the Oura Cloud API. Generate automated reports, correlations with productivity, and trigger-based alerts for low recovery days. Requires OURA_API_TOKEN (get at cloud.ouraring.com).
02 资源文件 34
- 参考文档_meta.json466 B
- 参考文档CHANGELOG.md315 B
- 其他pyproject.toml216 B
- 参考文档README.md11.4 KB
- 参考文档references/api.md1.7 KB
- 参考文档references/metrics.md1.6 KB
- 参考文档references/SCHEMA.md14.4 KB
- 参考文档references/schemas.md5.8 KB
- 参考文档references/TIMEZONE.md10.7 KB
- 参考文档requirements-dev.txt132 B
- 参考文档requirements.txt121 B
- 脚本scripts/alerts.py6.4 KB
- 脚本scripts/baseline.py13.4 KB
- 脚本scripts/briefing.py17.1 KB
- 脚本scripts/cache.py4.4 KB
- 脚本scripts/config.py10.6 KB
- 脚本scripts/daily_summary.py6.6 KB
- 脚本scripts/data_manager.py11.2 KB
- 脚本scripts/debug_oura.py1.9 KB
- 脚本scripts/drivers.py9.4 KB
- 脚本scripts/early_warning.py12.6 KB
- 脚本scripts/events.py11.8 KB
- 脚本scripts/oura_api.py25.6 KB
- 脚本scripts/oura_briefing.py8.9 KB
- 脚本scripts/oura_data.py4.3 KB
- 脚本scripts/schema.py10.7 KB
- 脚本scripts/timezone_utils.py6.6 KB
- 脚本scripts/weekly_report.py10.2 KB
- 参考文档SECURITY.md3.4 KB
- 参考文档tests/fixtures/README.md1.0 KB
- 脚本tests/test_alerts.py6.8 KB
- 脚本tests/test_analyzer.py5.7 KB
- 脚本tests/test_client.py4.6 KB
- 脚本tests/test_hybrid_briefing.py6.8 KB
03 SKILL.md 正文
Oura Analytics
Quick Start
# Set Oura API token
export OURA_API_TOKEN="your_personal_access_token"
# Fetch sleep data (last 7 days)
python {baseDir}/scripts/oura_api.py sleep --days 7
# Get readiness summary
python {baseDir}/scripts/oura_api.py readiness --days 7
# Generate weekly report
python {baseDir}/scripts/oura_api.py report --type weekly
When to Use
Use this skill when:
- Fetching Oura Ring metrics (sleep, readiness, activity, HRV)
- Analyzing recovery trends over time
- Correlating sleep quality with productivity/events
- Setting up automated alerts for low readiness
- Generating daily/weekly/monthly health reports
Core Workflows
1. Data Fetching
export PYTHONPATH="{baseDir}/scripts"
python - <<'PY'
from oura_api import OuraClient
client = OuraClient(token="YOUR_TOKEN")
sleep_data = client.get_sleep(start_date="2026-01-01", end_date="2026-01-16")
readiness_data = client.get_readiness(start_date="2026-01-01", end_date="2026-01-16")
print(len(sleep_data), len(readiness_data))
PY
2. Trend Analysis
export PYTHONPATH="{baseDir}/scripts"
python - <<'PY'
from oura_api import OuraClient, OuraAnalyzer
client = OuraClient(token="YOUR_TOKEN")
sleep_data = client.get_sleep(start_date="2026-01-01", end_date="2026-01-16")
readiness_data = client.get_readiness(start_date="2026-01-01", end_date="2026-01-16")
analyzer = OuraAnalyzer(sleep_data, readiness_data)
avg_sleep = analyzer.average_metric(sleep_data, "score")
avg_readiness = analyzer.average_metric(readiness_data, "score")
trend = analyzer.trend(sleep_data, "average_hrv")
print(avg_sleep, avg_readiness, trend)
PY
3. Alerts
python {baseDir}/scripts/alerts.py --days 7 --readiness 60 --efficiency 80
Environment
Required:
OURA_API_TOKEN
Optional (used for alerts/reports/timezone/output):
KESSLER_TELEGRAM_BOT_TOKEN(fallback toTELEGRAM_BOT_TOKEN)TELEGRAM_CHAT_IDUSER_TIMEZONEOURA_OUTPUT_DIR
Scripts
scripts/oura_api.py- Oura Cloud API wrapper with OuraAnalyzer and OuraReporter classesscripts/alerts.py- Threshold-based notifications (CLI:python {baseDir}/scripts/alerts.py --days 7 --readiness 60)scripts/weekly_report.py- Weekly report generator
References
references/api.md- Oura Cloud API documentationreferences/metrics.md- Metric definitions and interpretations
Automation (Cron Jobs)
Cron jobs are configured in OpenClaw's gateway, not in this repo. Add these to your OpenClaw setup:
Daily Morning Briefing (8:00 AM)
openclaw cron add \
--name "Daily Oura Health Report (Hybrid)" \
--cron "0 8 * * *" \
--tz "America/Los_Angeles" \
--session isolated \
--wake next-heartbeat \
--deliver \
--channel telegram \
--target "<YOUR_TELEGRAM_CHAT_ID>" \
--message "Run the daily Oura health report with hybrid format: Execute bash /path/to/your/scripts/daily-oura-report-hybrid.sh"
Weekly Sleep Report (Sunday 8:00 AM)
openclaw cron add \
--name "Weekly Oura Sleep Report" \
--cron "0 8 * * 0" \
--tz "America/Los_Angeles" \
--session isolated \
--wake next-heartbeat \
--deliver \
--channel telegram \
--target "<YOUR_TELEGRAM_CHAT_ID>" \
--message "Run weekly Oura sleep report: bash /path/to/your/oura-weekly-sleep-alert.sh"
Daily Obsidian Note (8:15 AM)
openclaw cron add \
--name "Daily Obsidian Note" \
--cron "15 8 * * *" \
--tz "America/Los_Angeles" \
--session isolated \
--wake next-heartbeat \
--message "Create daily Obsidian note with Oura data. Run: source /path/to/venv/bin/activate && python /path/to/daily-note.py"
Note: Replace /path/to/your/ with your actual paths and <YOUR_TELEGRAM_CHAT_ID> with your Telegram channel/group ID.
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.