ai-behavior-trees-util…
Build a production behavior-tree runtime (Blackboard, action/condition leaves, sequence/selector/parallel composites, decorators) and a Utility AI system…
Design data-driven Godot 4.7 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
$ npx -y skills add gamedev-skills/awesome-gamedev-agent-skills --skill godot-resources --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/godot-resourcesContext preview
The summary Claude sees to decide when to auto-load this skill.
Design data-driven Godot 4.7 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
name: godot-resources description: > Design data-driven Godot 4.7 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.
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`.
1. **Subclass `Resource`** with `class_name` and `@export` fields. It now appears in the "New Resource" dialog and as an `@export` type, editable in the Inspector. 2. **Create instances as `.tres`** files in the FileSystem dock (text, diff-friendly) or `.res` (binary, smaller/faster). Edit their fields in the Inspector — no code needed. 3. **Reference resources from nodes** via `@export var data: ItemResource`, or arrays `@export var loot: Array[ItemResource]`. 4. **Load at runtime** with `preload` (constant path) or `load`/`ResourceLoader.load` (variable path). Use threaded loading for large assets. 5. **Duplicate before mutating** a shared resource at runtime, or every node using it changes too (resources are shared references). 6. **Save generated/edited resources** with `ResourceSaver.save`.
# 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.
extends 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])func 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 copyfunc 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*same* object — mutating it changes all of them (and re-saving the file). Call `duplicate(true)` for per-instance state.
in the "New Resource" dialog or as an `@export` type.
`res://`. `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.
`load` accepts a variable path at runtime. Use `ResourceLoader.exists()` before `load` to avoid errors on missing files.
setup, custom `ResourceFormatLoader`/`Saver`, resource-local-to-scene, and resource UIDs, read `references/resource-patterns.md`.
<img src="docs/assets/banner.png" width="820" alt="awesome-gamedev-agent-skills — game-dev skills for AI coding agents.
Repo: gamedev-skills/awesome-gamedev-agent-skills
Build a production behavior-tree runtime (Blackboard, action/condition leaves, sequence/selector/parallel composites, decorators) and a Utility AI system…
Implement game audio practice — bus/mixer architecture and gain in decibels, ducking (sidechain), adaptive/dynamic music via layering and re-sequencing, SFX…
Build game cameras that feel good — 2D follow with a deadzone, look-ahead, smoothing, and level-bounds clamping; 3D third-person orbit with collision and…
Plan, generate, source, normalize, and validate cohesive visual game assets. Use for art direction, style bibles, sprites, tilesets, backgrounds, UI art,…
Build branching dialogue and narrative — a node/choice graph with conditions, variables, and localization hooks — and choose between authoring tools Ink and…
Design NPC and enemy decision-making with finite state machines, behavior trees, steering behaviors, and A* pathfinding — engine-neutral algorithms that pair…