axiom-spritekit

charleswiltgen/axiom · updated Apr 28, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/charleswiltgen/axiom --skill axiom-spritekit
0 commentsdiscussion
summary

Purpose: Build reliable SpriteKit games by mastering the scene graph, physics engine, action system, and rendering pipeline

  • iOS Version: iOS 13+ (SwiftUI integration), iOS 11+ (SKRenderer)
  • Xcode: Xcode 15+
skill.md

SpriteKit Game Development Guide

Purpose: Build reliable SpriteKit games by mastering the scene graph, physics engine, action system, and rendering pipeline iOS Version: iOS 13+ (SwiftUI integration), iOS 11+ (SKRenderer) Xcode: Xcode 15+

When to Use This Skill

Use this skill when:

  • Building a new SpriteKit game or interactive simulation
  • Implementing physics (collisions, contacts, forces, joints)
  • Setting up game architecture (scenes, layers, cameras)
  • Optimizing frame rate or reducing draw calls
  • Implementing touch/input handling in a game
  • Managing scene transitions and data passing
  • Integrating SpriteKit with SwiftUI or Metal
  • Debugging physics contacts that don't fire
  • Fixing coordinate system confusion

Do NOT use this skill for:

  • SceneKit 3D rendering (axiom-scenekit)
  • GameplayKit entity-component systems
  • Metal shader programming (axiom-metal-migration-ref)
  • General SwiftUI layout (axiom-swiftui-layout)

1. Mental Model

Coordinate System

SpriteKit uses a bottom-left origin with Y pointing up. This differs from UIKit (top-left, Y down).

SpriteKit:          UIKit:
┌─────────┐         ┌─────────┐
│    +Y    │         │  (0,0)  │
│    ↑     │         │    ↓    │
│    │     │         │    +Y   │
│(0,0)──→+X│        │    │    │
└─────────┘         └─────────┘

Anchor Points define which point on a sprite maps to its position. Default is (0.5, 0.5) (center).

// Common anchor point trap:
// Anchor (0, 0) = bottom-left of sprite is at position
// Anchor (0.5, 0.5) = center of sprite is at position (DEFAULT)
// Anchor (0.5, 0) = bottom-center (useful for characters standing on ground)
sprite.anchorPoint = CGPoint(x: 0.5, y: 0)

Scene anchor point maps the view's frame to scene coordinates:

  • (0, 0) — scene origin at bottom-left of view (default)
  • (0.5, 0.5) — scene origin at center of view

Node Tree

Everything in SpriteKit is an SKNode in a tree hierarchy. Parent transforms propagate to children.

SKScene
├── SKCameraNode (viewport control)
├── SKNode "world" (game content layer)
│   ├── SKSpriteNode "player"
│   ├── SKSpriteNode "enemy"
│   └── SKNode "platforms"
│       ├── SKSpriteNode "platform1"
│       └── SKSpriteNode "platform2"
└── SKNode "hud" (UI layer, attached to camera)
    ├── SKLabelNode "score"
    └── SKSpriteNode "healthBar"

Z-Ordering

zPosition controls draw order. Higher values render on top. Nodes at the same zPosition render in child array order (unless ignoresSiblingOrder is true).

// Establish clear z-order layers
enum ZLayer {
    static let background: CGFloat = -100
    static let platforms: CGFloat = 0
    static let items: CGFloat = 10
    static let player: CGFloat = 20
    static let effects: CGFloat = 30
    static let hud: CGFloat = 100
}

2. Scene Architecture

Scale Mode Decision

Mode Behavior Use When
.aspectFill Fills view, crops edges Full-bleed games (most games)
.aspectFit Fits in view, letterboxes Puzzle games needing exact layout
.resizeFill Stretches to fill Almost never — distorts
.fill Matches view size exactly Scene adapts to any ratio
class GameScene: SKScene {
    override func sceneDidLoad() {
        scaleMode = .aspectFill
        // Design for a reference size, let aspectFill crop edges
    }
}

Camera Node Pattern

Always use SKCameraNode for viewport control. Attach HUD elements to the camera so they don't scroll.

let camera = SKCameraNode()
camera.name = "mainCamera"
addChild(camera)
self.camera = camera

// HUD follows camera automatically
let scoreLabel = SKLabelNode(text: "Score: 0")
scoreLabel.position = CGPoint(x: 0, y: size.height / 2 - 50)
camera.addChild(scoreLabel)

// Move camera to follow player
let follow = SKConstraint.distance(SKRange(constantValue: 0), to: playerNode)
camera.constraints = [follow]

Layer Organization

// Create layer nodes for organization
let worldNode = SKNode()
worldNode.name = "world"
addChild(worldNode)

let hudNode = SKNode()
hudNode.name = "hud"
camera?.addChild(hudNode)

