AGENT SKILL

XR Blocks SDK贡献开发

xb-contribute-sdk

完成 XR Blocks SDK 的变更,涵盖实现、运行时接线、公共导出、验证、构建输出、示例和权威文档。适用于编辑 XR Blocks 仓库本身,而非使用它的应用程序。

License 许可
Apache-2.0
所属仓库
google/xrblocks
最近更新
2026-11-14
Stars
★ 517
Forks
105

01 前言 Front Matter

name
xb-contribute-sdk
description
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.

02 资源文件 3

03 SKILL.md 正文

Contribute to the XR Blocks SDK

Deliver a complete seam: every affected layer tells the same current story.

1. Freeze the worktree and change contract

Read ../../AGENTS.md, record the current status and diff, and treat existing changes as user-owned. Inspect the implementation, adjacent tests, public entry, and nearest executable example.

Classify the change as internal, root-public, or addon-public. List the affected configuration, runtime owner, lifecycle, cleanup, exports, declarations, build output, tests, examples, and manual owner. Mark unused seam elements not applicable.

Complete this step when the opening worktree is accounted for and every seam element has an owner or an explicit not applicable decision.

2. Trace the production seam

Read references/seam-map.md for the selected branch. Trace configuration to construction, registry resolution, lifecycle calls, disposal, public entry, and emitted path. Treat ../../src/xrblocks.ts and addon public entries as import authority. Do not expose an internal helper only because it exists.

Complete this step when every producer, prerequisite, consumer, lifecycle call, cleanup path, public entry, and emitted path is located.

3. Implement the narrow seam

Follow adjacent TypeScript and module-extension conventions. Use declared dependencies and the registry for runtime services. Keep optional feature defaults inert, configure permissions before XR startup, and initialize owners before dependents. Edit source inputs and regenerate build output; do not edit build/ by hand.

Complete this step when the production path satisfies the change contract and the diff contains no unrelated edits.

4. Add proof through the real boundary

Add or adjust the smallest colocated test that fails without the change. Cover new conditions, disabled or unsupported behavior, failure behavior, cleanup, and boundary wiring when they can regress. Run the narrow test before wider checks.

Complete this step when every behavior in the contract has a named assertion through its real public or runtime boundary.

5. Align the one teaching owner

Read references/developer-surfaces.md. Update the smallest executable sample or template when developers need a copyable pattern. Update the one manual page that owns the concept. Update a task skill only when the change alters that skill's process or branch choice. Do not create a skill for a new capability alone.

Complete this step when a developer can discover one working public pattern and no affected authoritative surface teaches the previous behavior.

6. Close the seam

Run the repository checks required by AGENTS.md in proportion to the change. Use npm run build:sdk for core SDK output and the full build when addon output or complete packaging is affected. Build the docs when manuals, TypeDoc inputs, sidebars, or docs components change. Inspect generated changes and compare the final worktree to the opening snapshot.

Finish when all applicable checks pass, intended imports and declarations resolve from emitted paths, every contract row has proof, documentation matches the public implementation, and user-owned changes remain intact.

04 同仓库更多 Skills

google
google/xrblocks

XR Blocks 应用调试修复

xb-debug-app

调试并修复 XR Blocks 应用。当应用构建或运行失败、UI/交互/感知/渲染行为异常、模拟器与真机表现不一致、存在资源泄漏或包含过时的 SDK 模式时使用。

软件开发工程师XR 与空间计算开发
★ 517
google
google/xrblocks

XR Blocks应用搭建

xb-build-app

构建或扩展完整的 XR Blocks 应用。当请求涉及应用脚手架、完整体验、多个 SDK 领域,或端到端模拟器及 XR 交接,而非单个聚焦子系统时使用。

软件开发工程师XR 与空间计算开发
★ 517
google
google/xrblocks

WebXR空间锚点固定与恢复

xb-anchors

使用 WebXR 空间锚点将内容固定在真实位置,并在后续会话中将其恢复。当虚拟内容必须在头显不断完善房间地图时保持原位,或应用需要记住物品的放置位置时使用。涵盖 `enableAnchors()`、`enableAnchorPersistence()`、创建与恢复锚点、`capability` 状态,以及无需头显即可开发锚点代码的桌面回退方案。可与 xb-world 配合使用,以检测可锚定到的对象。

软件开发工程师XR 与空间计算开发
★ 517
google
google/xrblocks

XR Blocks 物理世界感知接入

xb-add-world-sensing

将物理世界感知连接到 XR Blocks 应用状态。适用于添加平面、场景网格、深度、遮挡、世界碰撞证据、物体或人体识别、面部追踪、分割,或面向智能体(agent)的场景上下文。

软件开发工程师XR 与空间计算开发
★ 517
google
google/xrblocks

XR Blocks 空间 UI 构建

xb-add-spatial-ui

在 XR Blocks 中构建空间 UI。适用于使用内置 UI 系统添加卡片、覆盖层、面板、文本、控件、模型查看器界面,以及布局、样式、主题或 UI 放置。

软件开发工程师XR 与空间计算开发
★ 517
google
google/xrblocks

XR Blocks 交互设计与实现

xb-add-interactions

设计并实现 XR Blocks 交互。适用于添加选择、悬停、直接触摸、抓取、手势、事件所有权、事件传播、自动操作或物理驱动的对象行为。

软件开发工程师XR 与空间计算开发
★ 517