Fitbit Connector
by @joaodriessen
Fitbit data connector skill for OpenClaw. Exposes compact auth/fetch/store/quality tools; OpenClaw performs all coaching reasoning.
clawhub install fitbit-connectorπ About This Skill
name: fitbit-connector description: Fitbit data connector skill for OpenClaw. Exposes compact auth/fetch/store/quality tools; OpenClaw performs all coaching reasoning.
Fitbit Connector Skill (Tool Provider)
Use this skill when OpenClaw needs Fitbit or unified health data.
This is the canonical front door for health / Fitbit retrieval in OpenClaw. If a user asks for latest Fitbit numbers, recovery signals, readiness trends, sleep/HRV/resting-HR patterns, or recent health metrics for training interpretation, start here.
This skill is data-plane only:
OpenClaw handles interpretation, decisions, and coaching language.
Canonical usage rule
For ordinary question-answering, prefer this skill first. Do not start by searching the workspace for Fitbit paths if this skill is available. Do not prefer older opinionated helper scripts over this interface.
For training questions, combine this skill with memory/training-continuity.md:
memory/training-continuity.md = training state, progression rules, recent workout contextSetup
1. Create Fitbit developer app (type Personal).
2. Redirect URI: http://127.0.0.1:8787/callback.
3. Create .env from references/env.example.
4. Run auth bootstrap:
- python3 scripts/fitbit_auth.py auth-url
- approve in browser, copy code + returned state
- python3 scripts/fitbit_auth.py exchange --code --state
Primary front-door interface (recommended)
For most OpenClaw usage, call the narrow front door first:
node ../skills/health-training-frontdoor/scripts/request.js '{"action":"latest_recovery"}'This keeps retrieval typed and low-ambiguity.
Backend tool interface (compact JSON)
Direct backend contract/schema:
python3 scripts/fitbit_tools.py schemapython3 scripts/fitbit_tools.py auth-status
python3 scripts/fitbit_tools.py catalog
python3 scripts/fitbit_tools.py discover-capabilities --days 14 --sleep-ms 500 --stop-on-429
python3 scripts/fitbit_tools.py fetch-endpoint --path sleep/date/YYYY-MM-DD.json --normalize
python3 scripts/fitbit_tools.py fetch-day --date YYYY-MM-DD
- add --raw for full Fitbit payload
python3 scripts/fitbit_tools.py fetch-range --start YYYY-MM-DD --end YYYY-MM-DD --metrics hrv_rmssd,resting_hr,sleep_minutes,data_quality
- add --ensure-fresh to auto-sync that range before reading
python3 scripts/fitbit_tools.py fetch-latest --days 5 --metrics hrv_rmssd,resting_hr,sleep_minutes,data_quality
- add --ensure-fresh to auto-sync the last N days before reading
python3 scripts/fitbit_tools.py store-sync-day --date YYYY-MM-DD
python3 scripts/fitbit_tools.py store-sync-range --start YYYY-MM-DD --end YYYY-MM-DD
python3 scripts/fitbit_tools.py quality-flags --days 7
python3 scripts/fitbit_tools.py unified-status
python3 scripts/fitbit_tools.py unified-fetch-latest --days 14 --source bestCanonical QA patterns
Latest Fitbit / recovery snapshot
For questions like:Prefer:
python3 scripts/fitbit_tools.py fetch-latest --days 3 --metrics hrv_rmssd,resting_hr,sleep_minutes,data_quality --ensure-freshUnified health snapshot
For questions that may blend Fitbit + Apple Health:python3 scripts/fitbit_tools.py unified-fetch-latest --days 14 --source bestTrend / confidence checks
When freshness or quality confidence matters:python3 scripts/fitbit_tools.py quality-flags --days 7Training interpretation
For questions like:Use both:
1. this skill for current/recent health signals
2. memory/training-continuity.md for training rules, progression, and recent exercise context
Notes
--metrics lists to keep token usage low.Anti-patterns
If this skill is available, avoid these failure modes:
fitbit_query.py over fitbit_tools.py for normal QALegacy scripts
Older opinionated scripts remain only for backward compatibility and should be treated as non-canonical for ordinary OpenClaw reasoning:
fitbit_query.pyfitbit_coach_view.pyIf a normal user question can be answered through fitbit_tools.py, do that instead.
βοΈ Configuration
1. Create Fitbit developer app (type Personal).
2. Redirect URI: http://127.0.0.1:8787/callback.
3. Create .env from references/env.example.
4. Run auth bootstrap:
- python3 scripts/fitbit_auth.py auth-url
- approve in browser, copy code + returned state
- python3 scripts/fitbit_auth.py exchange --code --state
π Tips & Best Practices
--metrics lists to keep token usage low.