mcpbeat Sign in

Iwsdk Grab Agent Skill

Grab an object in the WebXR scene using emulated controllers. Use when the user wants to pick up, move, or test grabbing an object. Supports OneHandGrabbable and TwoHandsGrabbable components which use proximity-based grip (squeeze button), not trigger.

932 tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
361
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/facebook/immersive-web-sdk --skill iwsdk-grab

The instruction itself

13 sections, as written by the author

Grab Object

Grab an object in the XR scene using the IWER emulated controllers. The workflow has a required core (steps 1-5) that must always execute, and optional extensions (steps 6-9) that depend on the user's intent.

User request is in $ARGUMENTS.

Required Core

These steps always execute in order. A grab cannot succeed without them.

Step 1: Enter XR

Check session status. If not in an active XR session, accept and enter.

xr_get_session_status → if not sessionActive → xr_accept_session

Step 2: Locate the target

Find the live entity by name or grabbable component, then query its component data.

ecs_find_entities({namePattern: target}) → ecs_query_entity(entityIndex)

If the object is not found, search OneHandGrabbable and TwoHandsGrabbable

entities, report the available matches, and stop.

Step 3: Get its transform

Read the object's Transform position from the queried entity.

ecs_query_entity(entityIndex) → Transform.position

Step 4: Animate controller to target

Animate the controller to the object's position. Default to "controller-right" unless the user specified left.

xr_animate_to({
  device: "controller-right",
  position: { x, y, z },
  duration: 0.5,
})

Step 5: Engage grip

OneHandGrabbable and TwoHandsGrabbable are proximity-based and use the squeeze/grip button (index 1), not the trigger.

xr_set_gamepad_state({
  device: "controller-right",
  buttons: [{ index: 1, value: 1 }],
})

The object is now grabbed. If the user only asked to grab (not move), stop here.

Optional Extensions

Apply these based on the user's request.

Step 6: Move to destination

If the user specified a destination position, animate the controller there. If no position was given but the user asked to "move" the object, animate it to in front of the headset.

To find "in front of headset": xr_get_transform({ "device": "headset" }) → place at (head.x, head.y - 0.2, head.z - 0.5) adjusted for head orientation.

xr_animate_to({
  device: "controller-right",
  position: { x, y, z },
  duration: 0.5,
})

Step 7: Release grip

Release the squeeze button to drop the object.

xr_set_gamepad_state({
  device: "controller-right",
  buttons: [{ index: 1, value: 0 }],
})

Step 8: Return controller

Animate the controller back to its resting position so it's not overlapping the dropped object.

xr_animate_to({
  device: "controller-right",
  position: { x: 0.2, y: 1.4, z: -0.3 },
  duration: 0.5,
})

Default resting positions: right (0.2, 1.4, -0.3), left (-0.2, 1.4, -0.3).

Step 9: Verify

Take a screenshot to confirm the result.

browser_screenshot

The screenshot command is runtime-only. If the editor is visible, the managed

workspace switches to runtime before capture.

Notes

  • Never use xr_set_device_state to move controllers — it teleports instead of animating, which can break grab state.
  • Never use xr_select or trigger (button index 0) for grabs — OneHandGrabbable/TwoHandsGrabbable respond to squeeze (button index 1).
  • DistanceGrabbable is different — it uses ray-based selection, not proximity. This skill does not cover DistanceGrabbable.
  • If the object lacks a name in the hierarchy, suggest adding mesh.name = "MyObject" in code before createTransformEntity.

Other skills for the same job

different authors, same section of the catalogue
Protocolsio Integration
by christophacham
×4

Integration with protocols.io API for managing scientific protocols. This skill should be used when working with protocols.io to search, create, update, or publish protocols; manage protocol steps and materials; handle discussions and comments; organize workspaces; upload and manage files; or integrate protocols.io functionality into workflows. Applicable for protocol discovery, collaborative protocol development, experiment tracking, lab protocol management, and scientific documentation.

16k tokens
Tailored Resume Generator
by frostant
×4

Analyzes job descriptions and generates tailored resumes that highlight relevant experience, skills, and achievements to maximize interview chances

3k tokens
Excalidraw Diagram Generator
by github
vendor ×3

Generate Excalidraw diagrams from natural language descriptions. Use when asked to "create a diagram", "make a flowchart", "visualize a process", "draw a system architecture", "create a mind map", or "generate an Excalidraw file". Supports flowcharts, relationship diagrams, mind maps, and system architecture diagrams. Outputs .excalidraw JSON files that can be opened directly in Excalidraw.

36k tokens scripts
Expo Dev Client
by openai
vendor ×3

Build and distribute Expo development clients locally or via TestFlight

961 tokens
Executing Plans
by ZhanlinCui
×3

Use when you have a written implementation plan to execute in a separate session with review checkpoints

542 tokens
Anndata
by christophacham
×3

Data structure for annotated matrices in single-cell analysis. Use when working with .h5ad files or integrating with the scverse ecosystem. This is the data format skill—for analysis workflows use scanpy; for probabilistic models use scvi-tools; for population-scale queries use cellxgene-census.

16k tokens
Benchling Integration
by christophacham
×3

Benchling R&D platform integration. Access registry (DNA, proteins), inventory, ELN entries, workflows via API, build Benchling Apps, query Data Warehouse, for lab data management automation.

14k tokens
Biopython
by christophacham
×3

Comprehensive molecular biology toolkit. Use for sequence manipulation, file parsing (FASTA/GenBank/PDB), phylogenetics, and programmatic NCBI/PubMed access (Bio.Entrez). Best for batch processing, custom bioinformatics pipelines, BLAST automation. For quick lookups use gget; for multi-service integration use bioservices.

24k tokens

How to use it

Copy the folder

Take facebook/iwsdk-grab from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.