Token导航 LogoToken导航

Agent Skill · 前端设计

hz-spatial-sdk(HZ spatial SDK 命令行)

hz-spatial-sdk 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

hz-spatial-sdk 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为执行命令;许可证信息还不明确,第三方扫描已通过,按安装量在前端设计类的 10,216 个 Skill 里排第 9,297。

总安装 220周安装 9GitHub Stars 31下载 71核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:hz-spatial-sdk(HZ spatial SDK 命令行)
来源仓库:https://github.com/meta-quest/agentic-tools
仓库路径:skills/hz-spatial-sdk
安装命令:
npx skills add https://github.com/meta-quest/agentic-tools --skill hz-spatial-sdk
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/meta-quest/agentic-tools --skill hz-spatial-sdk

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

hz-spatial-sdk 处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,支持空间计算 SDK 集成。适用于围绕仓库状态、代码变更或协作事项进行信息整理。可在 Codex、Claude、Cursor、Gemini CLI 中调用以获取项目上下文。

需确认权限范围和维护状态,避免触发命令执行或文件写入。建议结合原始 README 核验具体功能和使用限制。

来源仓库内路径:skills/hz-spatial-sdk

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/meta-quest/agentic-tools --skill hz-spatial-sd…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要执行命令,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

hz-spatial-sdk 怎么安装?

在终端执行 npx skills add https://github.com/meta-quest/agentic-tools --skill hz-spatial-sdk。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

hz-spatial-sdk 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

hz-spatial-sdk 需要什么权限?

权限级别是执行命令。安装流程涉及命令执行,可能通过 npx skills add https://github.com/meta-quest/agentic-tools --skill hz-spatial-sdk 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

hz-spatial-sdk 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

hz-spatial-sdk 用的人多吗?

公开数据是累计安装 220 次,近一周安装 9 次,下载 71 次,GitHub 31 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

hz-spatial-sdk 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 需要执行命令,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理前端设计类任务、又不想每次都手写提示词的人。

不太适合

  • 不能接受 Skill 在你机器上执行命令的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

前端设计类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
frontend-design

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
hz-spatial-sdk

HZ spatial SDK 命令行 · 本页

22031执行命令未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Spatial SDK Skill

Build native Android spatial applications for Meta Quest using the Meta Spatial SDK. This skill covers the Entity-Component-System architecture, 2D panel rendering, 3D object placement, hybrid app development, and deployment to Horizon OS devices.

When to Use This Skill

Use this skill when you need to:

  • Build a native Android app for Meta Quest using the Spatial SDK and Kotlin
  • Create hybrid experiences that combine 2D Android UI panels with 3D content
  • Work with the Entity-Component-System (ECS) architecture in Spatial SDK
  • Add 3D objects, animations, or spatial interactions to a Quest application
  • Configure panels using Jetpack Compose or Android Views for spatial rendering
  • Use the Spatial Editor to compose 3D scenes visually
  • Deploy and test Spatial SDK applications on a Quest device

This skill applies to all Meta Quest headsets running Horizon OS (Quest 2, Quest 3, Quest 3S, Quest Pro).

What is Meta Spatial SDK

Meta Spatial SDK is Meta's native Android framework for building spatial applications on Horizon OS. It extends the standard Android development model with spatial capabilities, allowing developers to write apps in Kotlin that render 2D UI panels in 3D space, display glTF models, handle spatial input, and integrate with Horizon OS features like passthrough, scene understanding, and hand tracking.

Unlike Unity or Unreal Engine, Spatial SDK builds on top of the Android Activity lifecycle. Applications are standard Android APKs that use Spatial SDK libraries to gain spatial rendering and interaction capabilities.

Key characteristics:

  • Kotlin-first: all application logic is written in Kotlin
  • Android-native: builds on standard Android Activity, Gradle, and Jetpack libraries
  • ECS architecture: entities, components, and systems manage 3D scene state
  • Panel rendering: Android UI frameworks (Jetpack Compose, Views) render as spatial panels
  • Gradle integration: Spatial SDK ships as AAR libraries pulled via Gradle dependencies

