remix-game-sdk
Reference for the current @remix-gg/sdk runtime. Use when generating or repairing Remix game code, shop item integrations, save-state flows, multiplayer hooks, or host-safe mobile UI behavior.
Best use case
remix-game-sdk is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Reference for the current @remix-gg/sdk runtime. Use when generating or repairing Remix game code, shop item integrations, save-state flows, multiplayer hooks, or host-safe mobile UI behavior.
Teams using remix-game-sdk should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/remix-game-sdk/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How remix-game-sdk Compares
| Feature / Agent | remix-game-sdk | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Reference for the current @remix-gg/sdk runtime. Use when generating or repairing Remix game code, shop item integrations, save-state flows, multiplayer hooks, or host-safe mobile UI behavior.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Remix Game SDK Reference (`@remix-gg/sdk`)
Use this file when generating or repairing game code for Remix.
## Runtime model
- In Remix-hosted uploads, the SDK is available as `window.RemixSDK`.
- `window.FarcadeSDK` is still assigned as a backward-compatible alias, but new code should use `window.RemixSDK`.
- Include SDK script in the HTML `<head>`:
- `<script src="https://cdn.jsdelivr.net/npm/@remix-gg/sdk@latest/dist/index.min.js"></script>`
- Do not rely on package imports in uploaded single-file game code.
- Always call `await window.RemixSDK.ready()` before reading player/game data.
## Required hooks for v1 agent validation
These checks are required by `GET /v1/games/{gameId}/versions/{versionId}/validate`:
- `window.RemixSDK.singlePlayer.actions.gameOver({ score })`
- `window.RemixSDK.onPlayAgain(() => { ... })`
- `window.RemixSDK.onToggleMute(({ isMuted }) => { ... })`
## Commonly used SDK surface
Properties/getters:
- `window.RemixSDK.player`
- `window.RemixSDK.players`
- `window.RemixSDK.gameState`
- `window.RemixSDK.gameInfo`
- `window.RemixSDK.purchasedItems`
- `window.RemixSDK.inventory`
- `window.RemixSDK.shopItems`
- `window.RemixSDK.isReady`
- `window.RemixSDK.hasItem(itemId)`
- `window.RemixSDK.getItemPurchaseCount(itemId)`
- `window.RemixSDK.getShopItem(slug)`
Useful `gameInfo` fields:
- `viewContext` for feed/full-screen/challenge/tournament context
- `contentSafeAreaInset` for overlay-safe mobile layout
- `initialGameState` for persisted state hydration
Single-player actions:
- `window.RemixSDK.singlePlayer.actions.gameOver({ score })`
- `window.RemixSDK.singlePlayer.actions.saveGameState({ gameState })`
- `window.RemixSDK.purchase({ item })`
- `window.RemixSDK.onPurchaseComplete(({ success, item }) => { ... })`
- `window.RemixSDK.singlePlayer.actions.reportError({ message, ... })`
- `window.RemixSDK.hapticFeedback()`
Multiplayer actions:
- `window.RemixSDK.multiplayer.actions.gameOver({ scores })`
- `window.RemixSDK.onGameStateUpdated(callback)`
Multiplayer actions/events are optional for basic single-player games.
## Minimal integration template
```javascript
async function initGame() {
const sdk = window.RemixSDK
await sdk.ready()
let muted = true
sdk.onToggleMute(({ isMuted }) => {
muted = isMuted
})
sdk.onPlayAgain(() => {
restart()
})
function finish(score) {
sdk.singlePlayer.actions.gameOver({ score })
}
function save(state) {
sdk.singlePlayer.actions.saveGameState({ gameState: state })
}
function restart() {
// reset local game state and render
}
// start gameplay loop...
}
initGame()
```
## Mistakes to avoid
- Calling SDK getters before `ready()` resolves.
- Omitting one of the required validation hooks (`gameOver`, `onPlayAgain`, `onToggleMute`).
- Using non-existent SDK methods such as `vibrate`, `checkpoint`, or `save`.
- Using `singlePlayer.actions.purchase(...)` in new code when the SDK exposes `sdk.purchase(...)`.
- Ignoring `contentSafeAreaInset` when HUD or controls can collide with mobile overlays.
- Using `localStorage`/`sessionStorage` as primary persistence instead of `saveGameState`.Related Skills
remix-upload-game
Upload and validate HTML game code for Remix. Use when creating or updating a draft version through the CLI, MCP tools, or direct REST calls.
remix-upload-asset
Upload images, audio, or 3D models as hosted game assets
remix-submission-rules
Validation and publish constraints for Remix game submissions
remix-shop-items
Create, update, delete, and integrate Remix shop items. Use when a game needs Bits items, consumables, one-time unlocks, tier unlocks, store icons, or purchase handling in @remix-gg/sdk code.
remix-save-game
Add save and load game state functionality via RemixSDK
remix-rest-snippets
REST client snippets for Remix agent publishing
remix-open-game
Open a game in the Remix Studio browser for preview and editing
remix-multiplayer
Enable multiplayer support for a Remix game
remix-game-creation
Create a new game draft via the Remix API
remix-game-best-practices
Mobile-first game creation best practices for Remix
remix-cli
Use the official Remix CLI for authentication, config inspection, game creation, uploads, and analytics. Trigger this skill when a task involves `remix login`, `remix whoami`, `.remix-cli.json`, `REMIX_API_KEY`, or terminal-based game management on Remix.
remix-api-reference
OpenAPI-first endpoint reference for Remix game publishing REST routes