game-save-load

game-save-load is a skill for Claude Code from fcsouza/agent-skills. It costs 84 tokens per session (3,852 once invoked), scanned A, original, MIT.

A guide to saving and loading progress in a browser game, including local and server-side storage.

In plain words
What is it for?
It covers save slots, autosave, backups, format migrations, validation, atomic writes, cloud saves, and server-backed game state.
Why use it?
It addresses lost progress, outdated save formats, corrupted data, unsafe client data, and conflicts between devices.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the game-dev plugin — 39 skills shipped together

Good fit It covers save slots, autosave, backups, format migrations, validation, atomic writes, cloud saves, and server-backed game state.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fcsouza/agent-skills/game-save-load
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add fcsouza/agent-skills --skill game-save-load
Clone the repo
git clone --depth 1 https://github.com/fcsouza/agent-skills

Made for: Claude Code.

Or install game-dev, the plugin that ships this one along with the rest of its 39 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for game-save-load

README.md
[![agentmods](https://agentmods.dev/badge/skills/fcsouza/agent-skills/game-save-load/github.svg)](https://agentmods.dev/skills/fcsouza/agent-skills/game-save-load)
Your own site
<a href="https://agentmods.dev/skills/fcsouza/agent-skills/game-save-load"><img src="https://agentmods.dev/badge/skills/fcsouza/agent-skills/game-save-load/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for game-save-load

Your own site · 80×15
<a href="https://agentmods.dev/skills/fcsouza/agent-skills/game-save-load"><img src="https://agentmods.dev/badge/skills/fcsouza/agent-skills/game-save-load.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 84 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,852 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00084 $0.03852
Opus 5.5 $0.00034 $0.01541
Sonnet 5.5 $0.00017 $0.00770
Haiku 4.5 $0.00008 $0.00385

Measured 19d ago against content hash 84a8451e4b24, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

game-save-load scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 19d ago.

The scan reads SKILL.md. This mod also ships 3 executable files (boilerplate/browser-save-store.ts, boilerplate/save-envelope.ts, boilerplate/server-save.ts), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/game-save-load/SKILL.md · 134 lines

How it starts

The opening of the file, as written. The whole thing — 134 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Game save and load

Target stack: browser client, Bun server, Postgres through Drizzle 0.45, Redis. Database setup and migrations come from postgres-game-schema; this skill adds only the save table and the save rules.

Decide where the save lives

The save holds Store it Why
Currency, items, ranked progress, anything another player or the shop cares about Normalized server tables (postgres-game-schema), written by server logic The client is under the player's control. The server decides and stores state; the client sends inputs only.
Single-player progress the player would be upset to lose Server save slot (boilerplate/server-save.ts) plus a local copy Browser storage can be deleted without asking (next section). The server copy also roams between devices.
Settings, key bindings, a guest session before sign-in Browser only (boilerplate/browser-save-store.ts) Losing it costs little.

Rules that follow from the table:

  • A server save slot stores state the server does not need to trust. Never accept currency, items or rewards inside an uploaded save; the server computes those itself. Keep them out of the payload, so the slot never becomes one JSON blob for all game state.
  • Redis is not the save of record. With RDB snapshots alone Redis can lose the last minutes of writes; with AOF at the default fsync of every second, about one second. Write durable progress to Postgres. Redis holds live session state (redis-game-patterns).
  • The player id on a server save comes from the session (betterauth-integration), never from the request body.
  • Client tamper protection (obfuscation, signed saves) does not replace this design. For an offline single-player game, accept that a local save can be edited.

Browser storage

  • Use IndexedDB for saves. Not localStorage: it is synchronous and blocks the main thread, holds strings only, is capped at about 5 MiB per origin, and does not exist in workers.
  • Browser storage is best-effort. Under storage pressure the browser evicts the least recently used origins, and it deletes all of an origin's data at once (IndexedDB, Cache API and the rest). A backup slot in the same origin dies with the main slot.
  • With cross-site tracking prevention on, Safari deletes all script-written storage of a site after seven days of browser use with no click or tap on that site. A web app added to the home screen keeps its own counter.
  • Call navigator.storage.persist() when the player first saves, inside the click handler of the save button. Chrome grants or refuses by engagement without a prompt; Firefox shows a permission prompt. A persistent origin is not evicted under pressure.
  • Quotas differ: Chromium allows up to 60% of the disk per origin; Firefox best-effort storage, 10% of the disk or 10 GiB per site group; Safari about 60% for browser apps and about 15% for embedded web views. Plan saves in kilobytes, not gigabytes.
  • Every write can throw QuotaExceededError. Catch it, tell the player, and offer to delete old slots or export the save.
  • localStorage access throws SecurityError when the player blocks site data (often by blocking cookies) and on file: and data: origins. Wrap it if you use it for settings.
  • In private browsing, localStorage is cleared when the last private tab closes and IndexedDB lives in memory. Tell the player progress will not survive; signing in and saving to the server is the fix.
  • IndexedDB store and index changes happen only in onupgradeneeded. A tab still on the old version blocks the upgrade until it closes its connection, so handle onblocked and close the database in onversionchange. openSaveDb closes it and calls your onVersionChange, so the game can tell the player to reload the tab. Store layout versions and save payload versions are separate numbers.
  • An export file is optional. showSaveFilePicker() needs HTTPS and a click, and MDN marks it experimental and not Baseline: check the compatibility table and fall back to a download link.

Read the full file on GitHub · 134 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 19d ago First seen · 134 lines · 84 tokens per session scan A 84a8451e4b24

Subscribe to this mod's changes

game-save-load is a skill published in the GitHub repository fcsouza/agent-skills (29 stars, last pushed today), licensed MIT. It adds 84 tokens to every session and 3,852 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-15.

Related

game-save-load compared with skills from other repositories

game-save-load next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
game-save-loadfcsouza/agent-skillsSkill29todayMITA84Claude Code
scenario-roblox-datascenario-labs/skillsSkill4.7kyesterdayMITA138Claude Code
roblox-dataTabooHarmony/roblox-brainSkill239yesterdayMITA30Claude Code
narrative-and-quest-designrondorkerin/gamestackSkill35yesterdayMITA128Claude Code
postfx-bloomBbeierle12/Skill-MCP-ClaudeSkill9todayMITA61Claude Code, Codex
game-database-migration-safetyhoatv2211/GameStudio-CodexKITSkill57d agoMITA50Codex
save-data-schema-migrationhoatv2211/GameStudio-CodexKITSkill57d agoMITA36Codex