
Spritekit
Implement SwiftUI-hosted SpriteKit mini-games with physics contacts, camera HUD, and texture atlas preloading using review-checklist-quality snippets.
Install
npx skills add https://github.com/dpearson2699/swift-ios-skills --skill spritekitWhat is this skill?
- Retain SKScene across SwiftUI body re-evaluation via @State SpriteView
- Configure physicsWorld.contactDelegate and distinct category, collision, and contactTest bit masks
- Queue contact mutations from didBegin through update to avoid mid-contact graph edits
- SKCameraNode for camera and HUD instead of shifting every world node
- SKTextureAtlas preloading including native async preload APIs
Adoption & trust: 1.2k installs on skills.sh; 713 GitHub stars; 3/3 security scanners passed (skills.sh audits).
Recommended Skills
Game Enginegithub/awesome-copilot
Godot Gdscript Patternswshobson/agents
Unity Ecs Patternswshobson/agents
Game Developerjeffallan/claude-skills
Game Developmentsickn33/antigravity-awesome-skills
Unity Developerrmyndharis/antigravity-skills
Journey fit
Common Questions / FAQ
Is Spritekit safe to install?
skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.
SKILL.md
READMESKILL.md - Spritekit
{ "skill_name": "spritekit", "evals": [ { "id": 1, "prompt": "Build a concise iOS 26 SpriteKit setup note for a SwiftUI mini-game. It needs an SKScene with player/enemy sprites, SpriteView integration, physics contacts for hits, a camera/HUD, and texture atlas preloading. Keep it as snippets and review checklist guidance, not a full Xcode project.", "expected_output": "A SpriteKit implementation note that uses a retained SpriteView scene, configures SKScene/SKView rendering, sets physics masks and contact delegate correctly, queues contact effects until update, uses SKCameraNode for camera/HUD, and preloads texture atlases with current SpriteKit APIs.", "files": [], "assertions": [ "Stores the SpriteKit scene so SwiftUI body re-evaluation does not recreate it, such as by using @State with SpriteView.", "Configures the scene in didMove(to:) and chooses a suitable scaleMode for the game layout.", "Sets physicsWorld.contactDelegate in didMove(to:) and configures categoryBitMask, collisionBitMask, and contactTestBitMask distinctly.", "Queues or flags contact effects in didBegin(_:) and applies node, body, or physics-world mutations later in update(_:) or an equivalent scene callback.", "Uses SKCameraNode for camera positioning and HUD attachment rather than moving every world node manually.", "Uses SKTextureAtlas preloading, including the native async preload API when showing async Swift code." ] }, { "id": 2, "prompt": "Review this SpriteKit advanced-effects plan: use withCheckedContinuation around SKTextureAtlas.preloadTextureAtlases, document u_sprite_size as a SpriteKit built-in shader variable, create one SKShader per enemy every spawn, and remove physics bodies from didBegin(_:) as soon as contacts happen. Correct the plan for current SpriteKit.", "expected_output": "A correction-focused review that uses SpriteKit's native async texture-atlas preload APIs, distinguishes SpriteKit built-in shader symbols from app-defined uniforms or attributes, recommends shader reuse and launch-time shader creation, and defers physics-world mutations out of contact callbacks.", "files": [], "assertions": [ "Replaces the withCheckedContinuation preload wrapper with native SpriteKit async APIs such as SKTextureAtlas.preloadTextureAtlasesNamed(_:) or preloadTextureAtlases(_:).", "Does not list u_sprite_size as a SpriteKit-provided built-in shader symbol; treats it as a custom uniform or attribute if needed.", "Names the actual SpriteKit shader built-ins relevant to the review, including u_texture, u_time, v_tex_coord, v_color_mix, v_path_distance or SKDefaultShading() where applicable.", "Recommends creating and sharing SKShader instances rather than compiling or changing shader source per spawned enemy.", "Explains that SKPhysicsContactDelegate callbacks run during physics simulation and physics-world/body mutations should be deferred." ] }, { "id": 3, "prompt": "I want one iOS game architecture note covering SpriteKit gameplay rendering, Game Center sign-in and leaderboards, SceneKit 3D cutscenes, TabletopKit board rules, and SharePlay voice chat. What belongs in SpriteKit and what should be handed to sibling frameworks?", "expected_output": "A boundary-aware architecture note that keeps SpriteKit focused on 2D rendering, animation, physics, particles, tile maps, camera, input, audio nodes, and SpriteView integration while handing Game Center, 3D SceneKit content, TabletopKit board/rules logic, and SharePlay sessions to sibling framework guidance.", "files": [], "assertions": [ "Keeps SpriteKit ownership to 2D scene rendering, node hierarchy, sprites, actions, physics, contacts, particles, tile maps, camera, input, SKAudioNode, and SpriteView integration.", "Routes Game Center authentication, access point, leaderboar