Skip to content
Development
Skill

/gameplaykit-simulation-workflow

Guide GameplayKit simulation and gameplay-architecture work. Use when Codex works on GKEntity, GKComponent, GKComponentSystem, GKState, GKStateMachine, GKGraph, GKAgent, GKGoal, GKBehavior, GKRandom, SpriteKit or SceneKit integration, pathfinding, agents, state machines,

From plugin
socket
9200 skills5 MCP

Claude Code

$ npx -y skills add gaelic-ghost/socket --skill gameplaykit-simulation-workflow --agent claude-code

SKILL.md

gameplaykit-simulation-workflow.SKILL.md
name: gameplaykit-simulation-workflow
description: Guide GameplayKit simulation and gameplay-architecture work. Use when Codex works on GKEntity, GKComponent, GKComponentSystem, GKState, GKStateMachine, GKGraph, GKAgent, GKGoal, GKBehavior, GKRandom, SpriteKit or SceneKit integration, pathfinding, agents, state machines, reusable gameplay logic, or game simulation validation.

GameplayKit Simulation 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 when the problem is gameplay logic rather than rendering. GameplayKit is the owner when entities, components, systems, states, agents, pathfinding, or reproducible gameplay services need to stay separate from SpriteKit, SceneKit, RealityKit, SwiftUI, or ad hoc view code.

Source Check

Use Xcode MCP `DocumentationSearch`, Xcode-local documentation, Dash Apple API Reference docsets, or readable official Apple documentation before making GameplayKit-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:

  • [GameplayKit](https://developer.apple.com/documentation/gameplaykit)
  • [GameplayKit entities and components](https://developer.apple.com/documentation/gameplaykit#Entities-and-Components)
  • [GameplayKit state machines](https://developer.apple.com/documentation/gameplaykit#State-Machines)
  • [GameplayKit agents, goals, and behaviors](https://developer.apple.com/documentation/gameplaykit#Agents-Goals-and-Behaviors)
  • [GKScene](https://developer.apple.com/documentation/gameplaykit/gkscene)
  • [GKComponentSystem](https://developer.apple.com/documentation/gameplaykit/gkcomponentsystem)

Apple documents GameplayKit as a framework for organizing game logic and providing reusable gameplay features such as random number generation, AI, pathfinding, and agent behavior. Use that boundary to keep simulation out of renderer-specific code unless the project intentionally couples them.

Workflow

1. Inspect the gameplay model:

  • `import GameplayKit`
  • `GKEntity`, `GKComponent`, `GKComponentSystem`
  • `GKState`, `GKStateMachine`
  • `GKGraph`, `GKGraphNode`, `GKGridGraph`
  • `GKAgent`, `GKAgent2D`, `GKAgent3D`, `GKGoal`, `GKBehavior`, `GKPath`
  • `GKRandomSource`, `GKRandomDistribution`, `GKRuleSystem`
  • `GKScene`, `GKSKNodeComponent`, and SpriteKit scene-editor integration

2. Choose the GameplayKit surface:

  • Use entities and components when several gameplay objects need reusable behaviors without deep inheritance.
  • Use component systems when components need ordered per-frame updates across many entities.
  • Use state machines when the game or object behavior has explicit state transitions and invalid transitions should be prevented.
  • Use graphs and pathfinding when navigation rules are more important than renderer-specific movement.
  • Use agents, goals, and behaviors when autonomous movement should be expressed as goals and constraints.
  • Use GameplayKit random sources when reproducibility, seeded behavior, or distribution shape matters.

3. Keep renderers thin:

  • SpriteKit and SceneKit nodes can present gameplay state, but they should not become the only source of gameplay truth unless the project already owns that pattern.
  • Use `GKSKNodeComponent` or explicit adapter components when SpriteKit nodes and GameplayKit entities need to stay synchronized.
  • For SceneKit, keep 3D node synchronization explicit rather than burying game rules in node lookup code.

4. Validate simulation honestly:

  • Unit-test pure gameplay rules where practical.
  • Test state-machine transitions, seeded random behavior, pathfinding outcomes, and component update order without requiring a rendered scene when possible.
  • Use renderer or device validation only for integration behavior that pure tests cannot prove.

Handoffs

  • `spritekit-game-workflow` when SpriteKit scene, node, action, physics, or `.sks` behavior owns the work.
  • `scenekit-game-workflow` when SceneKit scene graph, assets, camera, lighting, or 3D physics owns the work.
  • `xcode-game-profiling-workflow` when per-frame component updates, pathfinding, agents, or renderer synchronization become performance-sensitive.
  • `swift-lang` for general Swift API design, concurrency, error handling, source organization, or test style that is not game-specific.
  • `apple-dev-skills:xcode-testing-workflow` for Xcode test plans, UI tests, Instruments, `xctrace`, or test execution mechanics.

Output Shape

Return the GameplayKit owner, selected GameplayKit surface, renderer synchronization boundary, files or systems changed, pure-test path, integration validation path, and remaining open gameplay decisions.

Read more
@gaelic-ghost
Ships withsocket

Stuff for Agents on macOS Promo audio: Socket Codex Marketplace Promo

9200 skills5 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
9
Star history of gaelic-ghost/socket on GitHub, a chart by star-history.com

Other skills on socket.

orchestrate-agent-work

orchestrate-agent-work

Coordinate bounded worker tasks with a launch envelope, report-back, escalation, and synthesis contract. Use before spawning,…

@gaelic-ghost@gaelic-ghostInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills11d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc12d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react1d252k
@facebook@facebookInstall Skill

Questions about gameplaykit-simulation-workflow.

Which coding agents can use gameplaykit-simulation-workflow?
gameplaykit-simulation-workflow installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.