Hz Store Pwa 标志

Hz Store Pwa

组织
meta-quest
hz-store-pwa

Guides shipping a web app to the Meta Quest and Horizon OS Store as a PWA/TWA — both 2D windowed panels and immersive WebXR/VR. Covers building the web app (IWSDK for WebXR, any responsive PWA for 2D), Vercel deploy, web app manifest + icons, the WebXR-only auto-enter-session step, choosing 2D vs immersive mode in @meta-quest/bubblewrap-cli, keystore/Digital-Asset-Links, and ovr-platform-util Store upload. Use before any IWSDK/WebXR build, PWA packaging, bubblewrap, or Horizon Store upload work.

Add to TypingMind

概览

发布者meta-quest
代码仓库agentic-tools
技能名称hz-store-pwa
星标数
195
复刻数
17
附带文件
6
许可协议Apache-2.0
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 6 个附带文件

    模型执行任务时可读取的脚本、模板和参考资料。这些文件为只读文件,绝不会被执行。

  • 开源

    由 meta-quest 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Hz Store Pwa AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/meta-quest/agentic-tools/tree/main/skills/hz-store-pwa
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/meta-quest/agentic-tools.git /tmp/agentic-tools
mkdir -p .claude/skills
cp -r /tmp/agentic-tools/skills/hz-store-pwa .claude/skills/hz-store-pwa
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Hz Store Pwa,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Hz Store Pwa。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Hz Store Pwa 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

Store PWA/TWA Skill

Guide the end-to-end process of wrapping a web app as a Meta Quest app and shipping it to the Meta Horizon Store. This skill covers both delivery modes — a 2D windowed panel and an immersive WebXR/VR experience — through the same pipeline: build the web app, deploy to Vercel, add a PWA manifest + icons, package as a signed Quest APK with @meta-quest/bubblewrap-cli, and upload with ovr-platform-util.

Commands use <…> tokens (e.g. <DOMAIN>, <HORIZON_APP_ID>, <team-slug>, <PW>) — substitute your own values before running.

When to Use This Skill

Use this skill when you need to:

  • Ship a web app (2D or WebXR) to the Meta Horizon Store as a PWA/TWA
  • Decide whether an app should run as a 2D panel or an immersive WebXR session
  • Build a WebXR app with IWSDK and wire up auto-enter-session for the installed PWA
  • Deploy a PWA to Vercel and produce a valid, installable web app manifest + icons
  • Package a live PWA into a signed Quest APK with @meta-quest/bubblewrap-cli
  • Configure the signing keystore and Digital Asset Links so the TWA will launch
  • Upload a build to the Store with ovr-platform-util
  • Troubleshoot a 2D app stuck loading, an immersive app showing a URL bar, a TWA that won't launch, or an upload that's blocked

For deeper IWSDK app-building guidance, see the hz-iwsdk-webxr skill. For the broader Store submission process (VRC compliance, store assets, review tracking), see the hz-store-submit skill.

Pipeline Overview

The full pipeline follows this order. The two mode-specific deltas are flagged; all other steps are identical for 2D and immersive.

0. Pick app mode        → 2D panel vs immersive WebXR (sets steps 1 + 4)
1. Build the web app    → IWSDK WebXR app (immersive) OR any responsive PWA (2D)
2. Deploy to Vercel     → public HTTPS origin = <DOMAIN>
3. Manifest + icons     → installable web app manifest, PNG icons, live on <DOMAIN>
4. Package as APK       → bubblewrap: keystore, twa-manifest, build, asset links
5. Upload to the Store  → ovr-platform-util upload-quest-build

Dependencies between steps matter — see Order of Operations at the end.

Step 0: Pick the App Mode First

The app mode is the single most important decision, chosen once. It changes exactly two things downstream:

  1. Whether the web app auto-enters a WebXR session on launch (immersive only).
  2. The horizonOSAppMode value in twa-manifest.json ("immersive" vs "2D").
