Agent skill · Data & Analytics

core-motion

Access Core Motion accelerometer, gyroscope, magnetometer, device-motion, pedometer, activity-recognition, altitude, headphone motion, batched high-frequency workout motion, and water-submersion/depth data. Use when reading device sensors, counting steps, detecting walking/running/driving/cycling, tracking altitude, building motion interactions, handling AirPods head tracking, or implementing watchOS dive/depth features.

Derek Pearson935★ · +23/wk · 1 repos on radarProfile →
claude-codecodexcursorNOASSERTION
Install
npx skills add dpearson2699/swift-ios-skills --skill core-motion --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 3
SKILL.md size: 13 KB
Bundled scripts: none
Path: skills/core-motion/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 963 · +28 this week
Language: Python
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# CoreMotion Read device motion, pedometer/activity, altitude, headphone, batched-workout, and submersion sensors with Core Motion. Scope: Swift 6.3, iOS 26+. ## Contents - [Setup](#setup) - [CMMotionManager: Sensor Data](#cmmotionmanager-sensor-data) - [Processed Device Motion](#processed-device-motion) - [CMPedometer: Step and Distance Data](#cmpedometer-step-and-distance-data) - [CMMotionActivityManager: Activity Recognition](#cmmotionactivitymanager-activity-recognition) - [CMAltimeter: Altitude Data](#cmaltimeter-altitude-data) - [Update Intervals and Battery](#update-intervals-and-battery) - [Common Mistakes](#common-mistakes) - [Review Checklist](#review-checklist) - [References](#references) ## Setup ### Info.plist Add `NSMotionUsageDescription` to Info.plist with a user-facing string explaining why your app needs motion data. Without this key, the app crashes on first access. ```xml <key>NSMotionUsageDescription</key> <string>This app uses motion data to track your activity.</string> ``` ### Authorization Use the matching manager's `authorizationStatus()` or `authorizationStatus` property when an API exposes one (`CMPedometer`, `CMMotionActivityManager`, `CMAltimeter`, hea

What's inside
Steps it walks through
  1. Contents
  2. Setup
  3. Info.plist
  4. Authorization
  5. CMMotionManager: Sensor Data
  6. Accelerometer Updates
  7. Gyroscope Updates
  8. Polling Pattern (Games)
  9. Processed Device Motion
  10. Attitude Reference Frames
  11. CMPedometer: Step and Distance Data
  12. Availability Checks
  13. CMMotionActivityManager: Activity Recognition
  14. Historical Activity Query
Ships with 2 files
  • evals/evals.json
  • references/motion-patterns.md
More from swift-ios-skills
All skills →
About this skill
What does the core-motion skill do?

Access Core Motion accelerometer, gyroscope, magnetometer, device-motion, pedometer, activity-recognition, altitude, headphone motion, batched high-frequency workout motion, and water-submersion/depth data. Use when reading device sensors, counting steps, detecting walking/running/driving/cycling, tracking altitude, building motion interactions, handling AirPods head tracking, or implementing watchOS dive/depth features.

How do I install it?

Run `npx skills add dpearson2699/swift-ios-skills --skill core-motion --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From dpearson2699/swift-ios-skills, a repository with 963 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going