godotresources

A dedicated GodotResources skill to help an AI agent efficiently perform tasks related to GodotResources.

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "godotresources" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-5cfea2c1ed0213d3a7d2b658e23f37e636d95b78754f3b644d636f270367eb76. Verify the upstream source and version against https://skillhub.cn/skills/user_3c6cb52e/godot-resources-778k before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

A dedicated GodotResources skill to help an AI agent efficiently perform tasks related to GodotResources.

0 Downloads

Introduction source: third_party · user_3c6cb52e · 1.0.0 Reference

SkillPi interpretation

Tasks
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+**.
Audience
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`.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: Godotresources
slug: godot-resources
version: 1.0.0
displayName: Godotresources
description: >
  GodotResources专用技能,帮助AI Agent高效完成相关任务。
summary: "GodotResources专用技能,帮助AI Agent高效完成相关任务。"
license: Apache-2.0
category: 游戏开发
framework:
  - Claude Code
  - Codex
  - Hermes Agent
  - OpenClaw
  - QClaw
  - WorkBuddy
platform: multi-platform
homepage: https://github.com/1991513ccie-png
repository: https://github.com/1991513ccie-png

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

  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.

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.

Related skills

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

Current listing version

1.0.0

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value85/100

Highlights

  • 针对 Godot 游戏引擎资源管理的专业工具,解决游戏开发中的核心数据管理需求
  • 提供了完整的工作流和最佳实践,具有明确的实用价值
Trigger Precision80/100

Areas to improve

  • 触发词可更具体 Reported severity: Minor

    description 说明了用途但可加入更多具体关键词如 'godot resource'、'tres' 等

    Recommendation: 在 description 中加入更多具体的技术关键词以提高触发精准度

Highlights

  • 有清晰的 When to use 和 When not to use 说明,边界定义良好
Structure and Standards85/100

Areas to improve

  • description 重复 Reported severity: Minor

    frontmatter 和 skill_body 开头都有相同的 description 内容

    Recommendation: 移除 skill_body 开头的重复 description,保持内容简洁

Highlights

  • 结构完整,包含核心工作流、代码示例、陷阱说明和相关技能链接
  • frontmatter 完整,文档组织清晰
Execution Reliability90/100

Highlights

  • 代码示例语法正确,参数使用恰当
  • 覆盖了主要异常情况处理(文件存在性检查、路径说明等)
  • 工具来源明确,均为 Godot 引擎内置功能
Evidence Verifiability (mean of the first four)85/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

  • Save or modify files

    Confirm the output directory and whether existing files will be replaced. Back up important files and prefer a new output directory.

    Mentioned in main document · lines 97
Domains or addresses referenced in the document

These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.

  • github.com

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.