Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Design data-driven Godot 4.x games with custom Resource classes: define typed data with class_name + @export, save/load .tres/.res files, instance and duplicate resources, and load on demand with ResourceLoader (incl. threaded loading). Use when modeling items/stats/configs as data in a Godot project, creating .tres resources, or working with custom Resource subclasses and ResourceLoader/ResourceSaver.
.claude/skills/gamedev-skills-godot-resources/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-19 | ✗→✓ | ▲ Improved | 92% | 0% |
| case-22 | ✓→✗ | ▼ Worse | 90% | 0% |
| case-09 | ✓→✓ | = Same ✓ | 309% | 0% |
| case-01 | ✓→✓ | = Same ✓ | 159% | 0% |
| case-02 | ✓→✓ | = Same ✓ | 198% | 0% |
Model game data as reusable, Inspector-editable Resource objects instead of hard-coded values, and load/save them as .tres/.res. Targets Godot 4.7.
data; authoring .tres files in the Inspector; or loading/saving custom resources.
When not to use: nodes/scene structure → godot-nodes-scenes; saving the player's runtime progress (engine-agnostic save format/slots) → save-systems; the C# variant of this pattern → godot-csharp.
Resource with class_name and @export fields. It now appears in the"New Resource" dialog and as an @export type, editable in the Inspector.
.tres files in the FileSystem dock (text, diff-friendly) or.res (binary, smaller/faster). Edit their fields in the Inspector — no code needed.
@export var data: ItemResource, or arrays@export var loot: Array[ItemResource].
preload (constant path) or load/ResourceLoader.load(variable path). Use threaded loading for large assets.
changes too (resources are shared references).
ResourceSaver.save.gdscript# item.gd extends Resource class_name ItemResource @export var id: StringName = &"" @export var display_name: String = "Item" @export_multiline var description: String = "" @export var icon: Texture2D @export var max_stack: int = 99 @export var value: int = 0
Create sword.tres from this class in the FileSystem dock and fill it in the Inspector.
gdscriptextends Node @export var starting_items: Array[ItemResource] = [] # drag .tres files in the Inspector func _ready() -> void: for item in starting_items: print("Have: %s (x%d max)" % [item.display_name, item.max_stack])
gdscriptfunc give_unique_copy(template: ItemResource) -> ItemResource: # true = deep copy sub-resources too; false = shallow (shares sub-resources). var copy: ItemResource = template.duplicate(true) copy.value += 5 # mutating the copy won't touch the template .tres return copy
gdscriptfunc save_config(cfg: Resource) -> void: ResourceSaver.save(cfg, "user://config.tres") # user:// = writable app data dir func load_config() -> Resource: if ResourceLoader.exists("user://config.tres"): return ResourceLoader.load("user://config.tres") return null
.tres assigned to many nodes is thesame object — mutating it changes all of them (and re-saving the file). Call duplicate(true) for per-instance state.
class_name required to instance from the editor. Without it the class won't appearin the "New Resource" dialog or as an @export type.
res:// is read-only in exported games. Write runtime data to user://, neverres://. ResourceSaver.save to res:// only works in the editor.
scene nodes. Reference scenes via PackedScene, not node instances.
data graphs acyclic or use IDs/lookups.
preload vs load. preload needs a constant path and loads with the script;load accepts a variable path at runtime. Use ResourceLoader.exists() before load to avoid errors on missing files.
.tres — they ship in plain text inside the export.load_threaded_request), @tool resources with customsetup, custom ResourceFormatLoader/Saver, resource-local-to-scene, and resource UIDs, read references/resource-patterns.md.
godot-gdscript — @export annotations used to define resource fields.godot-nodes-scenes — instancing scenes vs. sharing resource data.save-systems — persisting runtime progress (separate from static data).unity-scriptableobjects — the equivalent data-asset pattern in Unity.| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-09 | pass→pass | 2,729 | 2,515 | -8% | 1 | 1 | 0% | 393 | 1,608 | +309% | 0 | 0 | — |
case-01 | pass→pass | 3,773 | 3,829 | +1% | 1 | 1 | 0% | 710 | 1,840 | +159% | 0 | 0 | — |
case-02 | pass→pass | 3,511 | 3,541 | +1% | 1 | 1 | 0% | 638 | 1,899 | +198% | 0 | 0 | — |
case-03 | pass→pass | 10,880 | 6,032 | -45% | 1 | 1 | 0% | 1,855 | 2,240 | +21% | 0 | 0 | — |
case-04 | pass→pass | 5,379 | 4,964 | -8% | 1 | 1 | 0% | 1,072 | 2,236 | +109% | 0 | 0 | — |
case-05 | pass→pass | 5,382 | 4,519 | -16% | 1 | 1 | 0% | 965 | 2,015 | +109% | 0 | 0 | — |
case-06 | pass→pass | 4,895 | 18,921 | +287% | 1 | 1 | 0% | 991 | 1,852 | +87% | 0 | 0 | — |
case-07 | pass→pass | 4,059 | 4,423 | +9% | 1 | 1 | 0% | 704 | 2,084 | +196% | 0 | 0 | — |
case-08 | pass→pass | 6,901 | 3,632 | -47% | 1 | 1 | 0% | 1,269 | 1,830 | +44% | 0 | 0 | — |
case-10 | pass→pass | 15,010 | 11,391 | -24% | 1 | 1 | 0% | 2,608 | 3,259 | +25% | 0 | 0 | — |
case-11 | pass→pass | 5,760 | 5,752 | -0% | 1 | 1 | 0% | 1,150 | 2,298 | +100% | 0 | 0 | — |
case-12 | pass→pass | 2,819 | 1,829 | -35% | 1 | 1 | 0% | 545 | 1,576 | +189% | 0 | 0 | — |
case-13 | pass→pass | 3,123 | 2,670 | -15% | 1 | 1 | 0% | 652 | 1,705 | +162% | 0 | 0 | — |
case-14 | pass→pass | 6,197 | 4,841 | -22% | 1 | 1 | 0% | 1,177 | 2,065 | +75% | 0 | 0 | — |
case-15 | pass→pass | 14,472 | 9,860 | -32% | 1 | 1 | 0% | 2,401 | 2,691 | +12% | 0 | 0 | — |
case-16 | pass→pass | 10,604 | 5,994 | -43% | 1 | 1 | 0% | 1,901 | 2,353 | +24% | 0 | 0 | — |
case-17 | pass→pass | 11,137 | 7,179 | -36% | 1 | 1 | 0% | 1,957 | 2,540 | +30% | 0 | 0 | — |
case-18 | pass→pass | 7,187 | 6,768 | -6% | 1 | 1 | 0% | 1,434 | 2,410 | +68% | 0 | 0 | — |
case-19 | fail→pass | 4,700 | 3,250 | -31% | 1 | 1 | 0% | 886 | 1,700 | +92% | 0 | 0 | — |
case-20 | pass→pass | 7,100 | 7,663 | +8% | 1 | 1 | 0% | 1,447 | 2,820 | +95% | 0 | 0 | — |
case-21 | pass→pass | 18,736 | 14,043 | -25% | 1 | 1 | 0% | 4,237 | 4,321 | +2% | 0 | 0 | — |
case-22 | pass→fail | 6,100 | 4,448 | -27% | 1 | 1 | 0% | 1,105 | 2,100 | +90% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of 0 percentage points is the difference between those two pass rates over the 22 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
| Model | Method | Date | Lift |
|---|---|---|---|
| gemini-3.6-flash | verified | 8/2/2026 | +5% |
Other measured skills in the registry, with their headline benchmark lift.