tapwithus/tap-web-sdk/tap-getting-started
Claude Code and agent skill by tapwithus/tap-web-sdk
- community
Checking that the SKILL.md file is still in the repository.
First 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.
Install
npx vskill@latest install tapwithus/tap-web-sdk/tap-getting-startedSKILL.md
Tap getting started
Works for both firmware classes. connect() returns TapSDKWeb (classic firmware) or TapSDKWeb2 (framed firmware). Write code that handles both unless the user says which device they have. Do not call these "SDK v1" or "SDK v2".
Devices: Tap Strap, Tap Strap 2, TapXR. TapBand uses the same BLE API and is coming soon (waitlist). It is not for sale yet. Never describe it as unsupported, missing, or buyable. TapXR developer firmware supports the full gesture set (taps, thumb swipes, pinches with hold, fist with hold). Do not invent a firmware version number.
1. Ask the user (once)
- Which device: Tap Strap, Tap Strap 2, or TapXR? (TapBand uses the same API; waitlist if they ask to buy one.)
- Is the Tap turned on and charged?
- Is Tap Manager (or another app) holding the connection? Close it.
- Is the firmware up to date (update it in the Tap Manager app)?
- Which browser: Chrome or Edge? The page must use HTTPS or localhost.
2. Install
In this repository, build the bundle first:
Browser notes:
- Chrome or Edge. Safari and Firefox do not support Web Bluetooth.
- The page must use HTTPS or localhost.
connect()callsnavigator.bluetooth.requestDevice(). Call it from a button click. The browser blocks the device picker without a user gesture.- In the same page,
connect()first reconnects the Tap you last connected (a disconnected Tap does not show in the picker). For an app with its own UI, add a "Choose device" button that callsconnect({ reuseKnownDevice: false }).connect({ device })andconnectToDevice(device)skip the picker for a specificBluetoothDevice.
Reconnect in your own app
Copy the Connect and Choose device pattern from tap-build-an-app ("Connect button and reconnect"). In short: disable both buttons while connect() runs, re-enable them on error and on disconnect, and do not add a reload-time Reconnect button.
3. Connect and listen
Open scripts/quickstart.html from this repository with a local static server after npm run build. In an app, use the same order with import { ... } from '@tapwithus/tapsdk'.
const sdk = await connect()from a click handler. This attaches, detects firmware, and starts notifications. There is nostart().- Register every callback immediately after
connect()returns. - Enable input:
TapSDKWeb:await sdk.setInputMode(new InputModeController()). It boots in Text mode, which types into the focused field and sends no tap events to the SDK.TapSDKWeb2:setFeature(DeviceFeatures.MODEL_DETECTION, true), then pick a vision model (see thetap-vision-modelsskill).
- Keep the page open. Do not navigate away.
4. Callback shapes differ between firmware classes
| Callback | TapSDKWeb | TapSDKWeb2 | |
|---|---|---|---|
registerTapEvents | cb(identifier, tapcode: number) | cb(identifier, [tapcode]) | |
registerAirGestureEvents | cb(identifier, gesture: number) (AirGestures) | cb(identifier, [code]) (UnifiedAirGestures) | |
registerConnectionEvents | cb(sdk) | cb(serial: string) | |
registerDisconnectionEvents | cb(identifier) | cb(identifier) | |
| mouse / motion | registerMouseEvents: cb(id, vx, vy, proximity) | registerImuMotionDataEvents: cb(id, [dx, dy, isMouse, [roll, pitch, yaw]]) |
Normalize with:
Check the class with isTapSDKWeb2(sdk).
5. Callback rules
- Callbacks run on the Bluetooth notification path. Keep them short. Do not block in them.
- To run async work from a callback, use
void sdk.sendVibrationSequence([80]), or put the event on a queue and handle it inrequestAnimationFrame(seetap-build-an-app). sendVibrationSequence([onMs, offMs, onMs, ...])gives haptic feedback (10-2550 ms per value, up to 18 values).await sdk.getDeviceInfo()reads the name, firmware, and battery.
Troubleshooting
| Problem | Fix | |
|---|---|---|
| Device picker does not open | Call connect() from a button click. Use Chrome or Edge on HTTPS or localhost. | |
| No device in the picker | Turn the Tap on. Close Tap Manager and other apps that hold the connection. Then retry. | |
| Paired Tap missing from the picker after disconnect | The Tap is still connected to the OS and does not advertise. In the same page, call connect() again: it reuses the last Tap of this session. After a reload this cannot work (getDevices() Taps fail with "no longer in range"): the user disconnects the Tap in system Bluetooth settings or resets it, then uses the picker. connect({ reuseKnownDevice: false }) always opens the picker; connectToDevice(device) connects a specific one. | |
getPermittedDevices() is empty or getDevices is not a function | navigator.bluetooth.getDevices() is missing unless a flag is on: Chrome chrome://flags/#enable-experimental-web-platform-features, Edge edge://flags/#enable-experimental-web-platform-features (then relaunch). Without it getPermittedDevices() returns only this session's Taps. Feature-detect, never require it, and tell the user which flag if the list is empty. | |
| User cancelled the picker | Catch the error and show it. Ask the user to click Connect again. | |
Connected but no tap events (TapSDKWeb) | Call setInputMode(new InputModeController()) after you register callbacks. | |
Connected but no tap events (TapSDKWeb2) | Enable MODEL_DETECTION and set the TAPPING model with TRIGGER op mode. | |
| Letters appear in a text field when tapping | Device is in Text mode (TapSDKWeb). Set Controller mode. | |
| GATT service missing | Turn Bluetooth off and on. Close other apps that use the Tap. Click Connect again. | |
| Events stop | Keep the page open. Do not reload it. |
More
- Demo: https://tapwithus.github.io/tap-web-sdk/
- Next skills:
tap-tapping,tap-vision-models,tap-imu-motion,tap-raw-sensors,tap-knob,tap-dpad,tap-build-an-app
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/tap-web-sdk/skills/tap-getting-started/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/tapwithus/tap-web-sdk/tap-getting-started)