agentleFS
GoogleKnown publishergoogle/xrblocks/skills/xb-add-world-sensing/SKILL.md

xb-add-world-sensing

Skill481 starsChanged 2 months agoApache-2.0View on GitHub

Connect physical-world sensing to XR Blocks application state. Use when adding planes, scene meshes, depth, occlusion, world collision evidence, object or human recognition, face tracking, segmentation, or agent-facing scene context.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

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

    Read references/branches.md, select the narrowest branch that supplies the signal, and read only that branch's manual and example.

    line 17
  2. Very specific:

    Verify each planned symbol in ../../src/xrblocks.ts and its implementation.

    line 25
  3. Very specific:

    Use the interaction pipeline's resolved hit for ray-based placement.

    line 52

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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

Add world sensing

Build a complete sensing behavior: evidence enters the app, becomes current state, and produces an observable reaction.

1. Write the sensor contract

Name the physical or scene signal, cadence, observable reaction, data freshness, permissions, target runtime, and behavior for unsupported, denied, warming-up, empty, stale, and failed states.

Read references/branches.md, select the narrowest branch that supplies the signal, and read only that branch's manual and example.

Complete this step when one named signal maps to one reaction and every absence state maps to an explicit application state.

2. Prove the selected branch

Verify each planned symbol in ../../src/xrblocks.ts and its implementation. Inspect the linked current manual, template, or sample. Record the exact option, permission, WebXR session feature, optional dependency, simulator fidelity, and real-device check before editing application code.

Complete this step when every input has current source or executable evidence and the target runtime is explicit.

3. Connect evidence to app state

Configure the branch before xb.init(options) and keep application behavior in an xb.Script. Let XR Blocks own sensor and render update loops. For explicit detection, prevent uncontrolled concurrent requests and display pending state. For continuous detectors, use start(client) and stop(client) with the same client object.

Convert success into the requested reaction. Convert empty arrays, null, missing sensor data, denied permission, rejected session startup, and stale observations into the contract's absence state. Clear previous output when it is no longer current.

Complete this step when fresh evidence changes observable state and missing or stale evidence clears or replaces it deterministically.

4. Preserve targeting and placement ownership

Use the interaction pipeline's resolved hit for ray-based placement. A reticle displays that hit; it does not own target data. Use xb.world.placeOnHorizontalSurface() for one-time surface placement. Use the Placement manual for continuous follow/face/orbit behavior and its manipulation rebasing.

Complete this step when the sensor, interaction resolver, reticle, and placed object each have one clear responsibility.

5. Prove and hand off sensing

Build or type-check the app and start the exact simulator route when available. Confirm options, imports, permissions, detector ownership, freshness, result mapping, absence states, and cleanup. Add deterministic simulator ground truth only when the branch supports it.

Give separate simulator and device instructions when their evidence differs. Name the signal to present, expected reaction, empty result, stale clearing, permissions, and synthetic versus native evidence.

Finish when successful, empty, denied, unsupported, failed, and stale states have reproducible checks for the selected branch.

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.