agentleFS
facebookfacebook/immersive-web-sdk/.claude/skills/click-target/SKILL.md

click-target

Skill350 starsChanged 24 days agoMITView on GitHub

Find and click a target object in XR. Use when testing UI interactions, clicking buttons, or verifying interactable elements work correctly.

The file

Show its rules and text

We split this skill into the rules it gives an agent

18 rules. About 0 are common, 7 are distinctive, and 11 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 11

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use mcp__iwsdk-runtime__scene_get_runtime_hierarchy to find the target object's UUID.

    line 19
  2. Distinctive:

    Look for objects with entityIndex (these are ECS entities)

    line 21
  3. Very specific:

    Use mcp__iwsdk-runtime__scene_get_object_transform with the target UUID.

    line 26
  4. Very specific:

    Use positionRelativeToXROrigin for all positioning operations

    line 28
  5. Very specific:

    Use mcp__iwsdk-runtime__xr_look_at with device headset and the target position.

    line 33
  6. Very specific:

    Use mcp__iwsdk-runtime__browser_screenshot to verify:

    line 39
  7. Very specific:

    If not visible, use mcp__iwsdk-runtime__xr_look_at with moveToDistance to get closer

    line 43
  8. Very specific:

    Use mcp__iwsdk-runtime__xr_get_transform to check controller position.

    line 47
  9. Distinctive:

    If controller is visible in screenshot and not occluding target, proceed

    line 49
  10. Distinctive:

    If controller is far away or not visible:

    line 50
  11. Very specific:

    Use mcp__iwsdk-runtime__xr_look_at with the controller device and target position.

    line 57
  12. Distinctive:

    If the target is a button on a panel, the button may be offset from the panel center

    line 60
  13. Very specific:

    Use mcp__iwsdk-runtime__xr_select with the controller device.

    line 64
  14. Very specific:

    Use mcp__iwsdk-runtime__browser_get_console_logs with a pattern to check for expected log messages.

    line 68
  15. Distinctive:

    If no logs match, the click may have missed - adjust target position and retry

    line 70
  16. Very specific:

    Use mcp__iwsdk-runtime__scene_get_object_transform on child elements to find exact button positions

    line 76
  17. Distinctive:

    Always verify with console logs rather than assuming from visuals

    line 77
  18. Distinctive:

    Verify "[BUTTON CLICKED]" appears in console logs

    line 89

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Click Target in XR

Find a target object in the scene and click it using a controller, then verify the click registered.

Arguments

$ARGUMENTS should be a description of the target to find (e.g., "the RESTART button", "the scoreboard", "the settings panel").

Workflow

1. Get Scene Hierarchy

Use mcp__iwsdk-runtime__scene_get_runtime_hierarchy to find the target object's UUID.

  • Look for objects with entityIndex (these are ECS entities)
  • PanelUI elements typically have nested children for their content

2. Get Target Transform

Use mcp__iwsdk-runtime__scene_get_object_transform with the target UUID.

  • Use positionRelativeToXROrigin for all positioning operations
  • Note the position for the next steps

3. Position Headset to Look at Target

Use mcp__iwsdk-runtime__xr_look_at with device headset and the target position.

  • This orients the headset to face the target

4. Screenshot to Verify Target Visible

Use mcp__iwsdk-runtime__browser_screenshot to verify:

  • Target is visible in the view
  • Target is not occluded by other objects
  • If not visible, use mcp__iwsdk-runtime__xr_look_at with moveToDistance to get closer

5. Position Controller

Use mcp__iwsdk-runtime__xr_get_transform to check controller position.

  • If controller is visible in screenshot and not occluding target, proceed
  • If controller is far away or not visible:
    1. Get headset position with mcp__iwsdk-runtime__xr_get_transform
    2. Set controller to headset position with mcp__iwsdk-runtime__xr_set_transform
    3. Micro-adjust: offset x by +0.25 (right) or -0.25 (left), y by -0.1, z by -0.3

6. Point Controller at Target

Use mcp__iwsdk-runtime__xr_look_at with the controller device and target position.

  • For UI elements on panels, you may need to target a specific child element
  • If the target is a button on a panel, the button may be offset from the panel center

7. Click

Use mcp__iwsdk-runtime__xr_select with the controller device.

8. Verify Click

Use mcp__iwsdk-runtime__browser_get_console_logs with a pattern to check for expected log messages.

  • If no logs match, the click may have missed - adjust target position and retry
  • Common adjustments: change x or z by 0.05-0.1 to hit child elements

Tips

  • For PanelUI buttons, the button position is often offset from the panel center
  • Use mcp__iwsdk-runtime__scene_get_object_transform on child elements to find exact button positions
  • Always verify with console logs rather than assuming from visuals
  • The ray visual in screenshots can be misleading - test with actual clicks
  • Either controller (left or right) can be used

Example

To click the RESTART button on the pong scoreboard:

  1. Find scoreboard entity (entityIndex 6 in the pong game)
  2. Scoreboard is at (0, -0.798, -1.25)
  3. Button is at approximately (0.05, -0.798, -1.109) - offset toward player
  4. Point controller at button position and click
  5. Verify "[BUTTON CLICKED]" appears in console logs

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.