From godot-prompter
Implements save/load systems in Godot 4.3+ using ConfigFile for settings, JSON for game saves, Resource serialization, and SaveableComponent architecture patterns with security warnings.
How this skill is triggered — by the user, by Claude, or both
Slash command
/godot-prompter:save-loadThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Choose the right serialization strategy for your data type. All examples target Godot 4.3+ with no deprecated APIs.
Choose the right serialization strategy for your data type. All examples target Godot 4.3+ with no deprecated APIs.
Related skills: resource-pattern for custom Resource data containers, inventory-system for inventory serialization patterns, godot-project-setup for SaveManager autoload setup.
| Strategy | Best For | Readable | Editor Support | Notes |
|---|---|---|---|---|
| ConfigFile | Settings, simple key-value data | Yes | No | Built-in INI-style, no extra deps |
| JSON | Game saves, flexible structures | Yes | No | Cross-platform, version-migratable |
| Resource .tres | Editor-integrated data | Yes | Yes | NOT secure — never load untrusted files |
| Resource .res | Fast binary data | No | Yes | NOT secure — never load untrusted files |
Security warning: Loading
.tresor.resfiles executes arbitrary GDScript embedded in the resource. Never load Resource files from untrusted sources (user-uploaded files, downloaded mods). Use ConfigFile or JSON for user-generated save data.
ConfigFile writes INI-style sections — ideal for audio / video / controls settings (small, designer-debuggable). Use set_value(section, key, value) then save(path); load with load(path) and get_value(section, key, default).
See references/configfile.md for the full GDScript + C# settings save/load + typical settings-menu wiring.
JSON.stringify(dict) to serialize, JSON.parse_string(text) to deserialize. Read/write through FileAccess. Best for game saves where you want human-readable files. Build a Dictionary that captures all gameplay state (player position, inventory, world flags), serialize, write to user://save_<slot>.json.
See references/json-saves.md for the full GDScript + C# save/load implementation, including FileAccess wrapping and error handling.
For larger games, attach a SaveableComponent to each persistent node. Each component declares save_callable and load_callable. The save manager iterates components by ID, calls each one's save callable, builds a master Dictionary.
See references/save-architecture.md for the full
SaveableComponent+ save-manager implementation.
user:// resolves to a platform-specific writable directory outside the project folder.
| Platform | Path |
|---|---|
| Windows | %APPDATA%\Godot\app_userdata\<project-name>\ |
| macOS | ~/Library/Application Support/Godot/app_userdata/<project-name>/ |
| Linux | ~/.local/share/godot/app_userdata/<project-name>/ |
Always use
user://for save data, neverres://. Theres://path is read-only in exported builds.
Save files outlive the schema that wrote them. Always include "version": <int> at the top of the saved Dictionary; on load, switch on the version and migrate older saves forward incrementally (v1 → v2 → v3 → current). Never break old saves — always migrate.
See references/version-migration.md for the full migration helper pattern.
version integer fielduser://, never res://DirAccess.make_dir_recursive_absolute() before writing savesx/y/z floats (JSON has no Vector type)push_error() on failure_migrate() handles every version from 0 to current, applied incrementallyget_save_slots() and delete_save() helpers exist for UI slot managementnpx claudepluginhub jame581/godotprompter --plugin godot-prompterProvides Godot 4 GDScript patterns for architecture, signals, scenes, state machines, and optimization. Useful for building games, game systems, and best practices.
Guides creation of custom Resources in Godot 4.3+ for typed data containers — item definitions, enemy config, character stats, and editor-integrated data objects.
Provides specialized guidance for Godot Engine projects: .gd, .tscn, .tres file formats, component-based patterns, signals, resources, debugging, validation tools, templates, and CLI workflows.