Analyzes Meta VR and Horizon OS performance using Perfetto traces. Use when profiling frame drops, jank, CPU/GPU bottlenecks, render pass overhead, or thermal throttling on Quest devices.
Ships in Quest Core. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Use this skill when investigating VR performance issues on Meta VR devices:
These are the hard deadlines for each refresh rate. If a frame exceeds its target, the compositor must reproject or the user sees a stale frame.
| Refresh Rate | Frame Time Budget | Notes |
|---|---|---|
| 120 Hz | 8.3 ms | Supported on Quest 2, Quest 3, Quest 3S |
| 90 Hz | 11.1 ms | Supported on Quest 2, Quest Pro, Quest 3, Quest 3S |
| 72 Hz | 13.9 ms | Default on all Quest devices |
| 60 Hz | 16.7 ms | Media apps only (Quest 2); interactive apps must use 72 Hz+ |
Missing a frame deadline by even 1 ms causes a stale frame (reprojection). Stale frames above 10% of total frames indicate a serious performance problem.
Perfetto tracing is powered by the metavr CLI — install the standalone binary on your PATH (see the metavr-cli skill), or invoke via npx with no install:
metavr --version
Examples below use the bare metavr command; if you use the npm distribution, prefix with npx -y. Connect your Meta VR device via USB with developer mode enabled before capturing traces.
# Capture a 5-second trace from the currently running VR app
metavr perf capture
# Specify duration and target app
metavr perf capture --duration 10000 --app com.example.myapp
# Enable GPU render stage tracing for detailed pass analysis
metavr perf capture --gpu-render-stage
# Enable XR runtime metrics
metavr perf capture --xr-runtime
# Custom output name
metavr perf capture -o my-session-name
The capture auto-detects the foreground VR app if --app is not specified. CPU scheduling and GPU metrics tracing are enabled by default. The trace is pulled to your local machine automatically.
metavr perf traces
Returns .pftrace files sorted by modification time (newest first). Searches standard directories including ~/Documents, ~/Downloads, and the current working directory.
metavr perf load <trace-file>
Loads and processes the trace for analysis. Accepts a hex session ID, filename (with or without .pftrace extension), or a full/relative path.
metavr perf context
Returns a structured performance analysis including:
metavr perf query <session-id> "SELECT ts, dur, name FROM slice WHERE name LIKE '%PlayerLoop%' LIMIT 20"
Executes arbitrary SQL against the loaded Perfetto trace database. All Perfetto tables are available: slice, thread_track, thread, process, counter, counter_track, args, sched_slice, and more.
metavr perf thread-state <session-id> <utid>
# With time range
metavr perf thread-state <session-id> <utid> --start-ts 1000000 --end-ts 5000000000
Returns a thread state breakdown showing how much time the thread spent running, sleeping, blocked, or waiting for CPU. Useful for identifying whether a thread is CPU-bound, I/O-bound, or starved.
metavr perf gpu-counters <session-id> --start-ts 100,200,300 --end-ts 150,250,350
Returns GPU metric counters (mean, standard deviation, quantiles) for GPU frame ranges. Requires at least 20 frames for statistical accuracy. Metrics include texture fetch rates, shader ALU capacity, vertex processing, and fragment shading statistics.
Follow these steps in order for a thorough performance investigation.
Before analyzing, confirm the trace is usable:
SELECT
(MAX(ts) - MIN(ts)) / 1e9 AS duration_seconds,
COUNT(*) AS total_slices
FROM slice
If the trace has fewer than 1000 slices or is under 1 second, it may not contain enough data for meaningful analysis. Capture a new trace with metavr perf capture.
Find the application process (not system services):
SELECT upid, pid, name
FROM process
WHERE name NOT LIKE 'com.oculus%'
AND name NOT LIKE '/system%'
AND name NOT LIKE 'com.android%'
AND name IS NOT NULL
ORDER BY pid
For known apps, filter directly by package name.
Look for engine-specific markers:
| Engine | Key Markers |
|---|---|
| Unity | PlayerLoop, UnityMain, PhaseSync, PostLateUpdate.FinishRendering |
| Unreal | UGameEngine::Tick, FEngineLoop::Tick, RHI Thread |
| Native OpenXR | xrWaitFrame, xrBeginFrame, xrEndFrame without engine markers |
Identify the threads that matter for VR rendering:
SELECT t.utid, t.tid, t.name, p.name AS process_name
FROM thread t
JOIN process p USING(upid)
WHERE p.name = '<target-process>'
ORDER BY t.name
Critical threads to locate:
| Thread | Purpose |
|---|---|
| Main thread (UnityMain / GameThread) | Game logic, physics, scripts |
| Render thread (UnityGfx / RenderThread) | Draw call submission |
| GPU completion (GPU completion / RHI Thread) | GPU fence waiting |
| Worker threads (Job.Worker / TaskGraph) | Parallel workloads |
Once you have a thread's utid, use metavr perf thread-state <session-id> <utid> to get a quick breakdown of its running/sleeping/blocked time.
Find frame start/end markers to segment per-frame analysis:
PlayerLoop slices on the main thread define frame boundariesFEngineLoop::Tick slices on the game threadxrWaitFrame to xrEndFrame sequencesFind what consumes the most time per frame:
SELECT name, COUNT(*) AS call_count, SUM(dur)/1e6 AS total_ms, AVG(dur)/1e6 AS avg_ms
FROM slice
WHERE track_id IN (
SELECT id FROM thread_track WHERE utid = <main_thread_utid>
)
GROUP BY name
ORDER BY total_ms DESC
LIMIT 20
Functions called excessively per frame can indicate batching issues:
SELECT name, COUNT(*) AS calls
FROM slice
WHERE track_id IN (
SELECT id FROM thread_track WHERE utid = <utid>
)
AND dur < 100000
GROUP BY name
HAVING calls > 1000
ORDER BY calls DESC
See the GPU analysis reference for detailed render pass breakdown, surface analysis, and GPU counter interpretation.
| Concept | Description |
|---|---|
| Slice | A timed span of execution (function call, frame, render pass). Has ts (start), dur (duration), name, and track_id. |
| Track | A timeline lane. Thread tracks hold slices for a specific thread. Counter tracks hold metric values over time. |
| Thread (utid) | Unique thread ID within the trace. Use utid (not tid) for joins — tid can be reused. |
| Process (upid) | Unique process ID within the trace. Use upid (not pid) for joins. |
| Timestamps | All timestamps are in nanoseconds. Divide by 1e6 for milliseconds, 1e9 for seconds. |
| Counter | A time-series metric (GPU utilization, clock frequency, temperature). Stored in the counter table. |
| Args | Key-value metadata attached to slices. Accessed via the args table joined on arg_set_id. |
| Metric | Target | Warning | Critical |
|---|---|---|---|
| Frame time (90 Hz) | < 11.1 ms | > 11.1 ms | > 16.7 ms |
| Stale frame rate | < 5% | > 10% | > 25% |
| Main thread utilization | < 80% of budget | > 80% | > 95% |
| GPU utilization | < 85% of budget | > 85% | > 95% |
| Frame variance (std dev) | < 1 ms | > 2 ms | > 4 ms |
| Draw calls per frame | < 100 | > 200 | > 500 |
PlayerLoop. This is normal and intentional — do NOT flag as wasted time.SetPass call counts, which indicate materials are not being batched.UObject::ProcessEvent. High counts indicate Blueprints should be converted to C++.__StaticExec suffix in trace names.surface#0 are not descriptive — correlate them with the resolution and MSAA level to identify what they render.UnityMain may appear as UnityMai or similar.utid (not tid) when joining thread-related tables in SQL queries.For detailed guides on specific topics, see:
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
perfetto, meta-vr, horizon-os, quest, frame-timing, gpu-bottleneck
/quest-core:hz-perfetto-debugfrom Quest Core
npx claudepluginhub mirzaaghazadeh/unity-meta-quest-skills --plugin quest-core27 skills in this plugin
/horizon-launch-roadmapPlan and sequence a Unity Meta Quest game launch on the Meta Horizon Store: which skill to use at each phase, the irreversible decisions (package name, signing key, Early Access, pre-order and Coming Soon windows, Data Use Checkup auto-approval, Meta VR Glasses input and targeting), and a dated timeline counting back from launch day (Coming Soon up to 360 days, pre-orders up to 90 days, submit at least 2 weeks ahead, release date at least 14 days out), plus post-launch growth tools (alerts, price A/B tests, Try Before You Buy). Use when the user asks "how do I publish my Quest game", "what's the release process", "plan my launch", "when should I submit", "can I do early access / pre-orders", "should I support Meta VR Glasses", or starts a new Quest game meant for the store./horizon-store-listing-assetsPrepare and validate a Meta Horizon Store product listing for a Quest game: exact art specs (covers, Hero, Logo, Icon, Spatialized tile, screenshots, trailer, 360 preview), asset VRCs, metadata limits, specs (play area, input, comfort), age group and IARC rating, privacy policy and Data Use Checkup, pricing, price A/B tests, Try Before You Buy, sales, bundles, promo codes, keys, Early Access, Coming Soon, pre-orders, Store analytics and alerts, and what Meta VR Glasses change. Use when the user asks for "store assets", "cover art size", "hero image dimensions", "screenshots for the Horizon Store", "trailer requirements", "store description", "age rating / IARC", "privacy policy for my Quest app", "set the price", "A/B test my price", "free trial", "run a sale", "generate keys", "early access", or "store analytics". Replaces the asset table in Meta's hz-store-submit, which has wrong dimensions and limits.3 plugins ship this exact skill · first indexed Sep 24, 2026
Other plugins' skills for the same job