sensorkit — Claude Code skill for SensorKit setup
This skill guides SensorKit setup for research apps on iPhone and Apple Watch. Use it to configure sensor access, request consent, record readings, and fetch them later.
npx skills add dpearson2699/swift-ios-skills --skill sensorkit -a claude-codeWhat sensorkit does
The skill covers SensorKit configuration: selecting sensors, adding the entitlement, setting Info.plist usage details, and requesting Research Sensor & Usage Data consent. Each sensor gets its own SRSensorReader, and its availability needs a separate check. Recording starts and stops through the reader; a fetch request specifies a time range and device.
SensorKit requires an Apple-approved research study, the granted entitlement, and a manually managed provisioning profile with the SensorKit capability enabled. Users authorize access sensor by sensor. For an active sensor, an app can retrieve up to 7 days of earlier recordings, so fetch timing affects how the app handles its data. Use CoreMotion for general motion features and HealthKit for health records or workouts.
What it helps with
- configure SensorKit entitlements for approved sensors
- add sensor-specific usage explanations to
Info.plist - request permission to read research sensor data
- record readings and fetch them for a chosen period
Example prompts for the agent
- Set up SensorKit access to the ambient light sensor and request user consent.
- Check the
Info.plistsettings needed for the motion sensor. - Show me how to fetch SensorKit readings for a selected time range.
How to install sensorkit
1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill sensorkit -a claude-code2Manually: put the files in place
~/.claude/skills/sensorkit/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/sensorkit/
1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill sensorkit -a codex2Manually: put the files in place
.agents/skills/sensorkit/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill sensorkit -a cursor2Manually: put the files in place
.cursor/skills/sensorkit/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install dpearson2699/swift-ios-skills sensorkit2Manually: put the files in place
.github/skills/sensorkit/SKILL.md1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill sensorkit -a gemini-cli2Platform CLI
gemini skills install https://github.com/dpearson2699/swift-ios-skills --path skills/sensorkitManually: put the files in place
.devin/skills/sensorkit/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill sensorkit -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about sensorkit
How do I install sensorkit in Claude Code?
Run npx skills add dpearson2699/swift-ios-skills --skill sensorkit -a claude-code. The skill file is placed at ~/.claude/skills/sensorkit/SKILL.md.
What does sensorkit do?
It guides SensorKit setup for research apps, including entitlements, sensor usage descriptions, authorization, recording, and data retrieval.
What do I need to use SensorKit?
The study must be approved by Apple, with a SensorKit entitlement granted and a manually managed provisioning profile that enables the SensorKit capability. Users must authorize the requested sensors.