Agent skill · Data & Analytics

healthkit

Read, write, and query Apple Health data using HealthKit. Covers HKHealthStore authorization, sample queries, statistics queries, statistics collection queries for charts, saving HKQuantitySample data, background delivery, workout sessions with HKWorkoutSession and HKLiveWorkoutBuilder, HKUnit, and HKQuantityTypeIdentifier values. Use when integrating with Apple Health, displaying health metrics, recording workouts, or enabling background health data delivery.

Derek Pearson935★ · +23/wk · 1 repos on radarProfile →
claude-codecodexcursorNOASSERTION
Install
npx skills add dpearson2699/swift-ios-skills --skill healthkit --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 3
SKILL.md size: 16 KB
Bundled scripts: none
Path: skills/healthkit/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 963 · +28 this week
Language: Python
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# HealthKit Read and write health and fitness data from the Apple Health store. Covers authorization, queries, writing samples, background delivery, and workout sessions. Targets Swift 6.3 / iOS 26+. ## Contents - [Setup and Availability](#setup-and-availability) - [Authorization](#authorization) - [Reading Data: Sample Queries](#reading-data-sample-queries) - [Reading Data: Statistics Queries](#reading-data-statistics-queries) - [Reading Data: Statistics Collection Queries](#reading-data-statistics-collection-queries) - [Writing Data](#writing-data) - [Background Delivery](#background-delivery) - [Workout Sessions](#workout-sessions) - [Common Data Types](#common-data-types) - [HKUnit Reference](#hkunit-reference) - [Common Mistakes](#common-mistakes) - [Review Checklist](#review-checklist) - [References](#references) ## Setup and Availability ### Project Configuration 1. Enable the HealthKit capability in Xcode (adds the entitlement) 2. Add `NSHealthShareUsageDescription` (read) and `NSHealthUpdateUsageDescription` (write) to Info.plist 3. For background delivery, enable the "Background Delivery" sub-capability ### Availability Check Always check availability before calling other

What's inside
Steps it walks through
  1. Contents
  2. Setup and Availability
  3. Project Configuration
  4. Availability Check
  5. Authorization
  6. Checking Authorization Status
  7. Reading Data: Sample Queries
  8. Reading Data: Statistics Queries
  9. Reading Data: Statistics Collection Queries
  10. Long-Running Collection Query
  11. Writing Data
  12. Background Delivery
  13. Workout Sessions
  14. Common Data Types
Ships with 2 files
  • evals/evals.json
  • references/healthkit-patterns.md
More from swift-ios-skills
All skills →
About this skill
What does the healthkit skill do?

Read, write, and query Apple Health data using HealthKit. Covers HKHealthStore authorization, sample queries, statistics queries, statistics collection queries for charts, saving HKQuantitySample data, background delivery, workout sessions with HKWorkoutSession and HKLiveWorkoutBuilder, HKUnit, and HKQuantityTypeIdentifier values. Use when integrating with Apple Health, displaying health metrics, recording workouts, or enabling background health data delivery.

How do I install it?

Run `npx skills add dpearson2699/swift-ios-skills --skill healthkit --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From dpearson2699/swift-ios-skills, a repository with 963 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going