/tap-web-sdk:tap-knobfrom tap-web-sdk
Build 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.
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.
TapSDKWeb2 only (framed firmware: TapXR developer firmware and TapBand). It needs raw air-gesture holds and IMU roll. This is an app recipe on those raw events, not an SDK click/drag/drop layer. iOS and Android add that processed layer; this Web SDK does not.
This is the same interaction as the Knob in the TAP_EV sandbox (https://tapwithus.github.io/TAP_EV/).
AB_HOLD..AE_HOLD (codes 110-113). That grabs a knob. Each pinch is a separate knob, so one hand controls 4 values.stepDeg of roll away from it is one step (+ or -).releaseAfter consecutive NONE (100) packets, the knob is released. Waiting for several packets stops one noisy packet from dropping the grab.stateDiagram-v2
idle --> grabbed: pinch hold 110-113
grabbed --> grabbed: roll delta >= stepDeg gives +/- steps
grabbed --> idle: 4 x NONE (100)
Copy scripts/knob.ts. KnobTracker is pure logic, with no Bluetooth. It is easy to test and reuse.
onGesture(code) returns "start", "release", or null.onRoll(roll) returns signed int steps (0 when idle).active is the knob index 0-3 (AB, AC, AD, AE) or null.Required device setup after connect() and after you register callbacks. connect() already started notifications. There is no start().
await sdk.setFeature(DeviceFeatures.MODEL_DETECTION, true);
await sdk.setVisionSensorModel(ModelTypes.AIR_GESTURE);
await sdk.setVisionSensorOpMode(VisionSensorOpModes.STREAM);
await sdk.setFeature(DeviceFeatures.IMU_MOTION_DATA, true);
If connect() returns TapSDKWeb (classic firmware), tell the user this recipe needs framed firmware (TapSDKWeb2): TapXR developer firmware, or TapBand when it ships. Do not say the device is unsupported.
Wiring:
const knob = new KnobTracker(2);
const value = [50, 50, 50, 50];
function onAirGesture(_identifier: string, data: number[]): void {
const event = knob.onGesture(data[0]);
if (event === 'start') {
void sdk.sendVibrationSequence([40]);
}
}
function onMotion(_identifier: string, motion: ImuMotionData): void {
const roll = motion[3][0];
const steps = knob.onRoll(roll);
if (steps && knob.active !== null) {
const i = knob.active;
value[i] = Math.max(0, Math.min(100, value[i] + steps));
}
}
| Setting | Default | Effect |
|---|---|---|
stepDeg | 1 (template uses 2) | Degrees of roll per step. Larger = slower, more precise. 1-2 for fine values, 5-10 for menu items. |
releaseAfter | 4 | NONE packets before release. Raise it if the knob drops while still pinching. |
-steps.sendVibrationSequence([40])) and optionally a tick every N steps. Do not buzz on every step.Math.max(0, Math.min(100, v))).wrapDegrees handles crossing it.stepDeg = 8.See also tap-dpad (pinch-hold that chooses between rotate and drag) and tap-vision-models (gesture codes).
What 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.