Key Concepts

Entity-Component-System (ECS)

The Spatial SDK uses an ECS architecture to manage the 3D scene graph. This separates data (components) from behavior (systems):

  • Entity: a lightweight identifier (ID) that groups components together. An entity has no behavior on its own.
  • Component: a data container attached to an entity. Components are defined via XML attribute schemas and hold typed fields (floats, vectors, references, enums). Examples: Transform, Mesh, Panel, Grabbable.
  • System: a Kotlin class that queries entities by their components and executes logic each frame. Systems extend SystemBase and override the execute() method.
// Example: a simple system that rotates all entities with a Spinner component
class SpinnerSystem : SystemBase() {
  override fun execute() {
    val query = Query.where { has(Spinner.id, Transform.id) }
    for (entity in query.eval()) {
      val transform = entity.getComponent<Transform>()
      val spinner = entity.getComponent<Spinner>()
      transform.rotation *= Quaternion.fromAxisAngle(Vector3.UP, spinner.speed * getDeltaTime())
      entity.setComponent(transform)
    }
  }
}

2D Panels

Panels are the primary way to display Android UI in spatial apps. A PanelRegistration maps a panel name to a Jetpack Compose composable or an Android View. Panels render as flat rectangles positioned in 3D space.

override fun registerPanels(): List<PanelRegistration> {
  return listOf(
    PanelRegistration("main_panel") {
      layoutParams = LayoutParams(592f, 592f, SpatialPanelLayoutParams.HORIZONTAL)
      panel {
        MainScreen()  // Jetpack Compose composable
      }
    }
  )
}

3D Objects

Load glTF models as meshes and place them in the scene using Transform and Mesh components:

val modelEntity = Entity.create()
modelEntity.setComponent(
  Mesh(Uri.parse("apk:///models/robot.glb"))
)
modelEntity.setComponent(
  Transform(Pose(Vector3(0f, 1f, -2f)))
)

Hybrid Apps

Spatial SDK excels at hybrid applications that combine 2D panels with 3D content. A single activity can display Android UI panels alongside 3D models, allowing users to interact with familiar 2D interfaces while surrounded by spatial content.

Activity Structure

For most Spatial SDK apps, keep one SpatialActivity subclass as the root shell for the whole experience. Tool-style apps usually work best when that single activity owns the scene, registered panels, and ECS systems while UI states change inside that shell.

Avoid structuring a Quest-native tool app like a standard multi-activity Android app unless you have a specific platform reason. Multiple panels or different UI states are usually better expressed inside the same spatial activity.

Scene

The Scene class manages the 3D environment, including the skybox, image-based lighting (IBL), viewer position, and the reference space. Each SpatialActivity has an associated scene.

Spatial Editor

The Spatial Editor is a visual tool (integrated into Android Studio via the Meta Horizon plugin) for composing 3D scenes. It produces .glxf files that define entity arrangements, panel placements, and 3D object positions. These files are loaded at runtime.

Quick Start

Prerequisites

  1. Android Studio with the Meta Horizon Android Studio Plugin installed
  2. Meta Spatial SDK dependencies added to your Gradle project
  3. A Meta Quest device connected via USB with developer mode enabled

Step-by-step

  1. Create a new project from the Spatial SDK template in Android Studio (or add Spatial SDK dependencies to an existing project).
  2. Define your activity by extending SpatialActivity:
class MyActivity : SpatialActivity() {

  override fun registerPanels(): List<PanelRegistration> {
    return listOf(
      PanelRegistration("home_panel") {
        layoutParams = LayoutParams(592f, 592f, SpatialPanelLayoutParams.HORIZONTAL)
        panel {
          HomeScreen()
        }
      }
    )
  }

  override fun registerSystems(): List<SystemBase> {
    return listOf(
      SpinnerSystem()
    )
  }

  override fun onSceneReady(scene: Scene) {
    super.onSceneReady(scene)
    scene.setViewerPosition(Vector3(0f, 0f, 0f))
    // Spawn panels and 3D objects here
    Entity.createPanelEntity("home_panel")
  }
}
  1. Add 3D content via the Spatial Editor or programmatically:
