帮助规划 IWSDK 新功能、系统架构与代码模式,并提供最佳实践建议。
该技能材料显示其为开源的纯提示/规划指南,不要求密钥,也未声明任何远程端点、代码执行或数据读写能力。基于现有材料,整体风险较低,主要仅需留意其仓库社区采用度低、维护状态未知带来的供应链不确定性。
材料明确标注无需密钥或环境变量,未见请求 API token、账号凭证或本地敏感配置的描述,凭证泄露与滥用面较低。
系统检查项显示为 prompt-only,且未声明任何远程端点 host;README 内容为架构与最佳实践说明,未见将用户数据发送到外部服务的事实依据。
从材料看这是用于规划和代码评审建议的技能文档,不包含本机起进程、执行脚本或调用系统能力的声明;现有证据支持其属于纯文本指导。
未声明可读取或写入本地文件、数据库、剪贴板或其他用户资源;描述聚焦于 IWSDK 架构模式与实现建议,未见过度数据访问迹象。
正面因素是来源为 GitHub 开源仓库,源码可审计;但仓库 star 为 0、许可证未声明、维护状态未知,社区验证与持续维护信号较弱,建议在采用前补充核验。
复制安装指令,让 AI 自动完成配置 · 推荐新手
请帮我安装 askskill 上的 "iwsdk-planner" 技能: 1. 下载 https://raw.githubusercontent.com/facebook/immersive-web-sdk/main/.claude/skills/iwsdk-planner/SKILL.md 2. 保存为 ~/.claude/skills/iwsdk-planner/SKILL.md 3. 装好后重载技能,告诉我可以用了
请为 IWSDK 的新消息同步功能制定技术方案,说明模块拆分、ECS 设计、信号流、响应式数据处理方式,以及推荐的最佳实践和需要避免的反模式。
一份结构化的功能架构方案,包含组件职责、数据流、设计模式建议与风险提示。
请从 IWSDK 既有模式出发,评审这个模块的架构是否合理,重点检查 ECS 边界、signals 使用方式、响应式编程一致性,以及是否符合项目最佳实践。
一份架构评审意见,指出问题、原因、改进建议和可替代实现思路。
请总结 IWSDK 代码库中关于 ECS、signals 和响应式编程的核心设计模式,说明适用场景、优缺点,以及在新组件开发时应遵循的规范。
一份面向开发者的模式指南,帮助团队在新开发中保持一致的架构风格。
You are an expert IWSDK (Immersive Web SDK) architect. Apply these patterns and best practices when planning, implementing, or reviewing IWSDK code.
IWSDK is built on three pillars:
elics library@preact/signals-coreIWSDK is a 3D web framework with first-class XR support. World.create() always creates a persistent world.player origin and keeps world.camera under it, even when xr: false is used for browser-only apps. For first-person browser movement, move world.player; for orbit, editor, product, cinematic, or third-person cameras, it is fine to keep world.player at the origin and drive world.camera. Remember that world.camera.position is local to world.player, so use camera.getWorldPosition(...) when world-space viewer position matters.
Use input.canvasPointerEvents for browser mouse/touch canvas events. Browser canvas pointers and XR rays both feed Three/Object3D pointer events and ECS Hovered/Pressed tags on Interactable/RayInteractable entities. XR-specific input is available at world.input.xr; keyboard and standard browser gamepads live at world.input.keyboard and world.input.browserGamepads. Reusable systems should prefer world.input.actions for intent such as locomotion.move or locomotion.jump; opt into browser locomotion bindings with features.locomotion.browserControls.
Systems should NOT store arrays of entities or maintain entity references. Use queries instead.
// ❌ BAD - Storing entity references
export class BadSystem extends createSystem({
items: { required: [MyComponent] },
}) {
private myEntities: Entity[] = []; // DON'T DO THIS
init() {
this.queries.items.subscribe('qualify', (entity) => {
this.myEntities.push(entity); // BAD: manually tracking entities
});
}
}
// ✅ GOOD - Use queries for entity access
export class GoodSystem extends createSystem({
items: { required: [MyComponent] },
}) {
update() {
// Query always gives current matching entities
for (const entity of this.queries.items.entities) {
// Process entity
}
}
}
Exception: Scratch variables for temporary per-frame calculations are OK.
Instead of polling or storing state, react to entity lifecycle events:
export class ReactiveSystem extends createSystem({
interactables: { required: [Interactable, Transform] },
}) {
init() {
// React when entities enter the query
this.queries.interactables.subscribe('qualify', (entity) => {
this.setupEventListeners(entity);
});
// React when entities leave the query
this.queries.interactables.subscribe('disqualify', (entity) => {
this.cleanupEventListeners(entity);
});
}
}
IWSDK uses @preact/signals-core. Prefer signals over manual state tracking:
// System config properties are automatically signals
export class MySystem extends createSystem(
{},
{
speed: { type: Types.Float32, default: 5.0 },
jumpHeight: { type: Types.Float32, default: 2.0 },
},
) {
init() {
// Subscribe to config changes reactively
this.cleanupFuncs.push(
this.config.speed.subscribe((newSpeed) => {
console.log('Speed changed:', newSpeed);
}),
);
}
update(delta) {
// Read signal value with .peek() in update loops (no subscription overhead)
const currentSpeed = this.config.speed.peek();
}
}
Store signals in world.globals for state that multiple systems need to read/write:
// In index.ts (initialization)
import { signal } from '@preact/signals-core';
…
帮助开发者用 iwsdk CLI 测试 XR 交互与面板音频行为是否正常。
用于逐帧调试 WebXR 场景中的物理、动画与实时交互行为。
指导你在 IWSDK 项目中实现深度感知遮挡并排查显示异常问题
使用 iwsdk CLI 测试 Havok 物理系统的重力与刚体行为表现
在 WebXR 场景中模拟抓取物体,便于交互测试与搬运操作验证。
在 XR 场景中定位并点击目标对象,用于验证按钮与交互元素是否正常工作
帮助你创建、修改、调试并预览 IWSDK 应用中的 PanelUI 界面组件。
指导在 IWSDK 项目中实现物理模拟、交互物体与碰撞调试。
帮助开发者高效开发、调试并优化 IWSDK 的 PanelUI 界面面板。
帮助团队为智能体驱动开发制定目标导向计划并保留审计记录。
使用 iwsdk CLI 对关卡层级、标签与默认灯光配置进行测试验证。
根据需求先拆解多步骤任务,生成清晰可执行的实施计划