Access ambient, motion, biometric, and interaction sensor streams for approved research and clinical studies using SRSensorReader. Targets Swift 6.4 / iOS 26+.
Ships in all-ios-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Access granular ambient, motion, biometric, and interaction sensor streams for approved research and clinical studies using SRSensorReader. Targets Swift 6.4 / iOS 26+.
Entitlement Warning: SensorKit requires Apple entitlement approval (
com.apple.developer.sensorkit.reader.allow). SensorKit cannot be tested on standard consumer apps or simulators without approved research provisioning.
com.apple.developer.sensorkit.reader.allow from Apple.NSSensorKitUsageDescription, NSSensorKitUsageDescriptionAmbientLightSensor).import SensorKit
func requestSensorAccess(for sensors: Set<SRSensor>) async {
let status = await SRSensorReader.requestAuthorization(for: sensors)
// Handle authorization response
}
Create an SRSensorReader per sensor type and assign an SRSensorReaderDelegate:
final class AmbientLightCollector: NSObject, SRSensorReaderDelegate {
private let reader = SRSensorReader(sensor: .ambientLightSensor)
override init() {
super.init()
reader.delegate = self
}
func start() {
guard reader.authorizationStatus == .authorized else { return }
reader.startRecording()
}
func stop() {
reader.stopRecording()
}
}
Query historical recorded samples by date interval:
func fetchSamples(from start: SRAbsoluteTime, to end: SRAbsoluteTime) {
let request = SRFetchRequest()
request.from = start
request.to = end
reader.fetch(request)
}
// SRSensorReaderDelegate
func sensorReader(_ reader: SRSensorReader, fetching request: SRFetchRequest, didFetchResult result: SRFetchResult) -> Bool {
if let sample = result.sample as? SRAmbientLightSample {
// Process sensor sample
}
return true // Return true to continue fetching remaining results
}
func sensorReader(_ reader: SRSensorReader, didCompleteFetch request: SRFetchRequest) {
// Finished fetch
}
.ambientLightSensor, .accelerometer, .rotationRate, .elevation..keyboardMetrics, .deviceUsageReport, .messagesUsageReport, .phoneUsageReport..speechMetrics, .faceMetrics, .wristTemperature, .heartRate.Research participants can delete recorded data. Honor deletion requests via SRSensorReader:
func purgeData(before timestamp: SRAbsoluteTime) async throws {
let request = SRDeletionRequest()
request.endTime = timestamp
try await reader.delete(request)
}
false from didFetchResult halts subsequent sample delivery.SRFetchRequest to bounded start and end timestamps to avoid memory exhaustion.com.apple.developer.sensorkit.reader.allow entitlement confirmed activerequestAuthorization(for:) called before starting reader recordingdidFetchResult returns true while iterating batch samplesWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
sensorkit, sensor-reader, research-study, ios-sensors, apple-entitlement
/all-ios-skills:sensorkitfrom all-ios-skills
npx claudepluginhub thienqo/ios-skills --plugin all-ios-skills95 skills in this plugin
/accessorysetupkitDiscover and configure Bluetooth and Wi-Fi accessories using AccessorySetupKit. Use when presenting a privacy-preserving accessory picker, defining discovery descriptors for BLE or Wi-Fi devices, handling accessory session events, migrating from CoreBluetooth permission-based scanning, or setting up accessories without requiring broad Bluetooth permissions./activitykitBuild or review Live Activities and Dynamic Island experiences with ActivityKit, including lifecycle, layouts, push updates, and scheduled delivery. Use for time-sensitive Lock Screen or Dynamic Island state; route ordinary widgets to widgetkit./adattributionkitMeasure ad effectiveness with privacy-preserving attribution using AdAttributionKit. Use when registering ad impressions, handling attribution postbacks, updating conversion values, implementing re-engagement attribution, configuring publisher or advertiser apps, or replacing SKAdNetwork with AdAttributionKit for ad measurement.Other plugins' skills for the same job