healthkit-code-review

HealthKit Code Review

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "healthkit-code-review" with this command: npx skills add existential-birds/beagle/existential-birds-beagle-healthkit-code-review

HealthKit Code Review

Quick Reference

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

Review Checklist

  • HKHealthStore.isHealthDataAvailable() called before any HealthKit operations

  • Authorization requested only for needed data types (minimal permissions)

  • requestAuthorization completion handler not misinterpreted as permission granted

  • No attempt to determine read permission status (privacy by design)

  • Query results dispatched to main thread for UI updates

  • HKObjectQueryNoLimit used only with bounded predicates

  • HKStatisticsQuery used for aggregations instead of manual summing

  • Observer query completionHandler() always called (use defer )

  • Background delivery registered in application(_:didFinishLaunchingWithOptions:)

  • Background delivery entitlement added (iOS 15+)

  • Correct units used for quantity types (e.g., count/min for heart rate)

  • Long-running queries stored as properties and stopped in deinit

When to Load References

  • Reviewing authorization/permissions flow -> authorization.md

  • Reviewing HKSampleQuery, HKAnchoredObjectQuery, or predicates -> queries.md

  • Reviewing HKObserverQuery or enableBackgroundDelivery -> background.md

  • Reviewing HKQuantityType, HKCategoryType, or HKWorkout -> data-types.md

Review Questions

  • Is isHealthDataAvailable() checked before creating HKHealthStore?

  • Does the code gracefully handle denied permissions (empty results)?

  • Are observer query completion handlers called in all code paths?

  • Is work in background handlers minimal (~15 second limit)?

  • Are HKQueryAnchors persisted per sample type (not shared)?

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

langgraph-code-review

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

docling

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

python-code-review

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

fastapi-code-review

No summary provided by upstream source.

Repository SourceNeeds Review