/tap-web-sdk:tap-raw-sensorsfrom tap-web-sdk
Stream 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.
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.
Read when SKILL.md points to them; scripts run unread.
For research, datasets, and custom gesture models. For pointer movement or orientation, prefer tap-imu-motion (less data, already processed).
The callback gets a list of packets: cb(identifier, packets).
| Key | Type | Meaning |
|---|---|---|
type | 'imu' | 'accl' | "imu" (thumb IMU) or "accl" (finger accelerometers) |
ts | number | Device timestamp in ms (device clock, not wall time) |
payload | number[] | imu: [gyroX, gyroY, gyroZ, acclX, acclY, acclZ] (6 values). accl: 5 fingers x [x, y, z] (15 values, thumb first). |
Units: raw LSB counts, or mdps (gyro) and mg (accelerometer) when scaling is on. Rate is about 200 Hz per sensor, delivered in batches.
TapSDKWeb2import { DeviceFeatures, ImuAcclSensitivity, ImuGyroSensitivity } from '@tapwithus/tapsdk';
sdk.registerRawImuDataEvents(onRaw); // registerRawDataEvents also works
await sdk.setFeature(DeviceFeatures.RAW_IMU_DATA, true);
await sdk.setImuSensitivity(
ImuAcclSensitivity.G2, // G2 / G4 / G8 / G16
ImuGyroSensitivity.DPS125, // DPS125 ... DPS2000
{ scaled: true }, // payload in mg / mdps
);
// later
await sdk.setFeature(DeviceFeatures.RAW_IMU_DATA, false);
connect() already started notifications. There is no start(). await sdk.getImuSensitivity() returns [ImuGyroSensitivity, ImuAcclSensitivity].
TapSDKWebimport { InputModeController, InputModeRaw } from '@tapwithus/tapsdk';
import { FingerAcclSensitivity, ImuAcclSensitivity, ImuGyroSensitivity } from '@tapwithus/tapsdk';
sdk.registerRawDataEvents(onRaw);
await sdk.setInputMode(new InputModeRaw({
scaled: true,
fingerAcclSens: FingerAcclSensitivity.G2, // default G2
imuGyroSens: ImuGyroSensitivity.DPS125, // default DPS125
imuAcclSens: ImuAcclSensitivity.G2, // default G2
}));
// leave raw mode
await sdk.setInputMode(new InputModeController());
Open scripts/log-csv.html from this repository with a local static server after npm run build. It works on TapSDKWeb and TapSDKWeb2. It records for the chosen number of seconds, then downloads a CSV file.
Columns: host_time, device_ts_ms, type (imu or accl), then the payload values.
In the user's app, push packets onto an array in the callback and build the CSV outside the callback. Download it with a Blob.
Parse the CSV in the page and draw it on a canvas, or open the file in a spreadsheet. imu accelerometer axes are payload columns 3, 4, and 5 (after gyro x/y/z).
ts for timing between samples, not Date.now().G2, DPS125) gives more resolution. Raise it for fast, strong motion so values do not clip.RawDataMessage 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-imu-motionUse 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./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-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.