Claude-skill-registry arkit-visionos-developer
Build and debug ARKit features for visionOS, including ARKitSession setup, authorization, data providers (world tracking, plane detection, scene reconstruction, hand tracking), anchor processing, and RealityKit integration. Use when implementing ARKit workflows in immersive spaces or troubleshooting ARKit data access and provider behavior on visionOS.
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/arkit-visionos-developer" ~/.claude/skills/majiayu000-claude-skill-registry-arkit-visionos-developer && rm -rf "$T"
manifest:
skills/data/arkit-visionos-developer/SKILL.mdsource content
ARKit visionOS Developer
Description and Goals
This skill provides comprehensive guidance for implementing ARKit-powered features on visionOS. ARKit on visionOS uses
ARKitSession with data providers to access world tracking, hand tracking, plane detection, scene reconstruction, and other spatial data, which can then be bridged into RealityKit content.
Goals
- Enable developers to set up and manage ARKitSession on visionOS
- Guide proper authorization handling for ARKit data providers
- Help developers choose and configure appropriate data providers
- Support anchor processing and RealityKit integration
- Ensure proper lifecycle management of ARKit sessions
What This Skill Should Do
When implementing ARKit features on visionOS, this skill should:
- Guide ARKitSession setup - Help you create and manage long-lived ARKitSession instances
- Handle authorization - Show how to request and check authorization for required data types
- Select data providers - Help you choose the right providers (world tracking, hand tracking, plane detection, etc.)
- Process anchors - Demonstrate how to consume anchor updates and map them to RealityKit entities
- Manage lifecycle - Ensure proper session start/stop and task cancellation
- Bridge to RealityKit - Show how to integrate ARKit anchors with RealityKit content
Load the appropriate reference file from the tables below for detailed usage, code examples, and best practices.
Quick Start Workflow
- Add
andNSWorldSensingUsageDescription
toNSHandsTrackingUsageDescription
as needed.Info.plist - Ensure the experience runs in a Full Space (ARKit data is unavailable in Shared Space).
- Create a long-lived
and the data providers you need.ARKitSession - Request authorization for provider-required data types before running the session.
- Run the session with your providers and observe
streams.anchorUpdates - Map anchors to RealityKit entities and keep state in a model layer.
- Observe
for authorization changes and errors.ARKitSession.events - Stop the session and cancel tasks when leaving the immersive space.
Information About the Skill
Core Concepts
ARKitSession Lifecycle
- Keep a strong reference to the session; call
with providers, stop on teardown.run(_:) - Sessions stop automatically on deinit, so maintain references throughout the immersive experience.
Authorization
- Use
orrequestAuthorization(for:)
and handle denied states gracefully.queryAuthorization(for:) - Request authorization before running the session with providers that require it.
Data Providers
- Choose providers for world tracking, plane detection, scene reconstruction, and hand tracking based on the feature set.
- Providers expose
streams that you consume to process anchors.anchorUpdates
Anchors and Updates
- Consume provider
and reconcile added, updated, and removed anchors.anchorUpdates - Normalize anchor IDs to your own state model for reliable entity updates.
RealityKit Bridge
- Use
to inspect backing ARKit data on entities when needed.ARKitAnchorComponent - Treat ARKit streams as authoritative and keep rendering logic in RealityKit.
Implementation Patterns
- Prefer one session per immersive experience and reuse providers when possible.
- Normalize anchor IDs to your own state model for reliable entity updates.
- Treat ARKit streams as authoritative and keep rendering logic in RealityKit.
Provider References
| Provider | When to Use |
|---|---|
| When tracking device position and orientation in 3D space. |
| When tracking hand poses and gestures for interaction. |
| When detecting horizontal and vertical surfaces (floors, walls, tables). |
| When creating detailed 3D mesh reconstructions of the environment. |
| When tracking known images or reference objects. |
| When tracking 3D objects in the environment. |
| When tracking room boundaries and room-scale experiences. |
| When tracking Apple Vision Pro accessories. |
| When detecting and reading barcodes in the environment. |
| When accessing raw camera frames for custom processing. |
| When accessing camera frames from specific regions. |
| When estimating ambient lighting conditions. |
| When sharing coordinate spaces across multiple sessions. |
| When accessing stereo camera properties. |
General ARKit Patterns
| Reference | When to Use |
|---|---|
| When implementing ARKit session setup, authorization, and general provider patterns. |
Pitfalls and Checks
- Do not use
on visionOS; useARView
andRealityView
instead.ARKitSession - Do not expect ARKit data in Shared Space; use Full Space only.
- Do not block the main actor while awaiting provider updates.
- Do not drop session references; ARKit stops sessions on deinit.