2D PWAImmersive WebXR PWA
Runs aswindowed 2D panel on Horizonenters a full VR/WebXR session
Web appany responsive PWA (IWSDK optional)WebXR app (IWSDK is the easy path)
Auto-enter requestSessionNO — do not add it (Step 1)YES — built into the app (Step 1)
horizonOSAppMode"2D" (Step 4)"immersive" (Step 4)

A wrong horizonOSAppMode value is the classic failure mode: a 2D app set to immersive is stuck loading; an immersive app set to 2D shows a browser URL bar.

See references/app-modes.md for the full decision guide.

Step 1: Build the Web App

Immersive WebXR app (IWSDK)

Scaffold with @iwsdk/create (the only supported scaffolder):

bash
npx @iwsdk/create@latest <app-name> --yes --mode vr --no-metaspatial \
  --no-physics --no-locomotion --grabbing

Toggle --physics (Havok gravity/collisions), --locomotion (roam a large space), and --grabbing (hands/controllers pick objects up) to fit the app. For arcade-style apps prefer deterministic manual motion over physics.

Don't reinvent IWSDK app code. The template's bundled CLAUDE.md, .claude/skills/iwsdk-* skills, and the iwsdk-rag MCP are the source of truth for imports, ECS, XR input, physics, UI, and debugging. Query those rather than guessing.

Build auto-enter into the immersive app from the start. An installed immersive PWA opens with no 2D page, so the app itself must start the session on load (the app-icon tap is the user activation). Gate it on getDigitalGoodsService so it runs only in the installed PWA, never a browser tab:

ts
const nav = navigator as Navigator & { xr?: { isSessionSupported?: (m:string)=>Promise<boolean> } };
if ("getDigitalGoodsService" in window && nav.xr?.isSessionSupported) {
  nav.xr.isSessionSupported("immersive-vr")
    .then(s => { if (s) world.launchXR(); })   // IWSDK launchXR == requestSession + setup
    .catch(() => {});
}

getDigitalGoodsService is device-only — validate this path on the headset.

2D windowed app

Any responsive web app/PWA works — IWSDK is not required. It runs as a single- instance standalone panel with its own Library entry. Make sure it's a valid installable PWA (Step 3) and build/deploy it like any static/SPA site (Step 2). Do NOT add the auto-enter code above.

Full scaffolding flags, project layout, and the auto-enter rationale are in references/app-modes.md.

Step 2: Deploy to Vercel

The web app must be live on a public HTTPS origin before packaging — bubblewrap fetches the manifest and icons from it. Set base: "./" in your Vite config, then:

bash
npx -y vercel@latest whoami
npx -y vercel@latest teams ls
npx -y vercel@latest deploy --prod --yes --scope <team-slug>

Two URLs result:

  • Canonical alias https://<project>.vercel.app → public (200). Use this as <DOMAIN> everywhere downstream.
  • Hashed per-deploy URL …-<team>.vercel.app → 401 under deployment protection. Not for sharing, not usable as <DOMAIN>.

Verify the root and manifest both return 200, and that the manifest is served as application/manifest+json:

bash
curl -s -o /dev/null -w "%{http_code}\n" https://<DOMAIN>/manifest.webmanifest

See references/vercel-deploy.md for details and the redeploy-vs-rebuild rule.

Step 3: PWA Manifest + Icons

Both modes need a valid, installable manifest and PNG icons, live on <DOMAIN> before bubblewrap update runs. Place public/manifest.webmanifest:

json
{ "name":"…","short_name":"…","description":"…","start_url":"/","scope":"/",
  "display":"standalone","orientation":"landscape",
  "background_color":"#06010f","theme_color":"#0a0418",
  "icons":[
    {"src":"/icons/icon-192.png","type":"image/png","sizes":"192x192","purpose":"any"},
    {"src":"/icons/icon-512.png","type":"image/png","sizes":"512x512","purpose":"any"},
    {"src":"/icons/icon-512-maskable.png","type":"image/png","sizes":"512x512","purpose":"maskable"}]}

