realitykit — Claude Code skill for iOS AR and 3D
A skill for building AR scenes with RealityKit and ARKit: RealityView, anchors, raycasts, gestures. Useful when your iOS app needs 3D content.
npx skills add dpearson2699/swift-ios-skills --skill realitykit -a claude-codeWhat realitykit does
The skill covers RealityKit and ARKit in one place: how to set up a RealityView, load entities and USDZ models, and tether an object to a plane or a world position. Raycasting gets its own section. The author separates two lookalike mechanisms: ray(through:in:to:) returns a camera ray in RealityKit coordinate spaces, while hitTest(point:in:query:mask:) hits entities made hittable by CollisionComponent. Intersecting a real surface takes an ARKit ARRaycastQuery plus ARSession.raycast(_:), then an anchor via AnchorEntity(raycastResult:). Mix those up and your object lands in empty space — worth checking before you test on a device.
Inside are sections on project setup, creating and loading entities, anchoring, gestures, scene understanding, along with a common mistakes list and a review checklist. Targets are Swift 6.3 and iOS 26+. Basic AR needs no extra entitlement, but Info.plist must carry NSCameraUsageDescription. Before showing AR UI, the skill advises checking ARWorldTrackingConfiguration.isSupported and keeping a fallback: content.camera = .virtual.
Entities follow ECS here, so behaviour and interactivity come from components — PhysicsBodyComponent, CollisionComponent, InputTargetComponent. Without the last one, a gesture on an entity does nothing.
What it helps with
- build an AR scene with RealityView in SwiftUI
- load a USDZ model and place it in the scene
- anchor an object to a floor or wall with AnchorEntity
- tell when to use hitTest versus an ARKit raycast
- add gestures and physics to entities through components
Example prompts for the agent
- Set up a RealityView screen and show a blue sphere 50cm in front of the camera
- Load the robot USDZ model and anchor it to a horizontal floor plane
- My entity ignores taps — check whether it has an InputTargetComponent
How to install realitykit
1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill realitykit -a claude-code2Manually: put the files in place
~/.claude/skills/realitykit/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/realitykit/
1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill realitykit -a codex2Manually: put the files in place
.agents/skills/realitykit/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill realitykit -a cursor2Manually: put the files in place
.cursor/skills/realitykit/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install dpearson2699/swift-ios-skills realitykit2Manually: put the files in place
.github/skills/realitykit/SKILL.md1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill realitykit -a gemini-cli2Platform CLI
gemini skills install https://github.com/dpearson2699/swift-ios-skills --path skills/realitykitManually: put the files in place
.devin/skills/realitykit/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill realitykit -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about realitykit
How do I install realitykit in Claude?
Run npx skills add dpearson2699/swift-ios-skills --skill realitykit -a claude-code. The skill file lands at ~/.claude/skills/realitykit/SKILL.md.
What does the realitykit skill do?
It covers iOS AR and 3D work: RealityView, loading entities and USDZ, anchoring, raycasting, gestures and scene understanding. A common mistakes section and a review checklist are included.
What do I need before using it?
Add NSCameraUsageDescription to Info.plist. Basic AR requires no extra entitlement, and you should check ARWorldTrackingConfiguration.isSupported before presenting AR UI.