[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6993F57C01XXES7M8654GWD":3,"skill-same:01M6993F57C01XXES7M8654GWD":86},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":44,"commitSha":45,"skillDirectory":46,"forksCount":47,"repositoryHtmlUrl":48,"repositoryHomepageUrl":49,"ownerHtmlUrl":50,"ownerBlogUrl":51,"ownerDescription":52,"updatedAt":53,"install":54,"resources":67},"01M6993F57C01XXES7M8654GWD","xb-add-interactions",null,"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.","google\u002Fxrblocks","google","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1342004?v=4","01M698VYEFDM0VJBZDYYJ2T83S","Google","01M6993A0Y0E9SVC7MR1FQ03S3",513,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fxrblocks\u002Fblob\u002Fmain\u002Fskills\u002Fxb-add-interactions\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"xb add interactions","add","propagation","when","automatic","object","grab","event","ownership","blocks","touch","design","physics","selection","use","behavior","direct","hover","implement","gestures","2026-11-10 10:12:30",false,"---\nname: xb-add-interactions\ndescription: 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.\n---\n\n# Add interactions\n\nProduce a complete **interaction contract in code**: intent, target, phases,\nstate owner, feedback, cleanup, and test instructions.\n\n## 1. Inventory each user intent\n\nFor every requested action, record the actor, target, trigger, start\u002Fupdate\u002Fend\nor cancel phases, one application state transition, feedback, and desktop\u002FXR\ntest route. Keep separate rows when two actions have different ownership or\nphase models, even when they use the same object.\n\nComplete this step when every action has a target, phase model, state owner,\nfeedback, and user-test path.\n\n## 2. Select one event family\n\nRead\n[`..\u002F..\u002Fdocs\u002Fdocs\u002Fmanual\u002FInteraction.md`](..\u002F..\u002Fdocs\u002Fdocs\u002Fmanual\u002FInteraction.md).\nUse:\n\n- global `Script` hooks for scene-owned commands;\n- object select and hover hooks for resolved ray targets;\n- touch and grab hooks for direct hand contact;\n- gesture event targets for recognized hand poses or completed head motion;\n- `object.xb.manipulation` for automatic translation, rotation, or scale;\n- Rapier only for collision, gravity, momentum, throwing, or forces.\n\nRead the selected branch reference:\n\n- [`references\u002Fselection-and-direct-hands.md`](references\u002Fselection-and-direct-hands.md)\n- [`references\u002Fgesture-events.md`](references\u002Fgesture-events.md)\n- [`references\u002Fmanipulation-and-physics.md`](references\u002Fmanipulation-and-physics.md)\n\nComplete this step when every action maps to one public event family without a\nsecond raycast loop or a reconstructed higher-level event.\n\n## 3. Implement ownership and feedback\n\nPut the handler on the script that owns application state or contains the\nlogical target. Give targets intentional hit geometry. Use the event's\n`source`, `target`, `surface`, `currentTarget`, and `intersection` instead of\nraycasting again. Treat the reticle as presentation of the resolved hit.\n\nRepresent useful phases explicitly, such as `idle`, `hovered`, `active`,\n`held`, and `disabled`. Keep handlers thin: validate the resolved event, change\none domain state, then update feedback. Share the domain method when several\ninput sources mean the same action.\n\nComplete this step when every intent row has an owner, target geometry,\nhandler, phase state, domain transition, feedback, and release or cancel path.\n\n## 4. Preserve event and manipulation semantics\n\nCall `event.stopPropagation()` from a targeted callback only when its ancestor\npropagation must stop. For selection events, call\n`event.stopGlobalPropagation()` in `onObjectSelectStart` to suppress global\nselection callbacks for the entire capture without cancelling the control's\ndefault action. Calling it later only affects callbacks that have not run.\nBuilt-in buttons, sliders, text inputs, and scroll views consume selection;\nsubclasses overriding their selection handlers should call `super`.\nUse `event.preventDefault()` only where the event\nexposes it: touch start can suppress the default touch selection, and\nmanipulation start can suppress\nthe automatic transform. Propagation and default behavior are independent.\n\nAutomatic manipulation supports independent simultaneous object owners and\ntwo-source scale on one owner. Keep per-object state on the object or owning\nscript, not in one global drag slot. Placement scripts suspend during\nmanipulation and rebase on resume.\n\nGuard optional hands, joints, recognizers, and tracked data. Store listener\nfunctions and remove them in `dispose()`. Provide stable unavailable,\ninterrupted, disabled, and canceled states.\n\nComplete this step when propagation, default behavior, paired lifecycle phases,\nconcurrent owners, optional data, and cleanup are explicit for every branch.\n\n## 5. Prove and hand off each action\n\nBuild or type-check the app, run focused tests, and start the exact simulator\nroute when available. Confirm targets, affordances, handlers, event fields,\nstate transitions, release behavior, and relevant console output. Use\n[`..\u002F..\u002Ftemplates\u002F02_object_interaction\u002F`](..\u002F..\u002Ftemplates\u002F02_object_interaction\u002F)\nas the current interaction foundation.\n\nGive the user one compact test card per action: simulator steps, XR input,\ntarget, start\u002Factive\u002Fresult\u002Frelease feedback, state change, and device-only\nchecks.\n\nFinish when every action can be tested without inferring its controls, expected\nfeedback, or cancellation behavior from source.\n","# Add interactions\n\nProduce a complete **interaction contract in code**: intent, target, phases,\nstate owner, feedback, cleanup, and test instructions.\n\n## 1. Inventory each user intent\n\nFor every requested action, record the actor, target, trigger, start\u002Fupdate\u002Fend\nor cancel phases, one application state transition, feedback, and desktop\u002FXR\ntest route. Keep separate rows when two actions have different ownership or\nphase models, even when they use the same object.\n\nComplete this step when every action has a target, phase model, state owner,\nfeedback, and user-test path.\n\n## 2. Select one event family\n\nRead\n[`..\u002F..\u002Fdocs\u002Fdocs\u002Fmanual\u002FInteraction.md`](..\u002F..\u002Fdocs\u002Fdocs\u002Fmanual\u002FInteraction.md).\nUse:\n\n- global `Script` hooks for scene-owned commands;\n- object select and hover hooks for resolved ray targets;\n- touch and grab hooks for direct hand contact;\n- gesture event targets for recognized hand poses or completed head motion;\n- `object.xb.manipulation` for automatic translation, rotation, or scale;\n- Rapier only for collision, gravity, momentum, throwing, or forces.\n\nRead the selected branch reference:\n\n- [`references\u002Fselection-and-direct-hands.md`](references\u002Fselection-and-direct-hands.md)\n- [`references\u002Fgesture-events.md`](references\u002Fgesture-events.md)\n- [`references\u002Fmanipulation-and-physics.md`](references\u002Fmanipulation-and-physics.md)\n\nComplete this step when every action maps to one public event family without a\nsecond raycast loop or a reconstructed higher-level event.\n\n## 3. Implement ownership and feedback\n\nPut the handler on the script that owns application state or contains the\nlogical target. Give targets intentional hit geometry. Use the event's\n`source`, `target`, `surface`, `currentTarget`, and `intersection` instead of\nraycasting again. Treat the reticle as presentation of the resolved hit.\n\nRepresent useful phases explicitly, such as `idle`, `hovered`, `active`,\n`held`, and `disabled`. Keep handlers thin: validate the resolved event, change\none domain state, then update feedback. Share the domain method when several\ninput sources mean the same action.\n\nComplete this step when every intent row has an owner, target geometry,\nhandler, phase state, domain transition, feedback, and release or cancel path.\n\n## 4. Preserve event and manipulation semantics\n\nCall `event.stopPropagation()` from a targeted callback only when its ancestor\npropagation must stop. For selection events, call\n`event.stopGlobalPropagation()` in `onObjectSelectStart` to suppress global\nselection callbacks for the entire capture without cancelling the control's\ndefault action. Calling it later only affects callbacks that have not run.\nBuilt-in buttons, sliders, text inputs, and scroll views consume selection;\nsubclasses overriding their selection handlers should call `super`.\nUse `event.preventDefault()` only where the event\nexposes it: touch start can suppress the default touch selection, and\nmanipulation start can suppress\nthe automatic transform. Propagation and default behavior are independent.\n\nAutomatic manipulation supports independent simultaneous object owners and\ntwo-source scale on one owner. Keep per-object state on the object or owning\nscript, not in one global drag slot. Placement scripts suspend during\nmanipulation and rebase on resume.\n\nGuard optional hands, joints, recognizers, and tracked data. Store listener\nfunctions and remove them in `dispose()`. Provide stable unavailable,\ninterrupted, disabled, and canceled states.\n\nComplete this step when propagation, default behavior, paired lifecycle phases,\nconcurrent owners, optional data, and cleanup are explicit for every branch.\n\n## 5. Prove and hand off each action\n\nBuild or type-check the app, run focused tests, and start the exact simulator\nroute when available. Confirm targets, affordances, handlers, event fields,\nstate transitions, release behavior, and relevant console output. Use\n[`..\u002F..\u002Ftemplates\u002F02_object_interaction\u002F`](..\u002F..\u002Ftemplates\u002F02_object_interaction\u002F)\nas the current interaction foundation.\n\nGive the user one compact test card per action: simulator steps, XR input,\ntarget, start\u002Factive\u002Fresult\u002Frelease feedback, state change, and device-only\nchecks.\n\nFinish when every action can be tested without inferring its controls, expected\nfeedback, or cancellation behavior from source.\n",{"name":5,"description":7},"main","ab20b56560350895180bde15e2faa1ebbccb30c0","skills\u002Fxb-add-interactions",103,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fxrblocks","https:\u002F\u002Fxrblocks.github.io","https:\u002F\u002Fgithub.com\u002Fgoogle","https:\u002F\u002Fopensource.google\u002F","Google ❤️ Open Source","2026-11-11 08:50:36",{"source":8,"skillName":5,"commands":55,"prompt":65,"zipAvailable":66},[56,59,62],{"tool":57,"command":58},"npx","npx skills add google\u002Fxrblocks --skill xb-add-interactions",{"tool":60,"command":61},"bunx","bunx skills add google\u002Fxrblocks --skill xb-add-interactions",{"tool":63,"command":64},"pnpm","pnpm dlx skills add google\u002Fxrblocks --skill xb-add-interactions","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fxrblocks\u002Fblob\u002Fmain\u002Fskills\u002Fxb-add-interactions\u002FSKILL.md",true,[68,74,78,82],{"path":69,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":72,"sourceHtmlUrl":73},"agents\u002Fopenai.yaml","REFERENCE","参考文档",280,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fxrblocks\u002Fblob\u002Fmain\u002Fskills\u002Fxb-add-interactions\u002Fagents\u002Fopenai.yaml",{"path":75,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":76,"sourceHtmlUrl":77},"references\u002Fgesture-events.md",1361,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fxrblocks\u002Fblob\u002Fmain\u002Fskills\u002Fxb-add-interactions\u002Freferences\u002Fgesture-events.md",{"path":79,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":80,"sourceHtmlUrl":81},"references\u002Fmanipulation-and-physics.md",2041,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fxrblocks\u002Fblob\u002Fmain\u002Fskills\u002Fxb-add-interactions\u002Freferences\u002Fmanipulation-and-physics.md",{"path":83,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":84,"sourceHtmlUrl":85},"references\u002Fselection-and-direct-hands.md",3075,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fxrblocks\u002Fblob\u002Fmain\u002Fskills\u002Fxb-add-interactions\u002Freferences\u002Fselection-and-direct-hands.md",[87,115,137,152,177,196],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":98,"publishedAt":39},"01M6993TAHGHAWX3M5S320QZFA","xb-debug-app","Debug and repair XR Blocks applications. Use when an app fails to build or run, produces incorrect UI, interaction, sensing, or rendering behavior, differs between simulator and device, leaks resources, or contains obsolete SDK patterns.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fxrblocks\u002Fblob\u002Fmain\u002Fskills\u002Fxb-debug-app\u002FSKILL.md",[93],{"categoryNo":94,"categoryName":95,"taxonomyType":96,"taxonomyTypeDesc":97},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[99,100,101,102,103,104,105,106,34,33,107,108,109,110,111,112,113,114,28,22],"xb debug app","debug app","debug","app","sdk","run","ui","applications","build","device","patterns","repair","sensing","interaction","resources","rendering",{"skillNo":116,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":119,"categories":120,"keywords":121,"publishedAt":39},"01M6993RD0VK0VPN8YYP3FNQX1","xb-contribute-sdk","Complete an XR Blocks SDK change across implementation, runtime wiring, public exports, proof, build output, examples, and canonical documentation. Use when editing the XR Blocks repository rather than an application that consumes it.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fxrblocks\u002Fblob\u002Fmain\u002Fskills\u002Fxb-contribute-sdk\u002FSKILL.md",[],[103,122,123,124,125,126,127,128,129,33,130,107,131,132,133,134,28,135,136,22],"xb contribute sdk","contribute","change","documentation","examples","repository","editing","public","implementation","across","runtime","proof","complete","output","wiring",{"skillNo":138,"name":139,"nameZh":6,"description":140,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":141,"categories":142,"keywords":143,"publishedAt":39},"01M6993PEZ751YR930CS86CKRY","xb-build-app","Build or extend a complete XR Blocks application. Use when the request concerns an app scaffold, a whole experience, several SDK areas, or an end-to-end simulator or XR handoff rather than one focused subsystem.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fxrblocks\u002Fblob\u002Fmain\u002Fskills\u002Fxb-build-app\u002FSKILL.md",[],[144,107,102,145,146,103,147,33,148,149,134,28,150,151,22],"xb build app","build app","handoff","scaffold","application","end","request","extend",{"skillNo":153,"name":154,"nameZh":6,"description":155,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":156,"categories":157,"keywords":158,"publishedAt":39},"01M6993MT5KMBBZEBYCNY4D0Y8","xb-anchors","Pin content to a real place with WebXR spatial anchors, and bring it back in a later session. Use when virtual content must stay put as the headset refines its map of the room, or when an app should remember where things were left. Covers `enableAnchors()`, `enableAnchorPersistence()`, creating and restoring anchors, the `capability` states, and the desktop fallback that lets anchor code be developed without a headset. Pair with xb-world for detecting what to anchor to.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fxrblocks\u002Fblob\u002Fmain\u002Fskills\u002Fxb-anchors\u002FSKILL.md",[],[159,160,161,162,163,164,165,166,167,168,169,170,102,171,172,173,174,175,176,22],"xb anchors","webxr","remember","code","virtual","pair","fallback","later","back","world","map","as","states","detecting","bring","for","things","capability",{"skillNo":178,"name":179,"nameZh":6,"description":180,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":181,"categories":182,"keywords":183,"publishedAt":39},"01M6993JZJGTVKZT028WFG4E5H","xb-add-world-sensing","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.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fxrblocks\u002Fblob\u002Fmain\u002Fskills\u002Fxb-add-world-sensing\u002FSKILL.md",[],[184,168,111,20,185,186,187,188,189,33,190,148,191,192,28,24,193,194,195,22],"xb add world sensing","connect","state","segmentation","context","tracking","evidence","human","physical","occlusion","depth","face",{"skillNo":197,"name":198,"nameZh":6,"description":199,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":200,"categories":201,"keywords":205,"publishedAt":39},"01M6993H6WX2Q57A3MGNB1VMQF","xb-add-spatial-ui","Build spatial UI in XR Blocks. Use when adding cards, overlays, panels, text, controls, model-viewer interfaces, layout, styling, themes, or UI placement with the built-in UI system.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fxrblocks\u002Fblob\u002Fmain\u002Fskills\u002Fxb-add-spatial-ui\u002FSKILL.md",[202],{"categoryNo":203,"categoryName":204,"taxonomyType":96,"taxonomyTypeDesc":97},"01JBSEEDCAT000000000000032","设计师",[206,105,207,20,208,209,210,33,211,107,212,213,214,215,28,216,217,218,219,22],"xb add spatial ui","Spatial","system","text","model","styling","layout","panels","themes","controls","with","overlays","ui system","viewer"]