# sensorkit

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.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 3000 installs · ★ 1237
- Author: dpearson2699
- License: LicenseRef-Unknown · policy=link-only · description only; the file stays with the author
- Source: https://github.com/dpearson2699/swift-ios-skills/tree/HEAD/skills/sensorkit/SKILL.md
- Updated: 2026-07-31
- HTML: https://affpapa.org/en/nevibecode/skills/sensorkit

## What it 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.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill sensorkit -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/sensorkit/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/sensorkit/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill sensorkit -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/sensorkit/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill sensorkit -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/sensorkit/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install dpearson2699/swift-ios-skills sensorkit
```

2. **Manually: put the files in place**
- File: `.github/skills/sensorkit/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill sensorkit -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/dpearson2699/swift-ios-skills --path skills/sensorkit
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/sensorkit/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill sensorkit -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/dpearson2699/swift-ios-skills/tree/HEAD/skills/sensorkit/SKILL.md

## When to use it
- 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
- Set up SensorKit access to the ambient light sensor and request user consent.
- Check the `Info.plist` settings needed for the motion sensor.
- Show me how to fetch SensorKit readings for a selected time range.

## Similar
- [vercel-react-native-skills](https://affpapa.org/en/nevibecode/skills/vercel-react-native-skills.md) — skill · 255200 installs
- [animate-expo](https://affpapa.org/en/nevibecode/skills/animate-expo.md) — skill · 137900 installs
- [mobile-native](https://affpapa.org/en/nevibecode/skills/mobile-native.md) — skill · 86600 installs
- [aso](https://affpapa.org/en/nevibecode/skills/aso.md) — skill · 75400 installs
- [swiftui-pro](https://affpapa.org/en/nevibecode/skills/swiftui-pro.md) — skill · 35200 installs
- [orca-emulator](https://affpapa.org/en/nevibecode/skills/orca-emulator.md) — skill · 5800 installs

From the same set: [dpearson2699/swift-ios-skills](https://affpapa.org/en/nevibecode/by/dpearson2699/swift-ios-skills.md) — 86 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
