/tap-web-sdk:tap-vision-modelsfrom tap-web-sdk
Switch the TapSDKWeb2 vision model between TAPPING and AIR_GESTURE, set the op mode, and decode UnifiedAirGestures (swipes, pinches, holds, fist). Use for air gestures, pinch, swipe, fist, model switching, or AirGestures on TapSDKWeb.
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.
This SDK delivers raw gesture detections. Python, Web, iOS, and Android all receive those codes. iOS and Android add a processed click / drag / drop layer. This Web SDK does not. Never say swipes or pinches are iOS/Android-only.
TapXR developer firmware and TapBand use the same BLE API and the full set: taps, thumb swipes up/down/left/right, thumb-to-finger pinches with hold, fist with hold. TapBand is coming soon (waitlist). Do not invent a firmware version number.
TapSDKWeb2 (framed firmware) for model switching. TapSDKWeb air gestures are at the end of this page.
The framed-firmware device runs one vision model at a time:
ModelTypes | Output | Callback |
|---|---|---|
TAPPING | finger taps | registerTapEvents: cb(id, [tapcode]) |
AIR_GESTURE | swipes, pinches, holds, fist | registerAirGestureEvents: cb(id, [code]) |
VisionSensorOpModes | Meaning | Use with |
|---|---|---|
TRIGGER | Run the model when a tap-like trigger occurs | TAPPING |
STREAM | Run the model all the time | AIR_GESTURE |
STREAM_ON_TRIGGER | Start streaming after a trigger | experiments |
import {
DeviceFeatures,
ModelTypes,
TapSDKWeb2,
UnifiedAirGestures,
VisionSensorOpModes,
} from '@tapwithus/tapsdk';
async function useAirGestures(sdk: TapSDKWeb2): Promise<void> {
await sdk.setFeature(DeviceFeatures.MODEL_DETECTION, true);
await sdk.setVisionSensorModel(ModelTypes.AIR_GESTURE);
await sdk.setVisionSensorOpMode(VisionSensorOpModes.STREAM);
}
async function useTapping(sdk: TapSDKWeb2): Promise<void> {
await sdk.setFeature(DeviceFeatures.MODEL_DETECTION, true);
await sdk.setVisionSensorModel(ModelTypes.TAPPING);
await sdk.setVisionSensorOpMode(VisionSensorOpModes.TRIGGER);
}
Call these after connect() returns and after you register callbacks. connect() already started notifications. There is no start(). You can switch at runtime, as often as needed. Read the current state with await sdk.getVisionSensorModel() and await sdk.getVisionSensorOpMode(). Each call times out after 2 s if the device does not answer.
To start from a clean state, turn each feature off. Do not loop Object.values(DeviceFeatures) — a numeric enum also lists names.
await sdk.setFeature(DeviceFeatures.RAW_IMU_DATA, false);
await sdk.setFeature(DeviceFeatures.MODEL_DETECTION, false);
await sdk.setFeature(DeviceFeatures.IMU_MOTION_DATA, false);
await sdk.setFeature(DeviceFeatures.TRIGGER_DETECTIONS, false);
await sdk.setFeature(DeviceFeatures.STANDBY_GESTURE_DETECTION, false);
Letters: A = thumb, B = index, C = middle, D = ring, E = pinky. "AB" = thumb touches index (pinch).
Verified: tapIncMsg parses MODEL_DETECTION + AIR_GESTURE into { type: 'air_gesture', data: [code] }. TapSDKWeb2 calls registerAirGestureEvents with that array.
| Code | Name | Meaning |
|---|---|---|
| 100 | COMBINED_GESTURE_NONE | No gesture / hand relaxed. Use it as "release" after a hold. |
| 101 | COMBINED_GESTURE_LEFT | Thumb swipe left |
| 102 | COMBINED_GESTURE_RIGHT | Thumb swipe right |
| 103 | COMBINED_GESTURE_UP | Thumb swipe up |
| 104 | COMBINED_GESTURE_DOWN | Thumb swipe down |
| 105-108 | COMBINED_GESTURE_AB / AC / AD / AE | Short pinch: thumb + index / middle / ring / pinky |
| 109 | COMBINED_GESTURE_FIST | Fist |
| 110-113 | COMBINED_GESTURE_AB_HOLD ... AE_HOLD | Pinch held |
| 114 | COMBINED_GESTURE_FIST_HOLD | Fist held |
function onAirGesture(_identifier: string, data: number[]): void {
if (data[0] === UnifiedAirGestures.COMBINED_GESTURE_LEFT) {
goBack();
}
}
The device sends gesture packets continuously in STREAM mode, so the same code repeats. To act once per gesture, act when the code changes, or ignore repeats within about 40 ms. Holds repeat until the hand relaxes and NONE (100) arrives. Wait for a few NONE packets in a row before you treat a hold as released (see tap-dpad).
tap-knob and tap-dpad are app recipes that build click / drag / drop in the page from these raw codes. That is not an SDK layer.
Fist-hold switches to tapping; all-five-finger tap (31) switches back:
function onAirGesture(_identifier: string, data: number[]): void {
if (data[0] === UnifiedAirGestures.COMBINED_GESTURE_FIST_HOLD) {
void useTapping(sdk);
}
}
function onTap(_identifier: string, data: number[]): void {
if (data[0] === 31) {
void useAirGestures(sdk);
}
}
DeviceFeatures.STANDBY_GESTURE_DETECTION lets the user put the device in standby with a gesture. registerStandbyStateEvents(cb(id, isStandby)) reports changes. await sdk.setStandbyState(false) wakes it. await sdk.getStandbyState() reads it.
TapSDKWeb has no model switching. In InputModeController(), registerAirGestureEvents gives cb(id, gesture: number) that matches AirGestures (for example UP_ONE_FINGER, LEFT_TWO_FINGERS, PINCH, THUMB_FINGER, STATE_FIST). registerAirGestureStateEvents gives cb(id, MouseModes) when the air-mouse state changes.
src/enumerations.ts in this repositoryWhat 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.