/tap-web-sdk:tap-imu-motionfrom tap-web-sdk
Use Tap hand motion - TapSDKWeb2 IMU motion data (dx, dy, roll, pitch, yaw) and TapSDKWeb mouse events - to move a cursor, steer, tilt, or rotate things. Use for air mouse, pointer, cursor control, tilt, orientation, euler angles, roll/pitch/yaw, or motion-driven UI.
Ships in tap-web-sdk. 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.
The two firmware classes give motion in different ways. connect() already started notifications. There is no start(). Register callbacks, then enable the feature or the input mode.
TapSDKWeb2: IMU motion featureimport { DeviceFeatures } from '@tapwithus/tapsdk';
import type { ImuMotionData } from '@tapwithus/tapsdk';
function onMotion(_identifier: string, motion: ImuMotionData): void {
const [dx, dy, isMouse, [roll, pitch, yaw]] = motion;
}
sdk.registerImuMotionDataEvents(onMotion);
await sdk.setFeature(DeviceFeatures.IMU_MOTION_DATA, true);
dx, dy: signed int pointer deltas since the last packet. Add them to a cursor position.isMouse: true when the device considers the motion a pointer movement.roll, pitch, yaw: signed ints, orientation in degrees.setFeature(DeviceFeatures.IMU_MOTION_DATA, false) to save battery and bandwidth.MODEL_DETECTION (air gestures). The tap-knob and tap-dpad skills combine them.TapSDKWeb: mouse eventsimport { InputModeController, InputType } from '@tapwithus/tapsdk';
function onMouse(_identifier: string, vx: number, vy: number, proximity: boolean): void {
}
sdk.registerMouseEvents(onMouse);
await sdk.setInputMode(new InputModeController());
vx, vy: signed velocities. proximity: true when a surface is detected (optical mouse on Tap Strap).TapSDKWeb, use raw IMU (tap-raw-sensors).await sdk.setInputType(InputType.MOUSE) forces air-mouse. InputType.AUTO returns to automatic.Cursor on a canvas (clamp to bounds, optional gain):
const GAIN = 1;
let x = 400;
let y = 300;
function onMotion(_identifier: string, motion: ImuMotionData): void {
const [dx, dy] = motion;
x = Math.min(Math.max(x + dx * GAIN, 0), WIDTH);
y = Math.min(Math.max(y + dy * GAIN, 0), HEIGHT);
}
On TapSDKWeb, use vx and vy from registerMouseEvents the same way.
Relative rotation (roll as a dial): store a reference roll when the user starts (for example on a pinch-hold), then use roll - reference. Do not use absolute roll. It depends on how the hand is held. See tap-knob.
Smoothing: an exponential moving average removes jitter:
const alpha = 0.3;
smooth = alpha * value + (1 - alpha) * smooth;
Dead zone: ignore Math.abs(dx) + Math.abs(dy) < 2 to stop drift when the hand is still.
Rate: count packets per second if timing matters. Do not assume a fixed rate.
If a direction is inverted on the user's device, flip the sign. Ask the user to test and tell you.
ImuMotionData in src/types.tsWhat SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub tapwithus/tap-web-sdk --plugin tap-web-sdk8 skills in this plugin
/tap-build-an-appBuild a complete browser app or interactive experience controlled by a Tap - games, pages, presentations, or creative tools. Use when the user asks to build, make, or create something with their Tap, especially if they are not a developer./tap-dpadBuild a D-Pad style controller with TapSDKWeb2 - swipes for directions, short pinches to select, pinch-hold that locks into rotate (twist) or drag (move) mode, fist-hold to hide. Use for D-Pad, menu navigation, select and move, drag and drop, rotate objects, or game controls with gestures./tap-getting-startedFirst skill for any Tap web app. Call connect() from a button click, then register callbacks, then enable input. connect() starts notifications. There is no start(). Use for install, connect to my Tap, setup, or no tap events./tap-knobBuild a virtual knob with TapSDKWeb2 - hold a pinch and twist the wrist to turn a value up or down (volume, brightness, zoom, scroll, color). Use for knob, dial, twist, rotate-to-adjust, slider, volume control, or continuous value control./tap-raw-sensorsStream raw accelerometer and gyroscope samples from a Tap (TapSDKWeb raw mode or TapSDKWeb2 RAW_IMU_DATA), set sensitivity and scaling, log to CSV, and plot. Use for raw sensors, raw IMU, accelerometer, gyro, data logging, datasets, custom gesture recognition, or research./tap-tappingDecode Tap tapcodes (which fingers tapped), map finger combinations to in-page actions, and give haptic feedback. Use for tapping, finger combos, chords, tap-to-action, shortcuts, InputModeController, or the TAPPING vision model.