Apple Health CSV
/install apple-health-csv
Apple Health CSV Skill
Query Apple Health data from CSV exports. Works with any iOS app that exports HealthKit data as CSV (Simple Health Export, Health Auto Export, etc.).
Setup
- Export health data from your iPhone using an app like Simple Health Export (free)
- Transfer the CSV files to your Mac (via AirDrop, iCloud, or USB)
- Place them in the skill data directory:
# Default location (auto-detected)
~/.openclaw/workspace-butler/health-data/
# Or specify a custom path
export HEALTH_DATA_DIR="/path/to/your/csv/files"
Usage
# List available health metrics
python3 scripts/health_query.py list
# Get a comprehensive daily health summary
python3 scripts/health_query.py summary
# Query a specific metric (last 7 days by default)
python3 scripts/health_query.py query HeartRate
python3 scripts/health_query.py query StepCount --days 14
python3 scripts/health_query.py query SleepAnalysis --days 7
python3 scripts/health_query.py query OxygenSaturation --days 30
# JSON output for programmatic use
python3 scripts/health_query.py query HeartRate --days 7 --json
python3 scripts/health_query.py summary --json
Supported Metrics
| Category | Metrics |
|---|---|
| Heart | HeartRate, RestingHeartRate, WalkingHeartRateAverage, HeartRateVariabilitySDNN |
| Activity | StepCount, ActiveEnergyBurned, BasalEnergyBurned, AppleExerciseTime, AppleStandTime, FlightsClimbed |
| Distance | DistanceWalkingRunning, DistanceCycling, DistanceSwimming |
| Vitals | OxygenSaturation, RespiratoryRate, BodyTemperature |
| Sleep | SleepAnalysis (with stage breakdown: REM/Core/Deep/Awake) |
| Body | BodyMass, BodyFatPercentage, BodyMassIndex, Height, LeanBodyMass |
| Walking | WalkingSpeed, WalkingStepLength, WalkingAsymmetryPercentage, WalkingDoubleSupportPercentage |
| Audio | EnvironmentalAudioExposure, HeadphoneAudioExposure |
| Performance | VO2Max, SixMinuteWalkTestDistance, AppleWalkingSteadiness |
| Other | DietaryWater, AppleSleepingWristTemperature |
Tips for Agents
- Start with
summaryto get a quick overview of today's health - Use
--jsonflag when you need structured data for analysis - Sleep data is grouped by night (cross-midnight sessions handled correctly)
- Blood oxygen values are auto-converted from 0-1 decimal to percentage
- Cumulative metrics (steps, calories, exercise time) show daily totals
- Rate metrics (heart rate, SpO2) show daily averages with min/max range
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install apple-health-csv - After installation, invoke the skill by name or use
/apple-health-csv - Provide required inputs per the skill's parameter spec and get structured output
What is Apple Health CSV?
Query Apple Health data exported as CSV files from iOS apps like Simple Health Export or Health Auto Export. Supports 30+ health metrics including heart rate... It is an AI Agent Skill for Claude Code / OpenClaw, with 349 downloads so far.
How do I install Apple Health CSV?
Run "/install apple-health-csv" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Apple Health CSV free?
Yes, Apple Health CSV is completely free (open-source). You can download, install and use it at no cost.
Which platforms does Apple Health CSV support?
Apple Health CSV is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Apple Health CSV?
It is built and maintained by _silhouette (@lanyasheng); the current version is v1.0.0.