/mwdat-ios:motionfrom mwdat-ios
Streams accelerometer, gyroscope, magnetometer, and orientation data from connected iOS wearables. Useful for building motion-aware app features.
Ships in mwdat-ios. 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.
None: SKILL.md is the whole skill.
Motion is an experimental capability for streaming inertial sensor samples. Enable it for the app in Wearables Developer Center. It has no runtime Permission value.
Add Motion only after the DeviceSession reaches .started. Unlike Inputs, Motion is returned stopped: register observers before calling start().
import MWDATCore
import MWDATMotion
let motion = try session.addMotion(
configuration: MotionConfiguration(samplingRate: .hz30)
)
guard let motion else { return }
let samples = motion.samples
let sampleTask = Task {
for await sample in samples {
if let acceleration = sample.accelerometer {
updateAcceleration(x: acceleration.x, y: acceleration.y, z: acceleration.z)
}
if let orientation = sample.orientation {
updateOrientation(orientation.simd)
}
}
}
motion.start()
Retain the sample task while streaming. Observe statePublisher for lifecycle updates and errorPublisher for sensor, connection, and closure failures.
Sampling rates are 5, 10, 15, 24, 30, and 60 Hz; 10 Hz is the default. Higher rates use more bandwidth and power.
MotionSample.timestampNs uses the device monotonic clock. Accelerometer values are m/s², gyroscope values are rad/s, and magnetometer values are µT. Accelerometer, gyroscope, magnetometer, and orientation are all optional, so use only values present in a sample. source distinguishes glasses, Neural Band, and unknown sources.
The sample stream buffers the newest 256 samples. Keep processing off the main actor when it is expensive.
motion.stop() pauses streaming and the same capability can be started again. Cancel the sample task before calling session.removeMotion(); removal is terminal.
Configure deterministic replay before or during streaming with glasses.services.motion.setMotionFeed(samples) or a CSV file URL. Use glasses.services.motion.isStreaming only to assert mock behavior; app logic should observe the SDK Motion state.
Motion is experimental. Apps can use it for development and beta testing, but cannot publish it to production release channels yet.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
wearables, sensor-data, ios-development, inertial-measurement
18 skills in this plugin
/dat-conventionsSwift patterns, async/await, naming conventions, key types for DAT SDK iOS developmentnpx claudepluginhub meta/meta-wearables-dat-ios --plugin mwdat-iosOther plugins' skills for the same job