sensorkit

Collect research-grade sensor data from iOS and watchOS devices.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/KumarAdi8/AgentKit --skill sensorkit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sensorkit
Source: https://github.com/KumarAdi8/AgentKit/tree/main/skills/sensorkit
Command: npx skills add https://github.com/KumarAdi8/AgentKit --skill sensorkit

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Enables approved research apps to collect, manage, and fetch high-fidelity sensor data from iPhone and Apple Watch while enforcing platform entitlements, user consent, and data-holding policies to avoid incorrect or unauthorized data access.

Core Features & Use Cases

  • Entitlement & Provisioning Guidance: Shows how to add com.apple.developer.sensorkit.reader.allow, configure manual provisioning, and list only required sensors.
  • Authorization & Privacy: Explains per-sensor Info.plist keys, the Research Sensor & Usage Data sheet, and how to request and respond to authorization status changes.
  • Recording, Fetching & Device Management: Demonstrates SRSensorReader usage for start/stop recording, building SRFetchRequest ranges that respect the 24-hour hold, fetching SRDevice lists, and processing SRFetchResult samples (ambient light, accelerometer, keyboard metrics, ECG/PPG, device usage, visits, media events, etc.).
  • Robust Patterns & Testing: Includes delegate wiring, multi-sensor manager patterns, sample processing advice, error handling for SRError codes, and device/testing constraints (no simulator, Apple Watch/TrueDepth requirements).
  • Use Case: Implement a research study that records ambient light, wrist temperature, and keyboard metrics, requests user consent, and periodically fetches prior-day samples for analysis.

Quick Start

Request SensorKit authorization for ambient light and accelerometer, start recording, and fetch two days of historical data for the current device.

Frequently Asked Questions about sensorkit

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

FAQPage Schema
How do I collect research-grade sensor data from iOS and watchOS devices?

To collect research-grade sensor data from iOS and watchOS, use SensorKit's SRSensorReader to start and stop recording, then build SRFetchRequest ranges to retrieve prior-day samples like ambient light, motion, and ECG data.

What entitlements do I need to access SensorKit data on iPhone and Apple Watch?

Accessing SensorKit data requires the com.apple.developer.sensorkit.reader.allow entitlement, manual provisioning with the SensorKit capability, and per-sensor Info.plist usage entries to enforce platform authorization and user consent.

Why does my SensorKit fetch request return no data immediately after recording?

SensorKit enforces a 24-hour data holding period, meaning fetch requests only return historical samples after this delay. Building SRFetchRequest ranges must respect this hold to avoid incorrect or unauthorized data access.

Can I test SensorKit recording and fetching on the iOS simulator?

No, SensorKit has device and testing constraints requiring physical hardware. Testing requires a real iPhone and Apple Watch, with specific Apple Watch or TrueDepth sensor requirements depending on the sensors recorded.

How do I request user consent for multiple SensorKit sensors in a research study?

Request user consent for multiple SensorKit sensors through the Research Sensor & Usage Data sheet, then respond to authorization status changes using delegate wiring to manage per-sensor access before recording starts.

What types of sensor data can I record using SensorKit for Apple-approved research studies?

SensorKit records ambient light, accelerometer, keyboard metrics, device usage, ECG/PPG, wrist temperature, visits, and media events across iPhone and Apple Watch for Apple-approved research workflows.