mcpbeat Sign in

Godot Resources Agent Skill

> 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.

2k tokens
context cost
the whole folder, loaded on every use
2
files
instructions only
0
copies elsewhere
how many repositories repackaged it
401
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/gamedev-skills/awesome-gamedev-agent-skills --skill godot-resources

The instruction itself

11 sections, as written by the author

Godot Resources (4.x)

Model game data as reusable, Inspector-editable Resource objects instead of hard-coded

values, and load/save them as .tres/.res. Targets Godot 4.3+.

When to use

  • Use when representing items, stats, enemy configs, dialogue lines, or level metadata as

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.

Core workflow

  • 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.

  • 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.

  • Reference resources from nodes via @export var data: ItemResource, or arrays

@export var loot: Array[ItemResource].

  • Load at runtime with preload (constant path) or load/ResourceLoader.load

(variable path). Use threaded loading for large assets.

  • Duplicate before mutating a shared resource at runtime, or every node using it

changes too (resources are shared references).

  • Save generated/edited resources with ResourceSaver.save.

Patterns

1. A custom data resource

# 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.

2. Consume resources from a node

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])

3. Duplicate before mutating shared data

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 copy

4. Save and load a resource at runtime

func 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

Pitfalls

  • Resources are shared by reference. A single .tres assigned to many nodes is the

*same* 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 appear

in the "New Resource" dialog or as an @export type.

  • res:// is read-only in exported games. Write runtime data to user://, never

res://. ResourceSaver.save to res:// only works in the editor.

  • Storing nodes in a Resource doesn't serialize them. Resources hold data, not live

scene nodes. Reference scenes via PackedScene, not node instances.

  • Cyclic resource references (A holds B holds A) can fail to save/load cleanly — keep

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.

  • Don't put secrets in .tres — they ship in plain text inside the export.

References

  • For threaded/background loading (load_threaded_request), @tool resources with custom

setup, 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.

Other skills for the same job

different authors, same section of the catalogue
Protocolsio Integration
by christophacham
×4

Integration with protocols.io API for managing scientific protocols. This skill should be used when working with protocols.io to search, create, update, or publish protocols; manage protocol steps and materials; handle discussions and comments; organize workspaces; upload and manage files; or integrate protocols.io functionality into workflows. Applicable for protocol discovery, collaborative protocol development, experiment tracking, lab protocol management, and scientific documentation.

16k tokens
Tailored Resume Generator
by frostant
×4

Analyzes job descriptions and generates tailored resumes that highlight relevant experience, skills, and achievements to maximize interview chances

3k tokens
Excalidraw Diagram Generator
by github
vendor ×3

Generate Excalidraw diagrams from natural language descriptions. Use when asked to "create a diagram", "make a flowchart", "visualize a process", "draw a system architecture", "create a mind map", or "generate an Excalidraw file". Supports flowcharts, relationship diagrams, mind maps, and system architecture diagrams. Outputs .excalidraw JSON files that can be opened directly in Excalidraw.

36k tokens scripts
Expo Dev Client
by openai
vendor ×3

Build and distribute Expo development clients locally or via TestFlight

961 tokens
Executing Plans
by ZhanlinCui
×3

Use when you have a written implementation plan to execute in a separate session with review checkpoints

542 tokens
Anndata
by christophacham
×3

Data structure for annotated matrices in single-cell analysis. Use when working with .h5ad files or integrating with the scverse ecosystem. This is the data format skill—for analysis workflows use scanpy; for probabilistic models use scvi-tools; for population-scale queries use cellxgene-census.

16k tokens
Benchling Integration
by christophacham
×3

Benchling R&D platform integration. Access registry (DNA, proteins), inventory, ELN entries, workflows via API, build Benchling Apps, query Data Warehouse, for lab data management automation.

14k tokens
Biopython
by christophacham
×3

Comprehensive molecular biology toolkit. Use for sequence manipulation, file parsing (FASTA/GenBank/PDB), phylogenetics, and programmatic NCBI/PubMed access (Bio.Entrez). Best for batch processing, custom bioinformatics pipelines, BLAST automation. For quick lookups use gget; for multi-service integration use bioservices.

24k tokens

How to use it

Copy the folder

Take gamedev-skills/godot-resources from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.