Confirm successful installation by checking the skill directory location:
.cursor/skills/axiom-spritekit-diag
Restart Cursor to activate axiom-spritekit-diag. Access via /axiom-spritekit-diag in your agent's command palette.
β
Security Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
If showsPhysics doesn't show expected physics body outlines, your physics bodies aren't configured correctly. Stop and fix bodies before debugging contacts.
For SpriteKit architecture patterns and best practices, see axiom-spritekit. For API reference, see axiom-spritekit-ref.
Symptom 1: Physics Contacts Not Firing
Time saved: 30-120 min β 2-5 min
didBegin(_:) never called
β
ββ Is physicsWorld.contactDelegate set?
β ββ NO β Set in didMove(to:):
β physicsWorld.contactDelegate = self
β β This alone fixes ~30% of contact issues
β
ββ Does the class conform to SKPhysicsContactDelegate?
β ββ NO β Add conformance:
β class GameScene: SKScene, SKPhysicsContactDelegate
β
ββ Does body A have contactTestBitMask that includes body B's category?
β ββ Print: "A contact: \(bodyA.contactTestBitMask), B cat: \(bodyB.categoryBitMask)"
β ββ Result should be: (A.contactTestBitMask & B.categoryBitMask) != 0
β ββ FIX: Set contactTestBitMask to include the other body's category
β player.physicsBody?.contactTestBitMask = PhysicsCategory.enemy
β
ββ Is categoryBitMask set (not default 0xFFFFFFFF)?
β ββ Default category means everything matches β but in unexpected ways
β ββ FIX: Always set explicit categoryBitMask for each body type
β
ββ Do the bodies actually overlap? (Check showsPhysics)
β ββ Bodies too small or offset from sprite β Fix physics body size
β ββ Bodies never reach each other β Check collisionBitMask isn't blocking
β
ββ Are you modifying the world inside didBegin?
ββ Removing nodes inside didBegin can cause missed callbacks
ββ FIX: Flag nodes for removal, process in update(_:)
If this never prints, the issue is delegate/bitmask setup. If it prints but with wrong bodies, the issue is bitmask values.
Symptom 2: Objects Tunneling Through Walls
Time saved: 20-60 min β 5 min
Fast objects pass through thin walls
β
ββ Is the object moving faster than wall thickness per frame?
β ββ At 60fps: max safe speed = wall_thickness Γ 60 pt/s
β ββ A 10pt wall is safe up to ~600 pt/s
β ββ FIX: usesPreciseCollisionDetection = true on the fast object
β
ββ Is usesPreciseCollisionDetection enabled?
β ββ Only needed on the MOVING object (not the wall)
β ββ FIX: fastObject.physicsBody?.usesPreciseCollisionDetection = true
β
ββ Is the wall an edge body?
β ββ Edge bodies have zero area β tunneling is easier
β ββ FIX: Use volume body for walls (rectangleOf:) with isDynamic = false
β
ββ Is the wall thick enough?
β ββ FIX: Make walls at least 10pt thick for objects up to 600pt/s
β
ββ Are collision bitmasks correct?
ββ Wall's categoryBitMask must be in object's collisionBitMask
ββ FIX: Verify with print: object.collisionBitMask & wall.categoryBitMask != 0
Symptom 3: Poor Frame Rate
Time saved: 2-4 hours β 15-30 min
FPS below 60 (or 120 on ProMotion)
β
ββ Check showsNodeCount
β ββ >1000 nodes β Offscreen nodes not removed
β β ββ Are you removing nodes that leave the screen?
β β ββ FIX: In update(), remove nodes outside visible area
β β ββ FIX: Use object pooling for frequently spawned objects
β β
β ββ 200-1000 nodes β Likely manageable, check draw count
β ββ <200 nodes β Nodes aren't the problem, check below
β
ββ Check showsDrawCount
β ββ >50 draw calls β Batching problem
β β ββ Using SKShapeNode for gameplay? β Replace with pre-rendered textures
β β ββ Sprites from different images? β Use texture atlas
β β ββ Sprites at different zPositions? β Consolidate layers
β β ββ ignoresSiblingOrder = false? β Set to true
β β
β ββ 10-50 draw calls β Acceptable for most games
β ββ <10 draw calls β Drawing isn't the problem
β
ββ Physics expensive?
β ββ Many texture-based physics bodies β Use circles/rectangles
β ββ usesPreciseCollisionDetection on too many bodies β Use only on fast objects
β ββ Many contact callbacks firing β Reduce contactTestBitMask scope
β ββ Complex polygon bodies β Simplify to fewer vertices
β
ββ Particle overload?
β ββ Multiple emitters active β Reduce particleBirthRate
β ββ High particleLifetime β Reduce (fewer active particles)
β ββ numParticlesToEmit = 0 (infinite) without cleanup β Add limits
β ββ FIX: Profile with Instruments β Time Profiler
β
ββ SKEffectNode without shouldRasterize?
β ββ CIFilter re-renders every frame
β ββ FIX: effectNode.shouldRasterize = true (if content is static)
β
ββ Complex update() logic?
ββ O(nΒ²) collision checking? β Use physics engine instead
ββ String-based enumerateChildNodes every frame? β Cache references
ββ Heavy computation in update? β Spread across frames or background
touchesBegan not called on a node
β
ββ Is isUserInteractionEnabled = true on the node?
β ββ SKScene: true by default
β ββ All other SKNode subclasses: FALSE by default
β ββ FIX: node.isUserInteractionEnabled = true
β
ββ Is the node hidden or alpha = 0?
β ββ Hidden nodes don't receive touches
β ββ FIX: Check node.isHidden and node.alpha
β
ββ Is another node on top intercepting touches?
β ββ Higher zPosition nodes with isUserInteractionEnabled get first chance
β ββ DEBUG: Print nodes(at: touchLocation) to see what's there
β
ββ Is the touch in the correct coordinate space?
β ββ Using touch.location(in: self.view)? β WRONG for SpriteKit
β ββ FIX: Use touch.location(in: self) for scene coordinates
β Or touch.location(in: targetNode) for node-local coordinates
β
ββ Is the physics body blocking touch pass-through?
β ββ Physics bodies don't affect touch handling β not the issue
β
ββ Is the node's frame correct?
ββ SKNode (container) has zero frame β can't be hit-tested by area
ββ SKSpriteNode frame matches texture size Γ scale
ββ FIX: Use contains(point) or nodes(at:) for manual hit testing
Symptom 5: Memory Spikes and Crashes
Time saved: 1-3 hours β 15 min
Memory grows during gameplay
β
ββ Nodes accumulating? (Check showsNodeCount over time)
β ββ Count increasing? β Nodes created but not removed
β β ββ Missing removeFromParent() for expired objects
β β ββ FIX: Add cleanup in update() or use SKAction.removeFromParent()
β β ββ FIX: Implement object pooling for frequently spawned items
β β
β ββ Count stable? β Memory issue elsewhere
β
ββ Infinite particle emitters?
β ββ numParticlesToEmit = 0 creates particles forever
β ββ Each emitter accumulates particles up to birthRate Γ lifetime
β ββ FIX: Set finite numParticlesToEmit or manually stop and remove
β
ββ Texture caching?
β ββ SKTexture(imageNamed:) caches β repeated calls don't leak
β ββ SKTexture(cgImage:) from camera/dynamic sources β Not cached
β ββ FIX: Reuse texture references for dynamic textures
β
ββ Strong reference cycles in actions?
β ββ SKAction.run { self.doSomething() } captures self strongly
β ββ In repeatForever, this prevents scene deallocation
β ββ FIX: SKAction.run { [weak self] in self?.doSomething() }
β
ββ Scene not deallocating?
β ββ Add deinit { print("Scene deallocated") }
β ββ If never prints β retain cycle
β ββ Common: strong delegate, closure capture, NotificationCenter observer
β ββ FIX: Clean up in willMove(from:):
β removeAllActions()
β removeAllChildren()
β physicsWorld.contactDelegate = nil
β
ββ Instruments β Allocations
ββ Filter by "SK" to see SpriteKit objects
ββ Mark generation before/after scene transition
ββ Persistent growth = leak
Symptom 6: Coordinate Confusion
Time saved: 20-60 min β 5 min
Positions seem wrong or flipped
β
ββ Y-axis confusion?
β ββ SpriteKit: origin at BOTTOM-LEFT, Y goes UP
β ββ UIKit: origin at TOP-LEFT, Y goes DOWN
β ββ FIX: Use scene coordinate methods, not view coordinates
β touch.location(in: self) β CORRECT (scene space)
β touch.location(in: view) β WRONG (UIKit space, Y flipped)
β
ββ Anchor point confusion?
β ββ Scene anchor (0,0) = bottom-left of view is scene origin
β ββ Scene anchor (0.5,0.5) = center of view is scene origin
β ββ Sprite anchor (0.5,0.5) = center of sprite is at position (default)
β ββ Sprite anchor (0,0) = bottom-left of sprite is at position
β ββ FIX: Print anchorPoint values and draw expected position
β
ββ Parent coordinate space?
β ββ node.position is relative to PARENT, not scene
β ββ Child at (0,0) of parent at (100,100) is at scene (100,100)
β ββ FIX: Use convert(_:to:) and convert(_:from:) for cross-node coordinates
β let scenePos = node.convert(localPoint, to: scene)
β let localPos = node.convert(scenePoint, from: scene)
β
ββ Camera offset?
β ββ Camera position offsets the visible area
β ββ HUD attached to camera stays in place
β ββ FIX: For world coordinates, account for camera position
β scene.convertPoint(fromView: viewPoint)
β
ββ Scale mode cropping?
ββ aspectFill crops edges β content at edges may be offscreen
ββ FIX: Keep important content in the "safe area" center
Symptom 7: Scene Transition Crashes
Time saved: 30-90 min β 5 min
Crash during or after scene transition
β
ββ EXC_BAD_ACCESS after transition?
β ββ Old scene deallocated while something still references it
β ββ Common: Timer, NotificationCenter, delegate still referencing old scene
β ββ FIX: Clean up in willMove(from:):
β removeAllActions()
β removeAllChildren()
β physicsWorld.contactDelegate = nil
β // Remove any NotificationCenter observers
β
ββ Crash in didMove(to:) of new scene?
β ββ Accessing view before it's available
β ββ Force-unwrapping optional that's nil during init
β ββ FIX: Use guard let view = self.view in didMove(to:)
β
ββ Memory spike during transition?
β ββ Both scenes exist simultaneously during transition animation
β ββ For large scenes, this doubles memory usage
β
Make data-driven prioritization decisions faster
Stakeholder Communication
Draft PRDs, status updates, and stakeholder presentations
βΊAccess to product documentation and roadmap tools (Jira, Notion, etc.)
βΊUnderstanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
βΊStakeholder contact information and communication channels
Time Estimate
30-60 minutes to see productivity improvements
Steps
1Install product management skill
2Start with user story generation for known feature
3Progress to competitive analysis: research 2-3 competitors
4Use for roadmap prioritization: apply RICE/ICE scoring
5Draft stakeholder communications and refine based on feedback
6Build template library for recurring PM tasks
7Share effective prompts with product team
Common Pitfalls
β Not validating competitive researchβverify facts before sharing
β Accepting user stories without involving engineering team
β Over-relying on frameworks without qualitative judgment
β Not customizing outputs to company culture and communication style
β Skipping stakeholder validation of generated requirements
Best Practices
β Do
+Validate research and competitive analysis with real data
+Collaborate with engineering when generating technical requirements
+Customize frameworks and templates to your company context
+Use skill for first drafts, refine with stakeholder input
+Document successful prompt patterns for PM tasks
+Combine AI efficiency with human judgment and intuition
β Don't
βDon't publish competitive analysis without fact-checking
βDon't finalize user stories without engineering review
βDon't make prioritization decisions solely on AI scoring
βDon't skip customer validation of generated requirements
βDon't ignore company-specific context and culture
π‘ Pro Tips
β Provide context: company goals, constraints, customer feedback
β Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
β Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
β Use skill for 70% generation + 30% customization to company needs
When to Use This
β Use when
Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.
β Avoid when
Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.
Learning Path
1Basic: user stories, feature specs, status updates