Link it in index.html <head> (<link rel="manifest"> + <meta name="theme-color">

  • <link rel="icon">). For multi-origin 2D apps, add additional_trusted_origins and host asset links on each origin.

There's no ImageMagick/PIL here — generate icons with sharp (npm i -D sharp) from an SVG. The maskable icon must be full-bleed and opaque (no transparency or rounded corners). Vite copies public/ into dist/.

See references/manifest-and-icons.md for the icon script and the full manifest reference.

Step 4: Package as a Quest APK (bubblewrap)

bubblewrap wraps the live PWA into a signed Android APK (a Trusted Web Activity).

bash
npm i -g @meta-quest/bubblewrap-cli   # bin: bubblewrap

Prereqs are pre-provisioned in ~/.bubblewrap (its own JDK 17 + Android SDK). Find the tools dynamically:

bash
KT=$(find ~/.bubblewrap/jdk -path '*/bin/keytool' | head -1)
BT=$(ls -d ~/.bubblewrap/android_sdk/build-tools/* | sort -V | tail -1)

bubblewrap init uses an interactive inquirer wizard that needs a real TTY. A non-TTY caller (an agent driving Bash) can't answer it and there are no value flags to bypass it — use the scripted path below.

  1. Signing keystore — pause and ask the developer which key to use before building. The key is permanent: every future update must reuse it. Either reuse an existing keystore (ask for its path, alias, and passwords — required when updating a published app) or generate a new one outside the deployable web tree.

  2. twa-manifest.json (scripted path) — author it from the authoritative TwaManifest schema. The critical field:

    json
    "horizonOSAppMode": "immersive"   // ← "immersive" for WebXR | "2D" for a 2D panel app

    A wrong value is the classic failure mode (Step 0). applicationId = numeric Horizon App ID ("0" builds & sideloads without IAP; set the real id before Store work).

  3. Build — update regenerates gradle and bumps version; passwords go via env vars (no password CLI flags exist):

    bash
    cd <twa-dir>
    export BUBBLEWRAP_KEYSTORE_PASSWORD=<PW> BUBBLEWRAP_KEY_PASSWORD=<PW>
    bubblewrap update && bubblewrap build
    # → app-release-signed.apk + app-release-bundle.aab
    "$BT/apksigner" verify --print-certs app-release-signed.apk | grep -i SHA-256  # must == keystore
  4. Digital Asset Links — a TWA "will not launch" if this fails. Host public/.well-known/assetlinks.json on the same domain (and every trusted origin), with the package name and the colon-hex cert SHA-256. Redeploy, then curl https://<DOMAIN>/.well-known/assetlinks.json to confirm.

Security: the keystore and app secret NEVER go to the public host — verify with curl -o /dev/null -w "%{http_code}" https://<DOMAIN>/android.keystore (expect 404). Back up the keystore.

Full keystore handling, the complete twa-manifest.json template, build verification, and asset-link details are in references/bubblewrap-packaging.md.

Step 5: Upload to the Meta Horizon Store

hzdb / metavr are device-only and cannot upload. Use ovr-platform-util — the same command works for 2D and WebXR builds:

bash
./ovr-platform-util upload-quest-build \
  --app-id <HORIZON_APP_ID> --app-secret <SECRET> \
  --apk app-release-signed.apk \
  --channel ALPHA --age-group MIXED_AGES \
  --notes "…" --disable-progress-bar

Required: --app-id, --apk, --channel, --age-group (TEENS_AND_ADULTS | MIXED_AGES | CHILDREN), and --app-secret or --token. Channels: ALPHA/BETA/RC for testing, STORE for production. Auth is the app's App Secret (Dashboard → app → API tab) or a user token — ask the user, never invent it.

Likely first-time blocker: must first agree to our Developer Distribution Agreement — an org admin must sign it once at https://developer.oculus.com/manage/organizations/<ORG_ID>/legal-documents/. Pause, ask the user, then retry the same command.

See references/store-upload.md for tool download, auth, and the DDA blocker.

Order of Operations

  • Decide 2D vs immersive up front (Step 0) — it sets the auto-enter step (Step 1, WebXR-only) and the horizonOSAppMode value (Step 4).
  • Manifest + icons must be LIVE before bubblewrap update — it fetches them from <DOMAIN>.
  • Asset links must be live before the TWA will launch — on every trusted origin.
  • Web-only fixes need only a Vercel redeploy — the installed TWA picks them up on the next launch. Rebuild and re-upload the APK only for native changes (id, name, icon, version, app mode, packaging).

Gotchas

  • horizonOSAppMode mismatch is the #1 failure — "2D" set to immersive hangs on a loading screen; "immersive" set to 2D shows a URL bar. Fix the value and rebuild.
  • The signing key is permanent — every update must reuse the same keystore, alias, and packageId. A lost keystore means a new app entry. Back it up, and keep it outside the deployable web tree.
  • bubblewrap init needs a TTY — agents must use the scripted path (hand-written twa-manifest.json + update + build).
  • Auto-enter is immersive-only — never add the launchXR() snippet to a 2D app, and always gate it on getDigitalGoodsService so it doesn't fire in a browser tab.
  • getDigitalGoodsService is device-only — auto-enter can't be validated in a desktop browser or emulator; test on the headset.
  • Use the canonical Vercel alias — the hashed per-deploy URL returns 401 under deployment protection and can't be used as <DOMAIN>.
  • The maskable icon must be full-bleed and opaque — transparency or rounded corners produce visible artifacts after the platform applies its mask.
  • Asset links gate launch — a TWA "will not launch" until /.well-known/assetlinks.json is live with a matching package name and cert SHA-256.
  • DDA blocks the first upload — only an org admin can sign it; it's the most common first-time upload failure.

References

  • App Modes: 2D vs Immersive — decision guide, IWSDK scaffolding, project layout, and the auto-enter-session rationale.
  • Vercel Deployment — Vite config, deploy commands, the canonical-vs-hashed URL distinction, and the redeploy-vs-rebuild rule.
  • PWA Manifest + Icons — full manifest reference, multi-origin setup, and the sharp icon-generation script.
  • Bubblewrap Packaging — keystore handling, twa-manifest.json template, build verification, asset links, and security.
  • Store Upload — ovr-platform-util download, auth, the upload command, and the Developer Distribution Agreement blocker.
  • Troubleshooting — common failure modes across the whole pipeline and how to fix them.

附带文件

技能加载后,模型会按需读取这些文件。它们仅作为可读文件提供,绝不会被执行。

常见问题

Hz Store Pwa AI 技能有什么作用?

Guides shipping a web app to the Meta Quest and Horizon OS Store as a PWA/TWA — both 2D windowed panels and immersive WebXR/VR. Covers building the web app (IWSDK for WebXR, any responsive PWA for 2D), Vercel deploy, web app manifest + icons, the WebXR-only auto-enter-session step, choosing 2D vs immersive mode in @meta-quest/bubblewrap-cli, keystore/Digital-Asset-Links, and ovr-platform-util Store upload. Use before any IWSDK/WebXR build, PWA packaging, bubblewrap, or Horizon Store upload work.

为什么在 TypingMind 中使用 Hz Store Pwa?

因为您只需安装一次,就能搭配任何模型使用。Hz Store Pwa 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Hz Store Pwa?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/meta-quest/agentic-tools/tree/main/skills/hz-store-pwa。TypingMind 会读取其中的 SKILL.md,打包相关文件,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Hz Store Pwa?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Hz Store Pwa 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Hz Store Pwa 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Hz Store Pwa AI 技能免费吗?

是的。meta-quest 已在 GitHub 上根据 Apache-2.0 许可证发布了该技能。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