# Game session host

> Game session host is an open-source agent skill for developer tools. Runs a typed game module in a React Native app with saves, undo, pause and results. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/zakariaf/ReactNative-Skills/tree/main/skills/game-session-host
- **Repository:** https://github.com/zakariaf/reactnative-skills
- **GitHub stars:** 16
- **License:** MIT
- **Skill name:** game-session-host
- **Collection:** https://github.com/zakariaf/ReactNative-Skills
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools), [game design](https://ai-powered.com/categories/game-design)
- **Listing updated:** 2026-12-04

## About

This skill sets up one shared host for games built as typed modules in a React Native app. The game enters through a single generic factory, and each run is kept in its own store that writes the run to disk before the board animates the change. Finished runs are recorded in one repository transaction before the result appears, and screens only receive plain data and send commands such as undo, hint, pause, finish and leave.

The skill covers the surrounding behaviour: a single rescue per loss when the rules and app config allow it, finishing losses that cannot be rescued, validating saved runs when the app boots or resumes, pausing on background or full-screen ads, and guarding the Back gesture during a live run. Daily runs, practice replays and tutorial scripts are kept separate from recorded results and statistics.

It ships templates, examples and a checker script that runs the app's host modules against a small test game on iOS and Android. It expects TypeScript, React, Jest and a game whose rules are already defined. The checker is written in JavaScript and is licensed under MIT.

## When your agent uses it

> Hosts a game module through one typed seam: game screen, pause, undo, hints, a rescue, saved runs, results. Use when assembling a game or wiring the Game screen or registry. Not for rules (game-rules-engine).

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Runs JavaScript and TypeScript scripts](https://github.com/zakariaf/ReactNative-Skills/tree/HEAD/skills/game-session-host)
- [No network calls found in its scripts](https://github.com/zakariaf/ReactNative-Skills/tree/HEAD/skills/game-session-host)
- [License: MIT](https://github.com/zakariaf/ReactNative-Skills/tree/HEAD/skills/game-session-host)

## Features

- **Single game entry point:** A generic factory lets the app host any typed game module while keeping the game's own types out of screens and stores.
- **Persist-before-publish runs:** Each move is written to the saved run before the board shows it, so a killed app reopens the same position.
- **Atomic run recording:** A finished run's result, best, statistics and saved-run clearance are written in one repository transaction.
- **Rescue and stranded loss handling:** Controls a single rescue offer per loss and finishes losses that no rescue can reach.
- **Pause and Back guards:** Pauses runs on background or full-screen ads and intercepts Back during live play.
- **Saved run validation:** Checks saved runs with the game's own parsers at startup and drops only unreadable entries.
- **Architecture checker:** A script verifies the host invariants by running the app's modules against a test game.

## Good for

- Add a new puzzle game to a React Native app using the shared host
- Save and resume an in-progress game after the app is killed
- Offer one rewarded-ad rescue after a loss and record the run correctly
- Wire the Game screen so Back and backgrounding pause the run
- Record daily challenge results without counting replays as new bests

## Install

### Claude Code

This skill ships in the `react-native-games` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add zakariaf/ReactNative-Skills
/plugin install react-native-games@react-native-skills
```

Or copy only this skill to `~/.claude/skills/game-session-host`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/zakariaf/ReactNative-Skills.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/game-session-host &&
cp -R "$tmp/skills/game-session-host" ~/.claude/skills/game-session-host &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/game-session-host` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/game-session-host` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/zakariaf/ReactNative-Skills.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/game-session-host &&
cp -R "$tmp/skills/game-session-host" ~/.agents/skills/game-session-host &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/game-session-host` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/game-session-host` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/zakariaf/ReactNative-Skills.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/game-session-host &&
cp -R "$tmp/skills/game-session-host" ~/.cursor/skills/game-session-host &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/game-session-host` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/zakariaf/ReactNative-Skills.git --path skills/game-session-host
```

Or copy the folder to `~/.gemini/skills/game-session-host` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/game-session-host`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/zakariaf/ReactNative-Skills.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/game-session-host &&
cp -R "$tmp/skills/game-session-host" ~/.copilot/skills/game-session-host &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/game-session-host` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/zakariaf/ReactNative-Skills.git
```

Then copy `ReactNative-Skills/skills/game-session-host` into your agent's skills folder as `game-session-host`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does the skill need before Game session host can be used?

The app needs an existing game module, its rules and levels, and a SQLite-backed data layer. The checker prints NOT APPLICABLE until the app has a game.

### Does Game session host change how a run is saved?

Yes. Each change is reduced, written to the saved run, and only then shown on screen. A finished run is recorded in one repository transaction before its result appears.

### Which clients does Game session host work with?

The content presents it as a plain SKILL.md folder and a Claude Code plugin marketplace entry, so it is listed for all supported agent clients.

### How do I install Game session host in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/game-session-host to use it in all your projects, or to .claude/skills/game-session-host in one project. Or install the react-native-games plugin, which includes it: /plugin marketplace add zakariaf/ReactNative-Skills, then /plugin install react-native-games@react-native-skills.

### Does Game session host run scripts?

Yes. It runs JavaScript and TypeScript scripts. No network calls were found in its scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Game session host?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Game session host?

The closest alternatives to Game session host are Game rules engine, Error handling typed results, Game balance and bots, Debug menu and test hooks and Background tasks.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Game rules engine](https://ai-powered.com/skills/game-rules-engine): Game rules engine is an open-source agent skill for developer tools.
- [Error handling typed results](https://ai-powered.com/skills/error-handling-typed-results): Error handling typed results is an open-source agent skill for developer tools.
- [Game balance and bots](https://ai-powered.com/skills/game-balance-and-bots): Game balance and bots is an open-source agent skill for developer tools.
- [Debug menu and test hooks](https://ai-powered.com/skills/debug-menu-and-test-hooks): Debug menu and test hooks is an open-source agent skill for developer tools.
- [Background tasks](https://ai-powered.com/skills/background-tasks): Background tasks is an open-source agent skill for developer tools.
- [Async safety](https://ai-powered.com/skills/async-safety): Async safety is an open-source agent skill for developer tools.
- [Data export and restore](https://ai-powered.com/skills/data-export-and-restore): Data export and restore is an open-source agent skill for developer tools.
- [Canvas gestures and hit testing](https://ai-powered.com/skills/canvas-gestures-and-hit-testing): Canvas gestures and hit testing is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/game-session-host
