skills/remix-game-sdk/SKILL.md
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.
npx skillsauth add farworld-labs/remix-skills remix-game-sdkInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
@remix-gg/sdk)Use this file when generating or repairing game code for Remix.
window.RemixSDK.window.FarcadeSDK is still assigned as a backward-compatible alias, but new code should use window.RemixSDK.<head>:
<script src="https://cdn.jsdelivr.net/npm/@remix-gg/sdk@latest/dist/index.min.js"></script>await window.RemixSDK.ready() before reading player/game data.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 }) => { ... })Properties/getters:
window.RemixSDK.playerwindow.RemixSDK.playerswindow.RemixSDK.gameStatewindow.RemixSDK.gameInfowindow.RemixSDK.purchasedItemswindow.RemixSDK.inventorywindow.RemixSDK.shopItemswindow.RemixSDK.isReadywindow.RemixSDK.hasItem(itemId)window.RemixSDK.getItemPurchaseCount(itemId)window.RemixSDK.getShopItem(slug)Useful gameInfo fields:
viewContext for feed/full-screen/challenge/tournament contextcontentSafeAreaInset for overlay-safe mobile layoutinitialGameState for persisted state hydrationSingle-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.
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()
ready() resolves.gameOver, onPlayAgain, onToggleMute).vibrate, checkpoint, or save.singlePlayer.actions.purchase(...) in new code when the SDK exposes sdk.purchase(...).contentSafeAreaInset when HUD or controls can collide with mobile overlays.localStorage/sessionStorage as primary persistence instead of saveGameState.content-media
Generate and add images to a Remix game
development
Build lightweight mobile-friendly 3D browser games with Three.js
tools
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.
data-ai
Upload images, audio, or 3D models as hosted game assets