# spritekit

A skill that gives your coding agent a SpriteKit reference: scenes, sprites, physics, particles and SwiftUI integration for 2D games.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 3200 installs · ★ 1237
- Author: dpearson2699
- License: LicenseRef-Unknown · policy=link-only · description only; the file stays with the author
- Source: https://github.com/dpearson2699/swift-ios-skills/tree/HEAD/skills/spritekit/SKILL.md
- Updated: 2026-07-31
- HTML: https://affpapa.org/en/nevibecode/skills/spritekit

## What it does

The skill covers SpriteKit on iOS 26+ with Swift 6.3. It walks through scenes built on `SKScene` and `SKView`, sprites with `SKSpriteNode`, animation via `SKAction`, physics with `SKPhysicsBody` and contact detection, particles from `SKEmitterNode`, tile maps, `SKCameraNode`, and embedding scenes in SwiftUI with `SpriteView`.

Sections are split by topic: scene setup, nodes and sprites, actions, physics, touch handling, camera, effects, SwiftUI integration. There is also a common-mistakes section and a review checklist. Your agent pulls from this when you ask it to build a game scene or debug collisions.

The material targets iOS 26+ and Swift 6.3, so examples may not compile on older versions. Install runs through `npx skills add`; GitHub Copilot users get a separate `gh skill install` command.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill spritekit -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/spritekit/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/spritekit/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill spritekit -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/spritekit/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill spritekit -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/spritekit/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install dpearson2699/swift-ios-skills spritekit
```

2. **Manually: put the files in place**
- File: `.github/skills/spritekit/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill spritekit -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/dpearson2699/swift-ios-skills --path skills/spritekit
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/spritekit/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill spritekit -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/dpearson2699/swift-ios-skills/tree/HEAD/skills/spritekit/SKILL.md

## When to use it
- build a game scene on SKScene from scratch
- set up collision masks for physics bodies
- animate a sprite from a texture sequence
- add a particle burst for an explosion
- embed a SpriteKit scene in a SwiftUI view

## Example prompts
- create an SKScene with a player and ground, add physics
- set contactTestBitMask so the player detects enemy contact
- show me how to embed SpriteView in a SwiftUI screen

## Similar
- [iphone-duo-games](https://affpapa.org/en/nevibecode/skills/iphone-duo-games.md) — skill · 427 installs
- [clerk-swift](https://affpapa.org/en/nevibecode/skills/clerk-swift.md) — skill · 14500 installs
- [swiftui-patterns](https://affpapa.org/en/nevibecode/skills/affaan-m-swiftui-patterns.md) — skill · 4600 installs
- [swift-expert](https://affpapa.org/en/nevibecode/skills/swift-expert.md) — skill · 4100 installs
- [sentry-cocoa-sdk](https://affpapa.org/en/nevibecode/skills/sentry-cocoa-sdk.md) — skill · 3400 installs
- [ios-application-dev](https://affpapa.org/en/nevibecode/skills/ios-application-dev.md) — skill · 2100 installs

From the same set: [dpearson2699/swift-ios-skills](https://affpapa.org/en/nevibecode/by/dpearson2699/swift-ios-skills.md) — 86 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
