game-save-and-persistence

game-save-and-persistence is a skill for Claude Code, Codex from makifbaysal/tasktrooper. It costs 56 tokens per session (1,438 once invoked), scanned A, original, Apache-2.0.

A game-save design for storing player progress and settings safely across game updates and crashes. It uses versioned files, tested steps for updating older saves, safe writing, backups, checksums, and corruption tests.

In plain words
What is it for?
Use it when adding save games, settings, migrations, or progression storage in a game. It covers stable save data, safe serializers, engine-specific storage locations, and round-trip tests.
Why use it?
It reduces the risk of losing progress or making old saves unreadable after an update. Separating settings from progress also prevents resetting one from damaging the other.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when adding save games, settings, migrations, or progression storage in a game. It covers stable save data, safe serializers, engine-specific storage locations, and round-trip tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/makifbaysal/tasktrooper/game-save-and-persistence
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 makifbaysal/tasktrooper --skill game-save-and-persistence
Clone the repo
git clone --depth 1 https://github.com/makifbaysal/tasktrooper

Made for: Claude Code, Codex.

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-and-persistence

README.md
[![agentmods](https://agentmods.dev/badge/skills/makifbaysal/tasktrooper/game-save-and-persistence/github.svg)](https://agentmods.dev/skills/makifbaysal/tasktrooper/game-save-and-persistence)
Your own site
<a href="https://agentmods.dev/skills/makifbaysal/tasktrooper/game-save-and-persistence"><img src="https://agentmods.dev/badge/skills/makifbaysal/tasktrooper/game-save-and-persistence/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-and-persistence

Your own site · 80×15
<a href="https://agentmods.dev/skills/makifbaysal/tasktrooper/game-save-and-persistence"><img src="https://agentmods.dev/badge/skills/makifbaysal/tasktrooper/game-save-and-persistence.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,438 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.00056 $0.01438
Opus 5.5 $0.00022 $0.00575
Sonnet 5.5 $0.00011 $0.00288
Haiku 4.5 $0.00006 $0.00144

Measured 4d ago against content hash 09051172e4c8, 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-and-persistence 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 4d ago.

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.

catalog/agents/game-developer/skills/game-save-and-persistence/SKILL.md · 107 lines

How it starts

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

Game Save and Persistence

Overview

A save file outlives the code that wrote it. Players carry saves across updates, crashes happen mid-write, and a lost 40-hour save is the bug players remember. Every save has a version, every older version has a tested migration, and a write never destroys the last good save.

Core principle: Versioned, migrated, written atomically, checked on load — and never deserialized with a format that can execute code.

The format

{
  "version": 3,
  "savedAtUtc": "2026-10-08T12:00:00Z",
  "player": { "levelId": "forest_02", "position": [12.5, 0, -4.0], "hp": 72 },
  "inventory": [{ "itemId": "sword_iron", "count": 1 }],
  "flags": ["met_blacksmith", "boss_forest_defeated"]
}
  • A plain DTO, separate from engine objects: no GameObject, Node or AActor references, no array indices into data tables — stable IDs only (data-driven-gameplay-design).
  • Settings (volume, bindings, accessibility) in a separate file from progress, so resetting one never touches the other.
  • JSON is readable and diff-able; a compact binary format (MessagePack, protobuf, Godot's store_var without objects) is fine when size matters — the version field stays first.

Migrations

type Migration = (save: any) => any;
const migrations: Record<number, Migration> = {
  1: (s) => ({ ...s, version: 2, inventory: s.items.map((id: string) => ({ itemId: id, count: 1 })) }),
  2: (s) => ({ ...s, version: 3, flags: Object.keys(s.questState ?? {}).filter((k) => s.questState[k] === "done") }),
};

export function upgrade(raw: any): SaveV3 {
  if (typeof raw?.version !== "number") throw new SaveError("unversioned");
  if (raw.version > CURRENT) throw new SaveError("from a newer game version");  // refuse, never guess
  let s = raw;
  while (s.version < CURRENT) s = migrations[s.version](s);
  return SaveV3Schema.parse(s);
}
  • One migration per version step, never edited after release; each tested with a fixture file captured from that version (tests/fixtures/saves/v1.json, v2.json).
  • A save from a newer version is refused with a clear message, not loaded and overwritten.
  • Changing a saved field's meaning without bumping the version is the bug this exists to prevent.

Read the full file on GitHub · 107 lines

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. 4d ago First seen · 107 lines · 56 tokens per session scan A 09051172e4c8

Subscribe to this mod's changes

game-save-and-persistence is a skill published in the GitHub repository makifbaysal/tasktrooper (113 stars, last pushed yesterday), licensed Apache-2.0. It adds 56 tokens to every session and 1,438 once invoked, about $0.0002 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-10-09.