bgrenat/godot-game-dev-studio/gamedev-save-systems
Claude Code and agent skill by bgrenat/godot-game-dev-studio
- community
Checking that the SKILL.md file is still in the repository.
Imported awesome-gamedev-agent-skills guidance for save-systems workflows in game development projects. Use when designing save files: what to serialize, crash-safe atomic writes, slots, and versioned migration of old saves.
Install
npx vskill@latest install bgrenat/godot-game-dev-studio/gamedev-save-systemsSKILL.md
The same SKILL.md was published earlier as bgrenat/godot-game-dev-studio/gamedev-save-systems.
Save systems
A save file is a serialized snapshot of game state that survives restarts. The hard parts aren't writing bytes — they're choosing what to save, writing it so a crash mid-save can't corrupt it, and reading old saves after you ship a patch. Get those three right and the rest is plumbing.
When to use
- Use to persist progress: player stats, inventory, world flags, settings,
positions — across sessions and game updates.
- Use to design save slots, quicksave/autosave, and crash-safe writes.
- Use when old save files break after a content/code change (versioning &
migration).
When *not* to use: for Roblox cloud persistence specifics, use roblox-datastores. For the data model the save serializes (resources/SOs), use godot-resources / unity-scriptableobjects. For Godot's FileAccess/ ResourceSaver and user:// paths, defer to the Godot engine skill while applying the patterns here.
Core workflow
- Decide what state is authoritative. Save the data (hp, position, seed,
unlocked flags), not engine objects or scene nodes. You will reconstruct objects from data on load — never serialize live node references.
- Define a versioned schema. Every save embeds a
versioninteger. This is
the single most important field for a game you intend to patch.
- Pick a format. JSON/text for readability and debuggability; a binary
format for size/speed or mild tamper-resistance. Start with JSON.
- Write atomically. Serialize to a temp file, flush, then rename over the
real file. A crash leaves either the old save or the new one — never a half-written one.
- Load defensively. Read version → migrate up to current → validate →
instantiate. Keep a backup of the last good save and fall back on parse error.
- Autosave on safe boundaries (level change, checkpoint), throttled, and to a
separate slot so it can't clobber a manual save.
- Verify: save, fully quit, relaunch, load — and confirm by inspection that
state matches. Test loading a save from the previous version.
Patterns
1. Serialize state as plain data (not engine objects)
2. Atomic, crash-safe write (temp + rename)
Rename-over-target is atomic on POSIX (same volume); on Windows a replace-by-rename isn't guaranteed atomic, so keep the previous file as path + ".bak" before the rename — that backup is what actually guarantees you can recover from a bad write.
3. Versioned load with migration
4. Save slots + throttled autosave
Pitfalls
- Serializing engine objects/node paths ties saves to scene structure;
renaming a node breaks every old save. Save data, rebuild objects on load.
- No version field. The day you ship a patch, every existing save is a
guessing game. Stamp version from version 1.
- In-place writes corrupt saves on crash/power loss. Always temp-write then
rename; keep a .bak.
- Trusting the file blindly. Saves get truncated, hand-edited, or
cloud-synced stale. Validate on load and fall back to backup on failure.
- Floats and locale. Text serializers can drop precision or use comma
decimal separators in some locales. Use a locale-invariant serializer.
- Autosave clobbering manual saves, or firing mid-action and saving an
inconsistent state. Use a dedicated autosave slot and save on safe boundaries.
- Storing secrets or trusting client saves in multiplayer. A local save is
player-controlled; never treat it as authoritative for online state. For cloud, handle the device's data limits and conflicts (roblox-datastores).
References
references/versioning-and-migration.md— schema evolution strategies, the
migration chain, backups/rollback, format trade-offs (JSON vs binary), and a load-time validation checklist.
Related skills
roblox-datastores— cloud persistence, request limits, session locking.godot-resources,unity-scriptableobjects— the data model you serialize.procedural-gen— store the seed to regenerate worlds instead of saving them.rpg,survival-crafting,visual-novel— genres that compose this skill.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/gamedev-save-systems/SKILL.md
Popularity
- Repository stars
- 24
- Repository forks
- 3
- 7-day trend score
- 14
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/bgrenat/godot-game-dev-studio/gamedev-save-systems)