google/xrblocks/xb-add-interactions
Claude Code and agent skill by google/xrblocks
- vendor
Checking that the SKILL.md file is still in the repository.
Design and implement XR Blocks interactions. Use when adding selection, hover, direct touch, grab, gestures, event ownership, propagation, automatic manipulation, or physics-driven object behavior.
Install
npx vskill@latest install google/xrblocks/xb-add-interactionsSKILL.md
The same SKILL.md was published earlier as google/xrblocks/xb-add-interactions.
Add interactions
Produce a complete interaction contract in code: intent, target, phases, state owner, feedback, cleanup, and test instructions.
1. Inventory each user intent
For every requested action, record the actor, target, trigger, start/update/end or cancel phases, one application state transition, feedback, and desktop/XR test route. Keep separate rows when two actions have different ownership or phase models, even when they use the same object.
Complete this step when every action has a target, phase model, state owner, feedback, and user-test path.
2. Select one event family
Read `../../docs/docs/manual/Interaction.md`. Use:
- global
Scripthooks for scene-owned commands; - object select and hover hooks for resolved ray targets;
- touch and grab hooks for direct hand contact;
- gesture event targets for recognized hand poses or completed head motion;
object.xb.manipulationfor automatic translation, rotation, or scale;- Rapier only for collision, gravity, momentum, throwing, or forces.
Read the selected branch reference:
- `references/selection-and-direct-hands.md`
- `references/gesture-events.md`
- `references/manipulation-and-physics.md`
Complete this step when every action maps to one public event family without a second raycast loop or a reconstructed higher-level event.
3. Implement ownership and feedback
Put the handler on the script that owns application state or contains the logical target. Give targets intentional hit geometry. Use the event's source, target, surface, currentTarget, and intersection instead of raycasting again. Treat the reticle as presentation of the resolved hit.
Represent useful phases explicitly, such as idle, hovered, active, held, and disabled. Keep handlers thin: validate the resolved event, change one domain state, then update feedback. Share the domain method when several input sources mean the same action.
Complete this step when every intent row has an owner, target geometry, handler, phase state, domain transition, feedback, and release or cancel path.
4. Preserve event and manipulation semantics
Call event.stopPropagation() from a targeted callback only when its ancestor propagation must stop. For selection events, call event.stopGlobalPropagation() in onObjectSelectStart to suppress global selection callbacks for the entire capture without cancelling the control's default action. Calling it later only affects callbacks that have not run. Built-in buttons, sliders, text inputs, and scroll views consume selection; subclasses overriding their selection handlers should call super. Use event.preventDefault() only where the event exposes it: touch start can suppress the default touch selection, and manipulation start can suppress the automatic transform. Propagation and default behavior are independent.
Automatic manipulation supports independent simultaneous object owners and two-source scale on one owner. Keep per-object state on the object or owning script, not in one global drag slot. Placement scripts suspend during manipulation and rebase on resume.
Guard optional hands, joints, recognizers, and tracked data. Store listener functions and remove them in dispose(). Provide stable unavailable, interrupted, disabled, and canceled states.
Complete this step when propagation, default behavior, paired lifecycle phases, concurrent owners, optional data, and cleanup are explicit for every branch.
5. Prove and hand off each action
Build or type-check the app, run focused tests, and start the exact simulator route when available. Confirm targets, affordances, handlers, event fields, state transitions, release behavior, and relevant console output. Use `../../templates/02_object_interaction/` as the current interaction foundation.
Give the user one compact test card per action: simulator steps, XR input, target, start/active/result/release feedback, state change, and device-only checks.
Finish when every action can be tested without inferring its controls, expected feedback, or cancellation behavior from source.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files. Certified 16 Nov 2026.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/xb-add-interactions/SKILL.md
Popularity
- Repository stars
- 464
- Repository forks
- 94
- 7-day trend score
- 31
Stars and forks are for the whole GitHub repository, not this skill alone. 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/google/xrblocks/xb-add-interactions)