// All gameplay objects go in worldNode
worldNode.addChild(playerSprite)
worldNode.addChild(enemySprite)

// All UI goes in hudNode (moves with camera)
hudNode.addChild(scoreLabel)

Scene Transitions

// Preload next scene for smooth transitions
guard let nextScene = LevelScene(fileNamed: "Level2") else { return }
nextScene.scaleMode = .aspectFill

let transition = SKTransition.fade(withDuration: 0.5)
view?.presentScene(nextScene, transition: transition)

Data passing between scenes: Use a shared game state object, not node properties.

class GameState {
    static let shared = GameState()
    var score = 0
    var currentLevel = 1
    var playerHealth = 100
}

// In scene transition:
let nextScene = LevelScene(size: size)
// GameState.shared is already accessible
view?.presentScene(nextScene, transition: .fade(withDuration: 0.5))

Note: A singleton works for simple games. For larger projects with testing needs, consider passing a GameState instance through scene initializers to avoid hidden global state.

Cleanup in willMove(from:):

override func willMove(from view: SKView) {
    removeAllActions()
    removeAllChildren()
    physicsWorld.contactDelegate = nil
}

3. Physics Engine

Bitmask Discipline

This is the #1 source of SpriteKit bugs. Physics bitmasks use a 32-bit system where each bit represents a category.

struct PhysicsCategory {
    static let none:       UInt32 = 0
    static let player:     UInt32 = 0b0001  // 1
    static let enemy:      UInt32 = 0b0010  // 2
    static let ground:     UInt32 = 0b0100  // 4
    static let projectile: UInt32 = 0b1000  // 8
    static let powerUp:    UInt32 = 0b10000 // 16
}

Three bitmask properties (all default to 0xFFFFFFFF — everything):

Property Purpose Default
categoryBitMask What this body IS 0xFFFFFFFF
collisionBitMask What it BOUNCES off 0xFFFFFFFF
contactTestBitMask What TRIGGERS delegate 0x00000000

The default collisionBitMask of 0xFFFFFFFF means everything collides with everything. This is the most common source of unexpected physics behavior.

// CORRECT: Explicit bitmask setup
player.physicsBody?.categoryBitMask = PhysicsCategory.player
player.physicsBody?.collisionBitMask = PhysicsCategory.ground | PhysicsCategory.enemy
player.physicsBody?.contactTestBitMask =
how to use axiom-spritekit

How to use axiom-spritekit on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add axiom-spritekit
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills add https://github.com/charleswiltgen/axiom --skill axiom-spritekit

The skills CLI fetches axiom-spritekit from GitHub repository charleswiltgen/axiom and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/axiom-spritekit

Reload or restart Cursor to activate axiom-spritekit. Access the skill through slash commands (e.g., /axiom-spritekit) or your agent's skill management interface.

Security & Verification 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 development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

User Story & Requirements Generation

Create detailed user stories, acceptance criteria, and feature specs

Example

Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios

Reduce spec writing time by 50%, ensure comprehensive coverage

Competitive Analysis

Research competitors, compare features, identify gaps

Example

Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities

Complete competitive research in 2 hours instead of 2 days

Roadmap Prioritization

Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs

Example

Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale

Make data-driven prioritization decisions faster

Stakeholder Communication

Draft PRDs, status updates, and stakeholder presentations

Example

Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement

Save 3-5 hours/week on communication overhead

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client
  • 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

Installation Steps

  1. 1.Install product management skill
  2. 2.Start with user story generation for known feature
  3. 3.Progress to competitive analysis: research 2-3 competitors
  4. 4.Use for roadmap prioritization: apply RICE/ICE scoring
  5. 5.Draft stakeholder communications and refine based on feedback
  6. 6.Build template library for recurring PM tasks
  7. 7.Share 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

  1. 1Basic: user stories, feature specs, status updates
  2. 2Intermediate: competitive analysis, prioritization frameworks, PRDs
  3. 3Advanced: product strategy, go-to-market planning, OKR setting
  4. 4Expert: product vision, market positioning, business model innovation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.727 reviews
  • Ganesh Mohane· Dec 24, 2024

    I recommend axiom-spritekit for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Fatima Jackson· Dec 12, 2024

    Keeps context tight: axiom-spritekit is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Yusuf Desai· Dec 8, 2024

    Useful defaults in axiom-spritekit — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Fatima Tandon· Nov 27, 2024

    axiom-spritekit is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Rahul Santra· Nov 15, 2024

    axiom-spritekit fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • James Nasser· Oct 18, 2024

    axiom-spritekit reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Pratham Ware· Oct 6, 2024

    axiom-spritekit has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Piyush G· Sep 13, 2024

    axiom-spritekit reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Zara Verma· Sep 13, 2024

    axiom-spritekit fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Shikha Mishra· Aug 4, 2024

    axiom-spritekit is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

showing 1-10 of 27

1 / 3