healthkit

Automate HealthKit authorization, queries, and sample writes in Swift iOS apps.

Updated Apr 3, 2026
One-click install
npx skills add https://github.com/ScriptKitKat/TamaGoosie --skill healthkit-scriptkitkat
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: healthkit
Source: https://github.com/ScriptKitKat/TamaGoosie/tree/main/plugins/apple-kit-skills/skills/healthkit
Command: npx skills add https://github.com/ScriptKitKat/TamaGoosie --skill healthkit-scriptkitkat

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Apple Health data integration and management can be challenging due to required authorizations, data access patterns, and safe data writing.

Core Features & Use Cases

  • Read, write, and query HealthKit data, including authorization handling, sample queries, statistics, background delivery, and workouts.
  • Integrate HealthKit in Swift-based apps to display metrics, track workouts, and support background updates.
  • Supports HKQuantityTypeIdentifier values, HKUnit, and HKWorkoutSession patterns for robust health data workflows.

Quick Start

Request HealthKit authorization and begin basic data reading or writing tasks.

Frequently Asked Questions about healthkit

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

FAQPage Schema
How do I handle HealthKit authorization in my Swift app?

Handling HealthKit authorization in Swift requires requesting access through HKHealthStore for specific data types. This Skill coordinates the authorization flow and manages data queries and sample writes with proper error handling.

How do I query Apple Health data using HKQuantityTypeIdentifier values?

Query Apple Health data by specifying HKQuantityTypeIdentifier values and HKUnit within Swift-based iOS apps. This Skill automates sample queries and statistics retrieval to display health metrics or track workouts.

Can I use HKWorkoutSession to track workouts with background delivery?

Yes, HKWorkoutSession supports tracking workouts and responding to background health data updates. This Skill implements background delivery patterns and workout sessions for robust health data workflows.

What is the best way to write health samples to HealthKit safely?

Writing health samples to HealthKit safely requires proper authorization and error handling when saving data via HKHealthStore. This Skill automates safe data writing alongside sample queries and statistics.

Does this approach support background health data updates in iOS?

Supporting background health data updates in iOS involves configuring background delivery patterns with HKHealthStore. This Skill applies proper background delivery mechanisms to respond to health data changes.

Why does my HealthKit query return an authorization error?

HealthKit queries return authorization errors when HKHealthStore access is not properly requested or granted for the specified HKQuantityTypeIdentifier. This Skill coordinates authorization handling to prevent such errors.