// Load a 3D model
val robot = Entity.create(
  Mesh(Uri.parse("apk:///models/robot.glb")),
  Transform(Pose(Vector3(0f, 0.5f, -1.5f)))
)
  1. Build and deploy to your connected Quest device using hzdb (invoke via npx -y @meta-quest/hzdb <args>):
# Build the APK via Gradle
./gradlew assembleDebug

# Install using hzdb
hzdb app install app/build/outputs/apk/debug/app-debug.apk

# Launch the app
hzdb app launch com.example.myspatialapp

# View logs
hzdb log

Architecture Overview

The high-level architecture of a Spatial SDK application:

Android Activity
  └── SpatialActivity
        ├── Scene (environment, lighting, viewer)
        ├── DataModel (entity-component store)
        │     ├── Entity: Panel ("home_panel")
        │     │     ├── Transform
        │     │     ├── PanelComponent
        │     │     └── Grabbable
        │     ├── Entity: 3D Object ("robot")
        │     │     ├── Transform
        │     │     └── Mesh
        │     └── Entity: Light
        │           ├── Transform
        │           └── PointLight
        ├── Systems
        │     ├── SpinnerSystem
        │     ├── IsdkSupportingSystems (input)
        │     └── PhysicsSystem
        └── PanelRegistrations
              └── "home_panel" → Jetpack Compose UI
  • SpatialActivity extends Android Activity and manages the Scene and DataModel lifecycle.
  • DataModel is the central ECS store where all entities and components live.
  • Scene configures the 3D environment (skybox, IBL, reference space).
  • Systems run each frame and operate on entities matching their queries.
  • PanelRegistrations bind panel names to UI content.

Gradle Dependencies

Add the Spatial SDK to your build.gradle.kts:

dependencies {
  implementation("com.meta.spatial:meta-spatial-sdk:latest")
  implementation("com.meta.spatial:meta-spatial-sdk-physics:latest")
  implementation("com.meta.spatial:meta-spatial-sdk-isdk:latest")
  implementation("com.meta.spatial:meta-spatial-sdk-mruk:latest")
}

Apply the Spatial SDK Gradle plugin for code generation:

plugins {
  id("com.meta.spatial.plugin") version "latest"
}

Manifest Configuration

Spatial SDK apps require specific manifest entries:

<uses-feature
  android:name="android.hardware.vr.headtracking"
  android:required="true" />

<!-- Include these when the app should launch and remain usable with hands,
     not only paired controllers. -->
<uses-feature
  android:name="oculus.software.handtracking"
  android:required="false" />
<uses-permission android:name="com.oculus.permission.HAND_TRACKING" />

<application>
  <activity
    android:name=".MyActivity"
    android:exported="true">
    <intent-filter>
      <action android:name="android.intent.action.MAIN" />
      <category android:name="android.intent.category.LAUNCHER" />
      <category android:name="com.oculus.intent.category.VR" />
    </intent-filter>
  </activity>
</application>

For panel or hybrid apps that should work without controllers, declare hand tracking support and make sure the experience handles switching between hands and controllers cleanly. Meta's VRC guidance applies to panel apps as well as immersive apps.

If your app needs to talk to a local development service over http:// or ws://, you may also need debug-only cleartext traffic settings or a network security config. Keep that scoped to development builds and prefer https:// and wss:// in release builds.

References

Skill References

  • Architecture Guide -- ECS model, custom components and systems, scene management, and activity lifecycle
  • Panels and 3D Objects -- 2D panel rendering, 3D object loading, hybrid app development
  • Interaction SDK -- Input handling, grabbables, hand tracking, controller input, haptics
  • Debugging -- Data Model Inspector, OVR Metrics Tool, logcat filtering, common issues

平台分布

Codex

34.95%
按下载量换算25

Claude

31.56%
按下载量换算22

Cursor

18.42%
按下载量换算13

Gemini CLI

8.83%
按下载量换算6

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/meta-quest/agentic-tools --skill hz-spatial-sdk 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills