healthkit

Reads and writes Apple Health data with HKStore authorization and queries.

Updated Apr 6, 2026
One-click install
npx skills add https://github.com/jperezdelreal/GymBro --skill healthkit-jperezdelreal
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: healthkit
Source: https://github.com/jperezdelreal/GymBro/tree/main/.squad/skills/ios/healthkit
Command: npx skills add https://github.com/jperezdelreal/GymBro --skill healthkit-jperezdelreal

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

HealthKit integration is essential for apps that need to access and manage users' health data securely, enabling rich health insights and workout tracking while respecting privacy.

Core Features & Use Cases

  • Read and write health and fitness data from Apple Health, including authorization handling and data storage.
  • Perform one-shot and time-series queries (sample, statistics, collection) to build dashboards, trends, and workout analyses.
  • Support background delivery and live workout sessions to keep data synchronized even when the app is in the background or during workouts.

Quick Start

Grant HealthKit access, import HealthKit, and start querying or writing data to the store.

Frequently Asked Questions about healthkit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I read and write Apple Health data using HealthKit?

HealthKit allows you to read and write Apple Health data by accessing the health store, handling authorization, and executing sample or statistics queries to retrieve and log health metrics securely.

How does background delivery work for Apple Health updates?

Background delivery keeps your app synchronized with Apple Health updates even when it is running in the background, ensuring you receive continuous health metrics and workout data without active polling.

Can I use HealthKit to track live workout sessions in the background?

Yes, HealthKit supports live workout sessions and background delivery, allowing your app to continuously track and synchronize workout data while running in the background.

What is the best way to build health trends from Apple Health data?

The best way to build health trends is to perform time-series statistics and collection queries against the Apple Health store to aggregate health metrics and workout analyses over specific periods.

Do I need to handle HKHealthStore authorization before querying Apple Health?

Yes, you must grant and handle HKHealthStore authorization before accessing the health store to ensure secure read and write access to the user's health metrics and workout data.

Why are my HealthKit statistics queries not returning workout data?

HealthKit statistics queries may fail if HKHealthStore authorization is not properly granted, or if the query parameters do not match the specific workout and sample types stored in Apple Health.