SceneKit Game Workflow
SwiftData And SwiftUI Rule
When a task combines SwiftData with SwiftUI, keep SwiftData directly coupled to SwiftUI through Apple's data-driven path: modelContainer, environment modelContext, @Query, SwiftData model objects, and bindings. Do not add repositories, stores, service layers, DTO mirrors, view-model caches, wrapper objects, or other abstraction layers between SwiftData and SwiftUI. If this skill is not the right owner for SwiftData-backed SwiftUI work, hand off to apple-dev-skills:swiftui-app-architecture-workflow instead of inventing an intermediate data layer.
Overview
Use this skill for game-specific SceneKit work after SceneKit has been chosen or when maintaining an existing SceneKit project. Keep generic Apple app lifecycle, project-integrity mechanics, and Swift source cleanup with their owner skills.
Source Check
Use Xcode MCP DocumentationSearch, Xcode-local documentation, Dash Apple API Reference docsets, or readable official Apple documentation before making SceneKit-specific claims. Generic no-JS web search/open results, snippets, metadata shells, or bare Apple Developer URLs are not enough evidence that Apple docs were read:
When new work is really modern 3D, spatial, or visionOS game work, consider RealityKit before deepening SceneKit-specific architecture. When maintaining an existing SceneKit project, preserve SceneKit unless the user asks for a migration.
Workflow
- Inspect the SceneKit surface:
import SceneKit
SCNScene, SCNView, SCNNode, SCNCamera, SCNLight, SCNMaterial, SCNGeometry, SCNPhysicsWorld, SCNPhysicsBody, animation players, and delegates
.scn, .scnassets, .dae, .obj, .usdz, textures, normal maps, environment maps, and animation assets
- host SwiftUI/AppKit/UIKit views and project-resource membership
- Keep the scene graph readable:
- Name node ownership explicitly.
- Keep camera, lighting, physics, material, and asset-loading changes close to the scene or game subsystem that owns them.
- Avoid opaque node-name lookups for core gameplay unless the existing project already uses them deliberately.
- Choose migration posture:
- Maintain SceneKit for existing projects when the request is repair, content, performance, or incremental gameplay work.
- Consider RealityKit when the request is new spatial or visionOS-first work, entity-component design, or an explicit SceneKit-to-RealityKit migration.
- Consider Metal only when the work needs custom rendering or shader-level ownership beyond SceneKit's model.
- Validate honestly:
- Build and run through the repo's Xcode workflow.
- Inspect visual behavior in a running app, simulator, device, screenshot, or recording when possible.
- Use Instruments or
xctrace handoffs for frame pacing, CPU/GPU timing, memory, or asset-loading performance.
Handoffs
choose-apple-game-stack when SceneKit versus RealityKit versus Metal is still unclear.
gameplaykit-simulation-workflow when entity-component modeling, state machines, pathfinding, agents, randomization, or simulation update order owns the work.
xcode-game-profiling-workflow when SceneKit frame pacing, CPU/GPU overlap, material/asset cost, memory pressure, or trace evidence owns the work.
game-controller-input-workflow for controller, keyboard, mouse, and virtual-controller input.
core-haptics-game-feedback-workflow for haptic feedback.
apple-dev-skills:xcode-build-run-workflow for project membership, schemes, build, run, resources, and simulator mechanics.
apple-dev-skills:xcode-testing-workflow for XCTest, UI tests, Instruments, xctrace, and trace interpretation.
Output Shape
Return the SceneKit owner, changed or planned scene/assets, migration posture, validation path, and any manual visual, hardware, or profiling checks still required.
1---2name: scenekit-game-workflow3description: Guide SceneKit game implementation, repair, and maintenance. Use when Codex works on SCNScene, SCNView, SCNNode, cameras, lights, materials, geometry, animation, 3D physics, .scn files, .scnassets, model assets, SceneKit and SwiftUI/AppKit/UIKit integration, or RealityKit migration handoffs.4---56# SceneKit Game Workflow78## SwiftData And SwiftUI Rule910When a task combines SwiftData with SwiftUI, keep SwiftData directly coupled to SwiftUI through Apple's data-driven path: `modelContainer`, environment `modelContext`, `@Query`, SwiftData model objects, and bindings. Do not add repositories, stores, service layers, DTO mirrors, view-model caches, wrapper objects, or other abstraction layers between SwiftData and SwiftUI. If this skill is not the right owner for SwiftData-backed SwiftUI work, hand off to `apple-dev-skills:swiftui-app-architecture-workflow` instead of inventing an intermediate data layer.1112## Overview1314Use this skill for game-specific SceneKit work after SceneKit has been chosen or when maintaining an existing SceneKit project. Keep generic Apple app lifecycle, project-integrity mechanics, and Swift source cleanup with their owner skills.1516## Source Check1718Use Xcode MCP `DocumentationSearch`, Xcode-local documentation, Dash Apple API Reference docsets, or readable official Apple documentation before making SceneKit-specific claims. Generic no-JS web search/open results, snippets, metadata shells, or bare Apple Developer URLs are not enough evidence that Apple docs were read:1920- [SceneKit](https://developer.apple.com/documentation/scenekit)21- [SCNScene](https://developer.apple.com/documentation/scenekit/scnscene)22- [SCNNode](https://developer.apple.com/documentation/scenekit/scnnode)23- [Bringing your SceneKit projects to RealityKit](https://developer.apple.com/documentation/realitykit/bringing-your-scenekit-projects-to-realitykit)2425When new work is really modern 3D, spatial, or visionOS game work, consider RealityKit before deepening SceneKit-specific architecture. When maintaining an existing SceneKit project, preserve SceneKit unless the user asks for a migration.2627## Workflow28291. Inspect the SceneKit surface:30 - `import SceneKit`31 - `SCNScene`, `SCNView`, `SCNNode`, `SCNCamera`, `SCNLight`, `SCNMaterial`, `SCNGeometry`, `SCNPhysicsWorld`, `SCNPhysicsBody`, animation players, and delegates32 - `.scn`, `.scnassets`, `.dae`, `.obj`, `.usdz`, textures, normal maps, environment maps, and animation assets33 - host SwiftUI/AppKit/UIKit views and project-resource membership342. Keep the scene graph readable:35 - Name node ownership explicitly.36 - Keep camera, lighting, physics, material, and asset-loading changes close to the scene or game subsystem that owns them.37 - Avoid opaque node-name lookups for core gameplay unless the existing project already uses them deliberately.383. Choose migration posture:39 - Maintain SceneKit for existing projects when the request is repair, content, performance, or incremental gameplay work.40 - Consider RealityKit when the request is new spatial or visionOS-first work, entity-component design, or an explicit SceneKit-to-RealityKit migration.41 - Consider Metal only when the work needs custom rendering or shader-level ownership beyond SceneKit's model.424. Validate honestly:43 - Build and run through the repo's Xcode workflow.44 - Inspect visual behavior in a running app, simulator, device, screenshot, or recording when possible.45 - Use Instruments or `xctrace` handoffs for frame pacing, CPU/GPU timing, memory, or asset-loading performance.4647## Handoffs4849- `choose-apple-game-stack` when SceneKit versus RealityKit versus Metal is still unclear.50- `gameplaykit-simulation-workflow` when entity-component modeling, state machines, pathfinding, agents, randomization, or simulation update order owns the work.51- `xcode-game-profiling-workflow` when SceneKit frame pacing, CPU/GPU overlap, material/asset cost, memory pressure, or trace evidence owns the work.52- `game-controller-input-workflow` for controller, keyboard, mouse, and virtual-controller input.53- `core-haptics-game-feedback-workflow` for haptic feedback.54- `apple-dev-skills:xcode-build-run-workflow` for project membership, schemes, build, run, resources, and simulator mechanics.55- `apple-dev-skills:xcode-testing-workflow` for XCTest, UI tests, Instruments, `xctrace`, and trace interpretation.5657## Output Shape5859Return the SceneKit owner, changed or planned scene/assets, migration posture, validation path, and any manual visual, hardware, or profiling checks still required.