android-xr-app-migration-skill
An agent skill for adapting an existing Android phone/tablet Jetpack Compose app for
Android XR headsets, using Compose for XR and SceneCore.
It comes from a real migration: porting Confetti, a Kotlin Multiplatform
conference app, to Android XR for a droidcon talk in October 2026. Only what worked on the XR emulator is in it, and
every API fact says which version it was checked on, when, and how (bytecode, build, emulator, a person looking, or
the docs).
What this skill does
Guides the agent through a migration in small, shippable steps:
Phone app (unchanged) Android XR headset
┌──────────────┐ ┌──────────┐ ┌──────────┐
│ list │ → │ list │ │ detail │ two SpatialPanels
│ detail (push)│ └──────────┘ └──────────┘
│ nav bar/rail │ (nav rail) (top bars) Orbiters
│ top bars │ environment · passthrough · 3D model · video
└──────────────┘
- Ground rules: verify every API before using it (Jetpack XR changes monthly), pin versions, keep phones and
Home Space unchanged, one demoable step at a time, a human checks anything visual.
- Day-1 pre-flight: versions, the Compose BOM, a manifest audit for features XR doesn't support, APK size, the
emulator, a baseline.
- The core path: build → manifest and a space toggle → list and detail as two panels → navigation as an Orbiter →
top bars as Orbiters (via identity-default hooks in shared code) → polish.
- Optional branches: environments and passthrough, a 3D tabletop, big models at real scale on the floor, video.
- A decision table: Compose for XR vs SceneCore, main panel vs
SpatialPanel vs Orbiter vs PanelEntity,
SpatialGltfModel vs GltfModelEntity, SurfaceEntity vs panel video, and why not Material for XR alpha17.
- Traps we hit: 19 one-liners with their fixes.
- How to verify a fact: release notes, Google Maven,
javap -v, and one-variable probe builds.
Skill contents
skills/android-xr-app-migration/SKILL.md: the guide.
skills/android-xr-app-migration/references/:
api-notes.md: verified signatures and behaviour, tagged by version, date and evidence; the renamed-API table;
what's unverified
emulator.md: setup, sizing, input, adb recipes, quirks and recoveries
navigation-patterns.md: list and detail panels, space transitions, Back order, hooks for shared code
3d-and-video.md: preparing assets, floor placement, hiding parts, life size, lighting, the two video routes
design-numbers.md: Material 3 for XR sizes, distances, elevation and accessibility numbers
How it was tested
Three realistic tasks, each run with and without the skill (Claude Opus, October 2026), graded against 37 checks
with quoted evidence:
| Task | With skill | Without skill |
|---|
| Port a KMP list/detail app (Decompose) to two panels, keeping phones and iOS unchanged | 15 / 15 | 7 / 15 |
| A Material for XR toggle crash plus blinking top bars | 10 / 10 | 10 / 10 |
A walk-in building: hiding floors, floor height, a black video, a deprecated dispose() | 12 / 12 | 4 / 12 |
Without the skill, the answers tended to reuse the stopped navigation stack, create an Orbiter per screen, hide
glTF parts by scaling nodes (which corrupts them), look for the floor with a hard-coded eye height, and blame a
black SurfaceEntity on the player. The skill's value is in those: things public docs don't say, or say wrongly.
Versions
Checked on androidx.xr.compose:compose:1.0.0-beta01 and androidx.xr.scenecore:scenecore:1.0.0-rc01
(runtime 1.0.0-rc01), on the "Google Play XR Preview API v4" emulator image, October 2026. The skill tells the
agent to re-verify against the current release notes before relying on any of it.
Installation
SKILL.md is an open standard: the skill works across all compatible agents. The only difference between tools is
the installation path.
Claude Code
/plugin marketplace add cmota/android-xr-app-migration-skill
/plugin install android-xr-app-migration@android-xr-app-migration-skill
GitHub Copilot
gh skills install cmota/android-xr-app-migration-skill android-xr-app-migration
Or manually: copy skills/android-xr-app-migration/ into .github/skills/ in your repo (project scope) or
~/.copilot/skills/ (user scope).
OpenAI Codex
$skill-installer install https://github.com/cmota/android-xr-app-migration-skill/tree/main/skills/android-xr-app-migration
Gemini CLI
gemini skills install https://github.com/cmota/android-xr-app-migration-skill.git --path skills/android-xr-app-migration
Scope