Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from bundle
Persistent local Oura OAuth connection, recent data pull, and markdown analysis workflow.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
SKILL.md
1---2name: oura-api-personal-analysis3description: Set up and reuse a persistent OAuth2 connection to the Oura API for a personal account, cache tokens locally, pull recent Oura data, and generate a local markdown analysis report. Use when the user has an Oura Ring or Oura account and wants a durable local connection instead of repeating manual browser setup.4allowed-tools: Bash Read5---67# Oura API Personal Analysis89Use this skill for personal Oura access and local analysis.10It is not for shipping a public multi-user integration.1112## What this skill saves1314- client credentials in `~/.local/share/oura-analyzer/.env`15- OAuth tokens in `~/.local/share/oura-analyzer/secrets/oura_tokens.json`16- pulled data in `~/.local/share/oura-analyzer/data/raw/`17- generated reports in `~/.local/share/oura-analyzer/reports/`1819Check the exact paths any time with:2021```bash22python3 scripts/oura_analyzer.py paths23```2425## One-time setup26271. Create an Oura developer app at `https://developer.ouraring.com/applications`.282. For a personal local tool, use these values:2930```text31Website: http://localhost:876532Privacy Policy: http://localhost:8765/privacy33Terms of Service: http://localhost:8765/terms34Redirect URI: http://localhost:8765/callback35```36373. Copy `assets/env.example` to `~/.local/share/oura-analyzer/.env` and fill in `OURA_CLIENT_ID` and `OURA_CLIENT_SECRET`.3839```bash40mkdir -p ~/.local/share/oura-analyzer41cp assets/env.example ~/.local/share/oura-analyzer/.env42```4344Important:4546- Use `localhost`, not `127.0.0.1`, for the callback and placeholder URLs. Oura accepts plain `http` for `localhost` but may reject `127.0.0.1`.47- Keep the secret only in the local `.env` file. Do not print it in chat or commit it.4849## Authorize once5051Run:5253```bash54python3 scripts/oura_analyzer.py authorize --no-browser55```5657Then open the returned URL in a browser where the user is signed in to Oura.5859If Oura asks for an emailed one-time code, complete that check and continue to the consent screen.60After consent, the tool saves the tokens locally.6162## Pull and analyze6364Pull recent data:6566```bash67python3 scripts/oura_analyzer.py pull --days 3068```6970Generate a report:7172```bash73python3 scripts/oura_analyzer.py analyze --input ~/.local/share/oura-analyzer/data/raw/latest_api_pull.json74```7576## Reuse the saved connection7778After the first authorization, the normal workflow is just:7980```bash81python3 scripts/oura_analyzer.py pull --days 782python3 scripts/oura_analyzer.py analyze --input ~/.local/share/oura-analyzer/data/raw/latest_api_pull.json83```8485The script refreshes the access token automatically when the refresh token is still valid.8687## Export fallback8889If the API is unavailable or the user prefers a one-off export:9091```bash92python3 scripts/oura_analyzer.py import-export --path /absolute/path/to/export/folder93python3 scripts/oura_analyzer.py analyze --input ~/.local/share/oura-analyzer/data/imported/latest_export.json94```9596## What the analyzer covers9798- sleep duration and sleep score99- readiness score100- activity score, steps, and calories101- recent 7-day versus previous 28-day comparison102- weekday versus weekend sleep behavior103- simple sleep/readiness and steps/readiness correlations104- flagged low-recovery days105106## Boundaries107108- Do not treat API history length as guaranteed. Some accounts only expose a short recent window.109- Do not publish or share the user's client secret, access token, refresh token, or exported data.110- Do not mutate the installed skill bundle with user secrets; keep all state in `~/.local/share/oura-analyzer/`.111