Install
openclaw skills install healthkit-code-reviewReviews HealthKit code for authorization patterns, query usage, background delivery, and data type handling. Use when reviewing code with import HealthKit, HKHealthStore, HKSampleQuery, HKObserverQuery, or HKQuantityType.
openclaw skills install healthkit-code-review| Issue Type | Reference |
|---|---|
| HKHealthStore, permissions, status checks, privacy | references/authorization.md |
| HKQuery types, predicates, anchored queries, statistics | references/queries.md |
| Background delivery, observer queries, completion handlers | references/background.md |
| HKQuantityType, HKCategoryType, workouts, units | references/data-types.md |
HKHealthStore.isHealthDataAvailable() called before any HealthKit operationsrequestAuthorization completion handler not misinterpreted as permission grantedHKObjectQueryNoLimit used only with bounded predicatesHKStatisticsQuery used for aggregations instead of manual summingcompletionHandler() always called (use defer)application(_:didFinishLaunchingWithOptions:)count/min for heart rate)deinitenableBackgroundDelivery -> background.mdRun in order. Do not state a finding in a later step until the pass condition for the current step is satisfied (each pass condition is answerable from the codebase under review).
HealthKit, HKHealthStore, or HK* APIs (or state clearly that the diff touches none).isHealthDataAvailable() before HealthKit use, or document why omission is acceptable for the scoped code; cite where HKHealthStore is created or injected.requestAuthorization / getRequestStatusForAuthorization, cite handler branches per references/authorization.md (e.g. success does not prove read access); do not infer read permission from authorizationStatus alone.HKObjectQueryNoLimit only with a bounded predicate); for totals/aggregates, cite HKStatisticsQuery / collection vs manual summing per references/queries.md.HKObserverQuery or enableBackgroundDelivery appears, cite where the observer is started/stopped and where background delivery is registered; cite entitlements/Info.plist or flag missing config per references/background.md. If absent, Pass: one line “no observer/background in scope.”stop()/deinit for long-running queries per checklist above.isHealthDataAvailable() checked before creating HKHealthStore?