MCPInstall

godot-resource-data-patterns

Expert blueprint for data-oriented design using Resource/RefCounted classes (item databases, character stats, reusable data structures). Covers typed arrays, serialization, nested resources, and resource caching. Use when implementing data systems OR inventory/stats/dialogue databases. Keywords Resource, RefCounted, ItemData, CharacterStats, database, serialization, @export, typed arrays.

Installs
501
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/thedivergentai/game-dev-agentic-skills --skill godot-resource-data-patterns
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads godot-resource-data-patterns automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

NEVER Do in Resource Design

  • NEVER modify resource instances directly — Without .duplicate(), changing a value (like HP) modifies the shared .tres for everyone.
  • NEVER use untyped arrays in Resources — @export var items: Array allows logic errors. Always use Array[ResourceClass] for type safety.
  • NEVER store Node references in Resources — Objects that only exist in a specific SceneTree cannot be serialized. Store NodePath or UID.
  • NEVER perform heavy calculations in Resource getters/setters — Resources should be data containers. Offload logic to Nodes or specialized RefCounted classes.
  • NEVER skip ResourceSaver.save() error checks — Saving can fail due to permissions, disk space, or path issues. Always check the return code.
  • NEVER use Resources for high-frequency runtime data — If a value changes 60 times a second (like velocity), a standard variable is faster than a Resource property.
  • NEVER allow circular Resource references — If A.tres references B.tres and B.tres references A.tres, the engine may crash on load.
  • NEVER forget the _init defaults — Resources created via new() or in the Inspector need default values in their constructor to be editable.
  • NEVER share a Resource between entities if they need unique state — Use resource_local_to_scene = true or duplicate() for components.
  • NEVER use .tres for massive datasets — If you have 10,000 items, a JSON or custom binary format might be more efficient than individualized Resource files.

Decision Tree: Resource vs RefCounted vs Node

TypeUse whenDisk / Inspector
ResourceShared definitions, saveable data, @export authoring.tres/.res, Inspector ✅
RefCountedTemporary runtime calcs, non-persistent helpersNo disk / weak Inspector
NodeScene entities with process/signals in the treeScene files

Use Resources for: item defs, stats templates, abilities, dialogue tables, enemy configs. Use RefCounted for: damage calc scratchpads, ephemeral state machines, non-saved utilities.

Available Scripts — MANDATORY by Scenario

ScenarioMANDATORY read
Per-instance mutable stats (HP) sharing a base .tresresource_local_to_scene.gd
Nested Item → Weapon → StatusEffect trees / save whole graphnested_resource_serialization.gd
Many entities sharing one config (flyweight)resource_flyweight_caching.gd / flyweight_enemy_config.gd
Custom @export data containerscustom_data_resource.gd
Reactive stats with signalscharacter_stats_resource.gd
Inventory arrays of Resourcesresource_based_inventory.gd
Save Resource trees to diskresource_save_system.gd — check Error
Preload / O(1) cache before playresource_preloading_strategy.gd
Runtime Resource.new() lootdynamic_resource_generation.gd
Validate / pool / factoryresource_validator.gd / resource_pool.gd / data_factory_resource.gd

Expert WHY (critical)

CAUTION: Runtime HP/mana on a shared .tres without duplicate(true) or resource_local_to_scene mutates the asset on disk — the "damaging one damages all" bug.

  • .res vs .tres: binary .res in production; .tres for design diffs; nested trees save with parent via ResourceSaver.
  • Cache: ResourceLoader.CACHE_MODE_REPLACE after external edits bypass stale cache.
  • Local-to-scene / duplicate: mandatory for per-instance components — resource_local_to_scene.gd.
  • 10k+ rows: individualized .tres files lose to JSON/binary — see Official Docs binary serialization.

Deep dive (load on demand)

Pattern 1–7 walkthroughs (ItemData, databases, RefCounted calcs, directory scan, O(1) cache) — references/resource-patterns-deep.md. Implement nested weapons from nested_resource_serialization.gd, not memory.

Reference

Progressive disclosure: open Official Documentation links only when researching a specific API; load Related Skills when routing to a peer domain — do not preload the whole lattice.

Official Documentation

  • Resources — Custom Resource scripts, .tres/.res, sharing vs duplicate(), and resource_local_to_scene for per-instance state.
  • Data preferences — When to store data in Resources vs dictionaries, ConfigFile, or plain scripts for inspector and serialization needs.
  • Resource — duplicate, emit_changed, resource_path, and local-to-scene flags used by every data container pattern here.
  • ResourceLoader — Cached load / threaded requests that power flyweight sharing and preload caches.
  • ResourceSaver — Persist custom Resources to user:// or res:// and always check the returned Error.
  • RefCounted — Lightweight runtime objects when you need refcounting without disk serialization or Inspector exports.
  • Saving games — Broader save strategies that pair with ResourceSaver for slot-based .tres state.
  • Background loading — Threaded ResourceLoader polling so databases and VFX packs do not hitch the main thread.
  • GDScript exports — Typed @export / Array[T] so item and quest Resources stay Inspector-safe.
  • Binary serialization API — Compact FileAccess packing when thousands of rows outgrow individualized .tres files.
  • Scene organization — Why shared Resources live outside scene trees and how component scenes compose exported data.

Related Skills

Prerequisites

  • godot-project-foundations — Project layout, import, and res:// hygiene before authoring shared .tres databases.
  • godot-gdscript-mastery — class_name, typed arrays, setters, and @tool discipline every custom Resource script depends on.

Complements

  • godot-signal-architecture — Ownership and fan-out for Resource changed / custom signals that drive reactive UI and stats.
  • godot-save-load-systems — Slot versioning, migration, and secure paths that wrap ResourceSaver/ResourceLoader save flows.
  • godot-scene-management — Packed scenes and threaded loads that consume preloaded Resource caches without hitch spikes.
  • godot-ability-system — Ability/buff definitions are Resource data; this skill owns the container and serialization patterns.
  • godot-dialogue-system — Dialogue graphs and line tables are nested Resources that reuse typed-array and save patterns here.
  • godot-performance-optimization — Flyweight sharing, pooling RefCounted payloads, and when .res beats text .tres at scale.

Downstream / consumers

  • godot-inventory-system — Item stacks, equipment, and bags consume ItemData / inventory Resource arrays defined here.
  • godot-procedural-generation — Generators that instantiate loot, quests, and configs via Resource.new() at runtime.
  • godot-monte-carlo-balancer — .tres stats and economy tables are the preferred extract source — build the data layer before regex farms.

Master

  • godot-master — Library router and mirrored module entry for cross-skill discovery.

FAQ

What does the godot-resource-data-patterns skill do?

Expert blueprint for data-oriented design using Resource/RefCounted classes (item databases, character stats, reusable data structures). Covers typed arrays, serialization, nested resources, and resource caching. Use when implementing data systems OR inventory/stats/dialogue databases. Keywords Resource, RefCounted, ItemData, CharacterStats, database, serialization, @export, typed arrays.

How do I install godot-resource-data-patterns?

Run npx skills add https://github.com/thedivergentai/game-dev-agentic-skills --skill godot-resource-data-patterns in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/godot-resource-data-patterns/ (personal) or .claude/skills/godot-resource-data-patterns/ (project).

Which AI agents can use godot-resource-data-patterns?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is godot-resource-data-patterns safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains godot-resource-data-patterns?

It is published by thedivergentai in thedivergentai/game-dev-agentic-skills. It has 501 recorded installs.

More from thedivergentai/game-dev-agentic-skills

View all →

godot-master

thedivergentai/game-dev-agentic-skills

Consolidated expert library for professional Godot 4.7+ game and application development. Orchestrates 92 Domain Skills through architectural workflows, anti-pattern catalogs, performance budgets, and Server API patterns. Use when: (1) starting a new Godot project, (2) designing game or app architecture, (3) building entity/component systems, (4) debugging performance or physics issues, (5) choosing between 2D/3D approaches, (6) implementing multiplayer, (7) optimizing draw calls or script time, (8) porting between platforms, (9) migrating from 4.6 to 4.7. Primary entry point for ALL Godot development tasks. Keywords: Godot 4.7, AreaLight3D, HDR, Asset Store, godot-master.

godot-shaders-basics

thedivergentai/game-dev-agentic-skills

Expert Godot shader patterns for batch-safe hitflash, alpha-scissor foliage/dissolve, screenspace postFX, depth reconstruction, triplanar, and instance uniforms — not first-shader tutorials. Trigger on draw-call batching breaks, discard vs depth-prepass, foliage shadows, post-process quads, or world-position FX. Keywords: instance uniform, ALPHASCISSOR, hintscreentexture, hintdepthtexture, global uniform, sampler2DArray, canvasitem, spatial, post-processing.

AI & Agents691 installs

godot-2d-animation

thedivergentai/game-dev-agentic-skills

Expert patterns for 2D animation in Godot using AnimatedSprite2D and skeletal cutout rigs. Use when implementing sprite frame animations, procedural animation (squash/stretch), cutout bone hierarchies, or frame-perfect timing systems. Trigger keywords: AnimatedSprite2D, SpriteFrames, animationfinished, animationlooped, framechanged, frameprogress, setframeandprogress, cutout animation, skeletal 2D, Bone2D, procedural animation, animation state machine, advance(0).

Frontend & Design688 installs

godot-ui-theming

thedivergentai/game-dev-agentic-skills

Expert blueprint for UI themes using Theme resources, StyleBoxes, custom fonts, and theme overrides for consistent visual styling. Covers StyleBoxFlat/Texture, theme inheritance, dynamic theme switching, and font variations. Use when implementing consistent UI styling OR supporting multiple themes. Keywords Theme, StyleBox, StyleBoxFlat, addthemeoverride, font, theme inheritance, dark mode.

Frontend & Design623 installs

godot-gdscript-mastery

thedivergentai/game-dev-agentic-skills

Expert GDScript landmine guidance: static typing opcodes, signal-up/call-down, %UniqueName/@onready lifecycle, Callable bind/unbind, await sequences, typed collections, and safe Dictionary iteration. Use for code review, refactoring hot paths, or project standards. Trigger keywords: statictyping, signalarchitecture, uniquenodes, @onready, classname, signalupcalldown, Callable.bind, typedcollections, awaitsequence.

godot-particles

thedivergentai/game-dev-agentic-skills

Expert blueprint for GPU particle systems (explosions, magic effects, weather, trails) using GPUParticles2D/3D, ParticleProcessMaterial, gradients, sub-emitters, and custom shaders. Use when creating VFX, environmental effects, or visual feedback. Keywords GPUParticles2D, ParticleProcessMaterial, emissionshape, colorramp, subemitter, oneshot.

Media & Creative614 installs

Popular data & databases skills

View category →

Postgres best practices maintained by Supabase, for Postgres running anywhere. Load this skill BEFORE writing or changing anything that lives in a Postgres database: creating or altering tables and columns (including choosing column types), schema design, migrations and declarative schema files, RLS policies and the tests that verify them, indexes, triggers, database functions, queues and scheduled jobs (pgcron, pgmq), vector/semantic search (pgvector), and restoring dumps (pgrestore) or importing data. Also load it when diagnosing slow queries, high CPU, timeouts, EXPLAIN plans, connection exhaustion, locking, bloat, or rows visible to the wrong user or tenant. This is not just a performance guide — schema, migration, security, and SQL authoring tasks need these rules too, even for a one-column change or a single query.

OfficialData & Databases462.2K installs

prisma-client-api

prisma/skills

Prisma Client API reference covering model queries, filters, operators, and client methods. Use when writing database queries, using CRUD operations, filtering data, or configuring Prisma Client. Triggers on "prisma query", "findMany", "create", "update", "delete", "$transaction".

OfficialData & Databases393.5K installs

Deprecated compatibility name for prisma-orm-setup. Use only when a user or existing integration explicitly invokes prisma-database-setup; otherwise select prisma-orm-setup.

OfficialData & Databases392.3K installs

prisma-cli

prisma/skills

Prisma ORM 7 CLI reference for existing Prisma 7 applications or explicitly selected Prisma 7 workflows. Covers prisma init, generate, migrate, db, dev, studio, and mcp. For setup, connection repair, or Prisma 8, use prisma-orm-setup; not the Prisma Platform CLI.

OfficialData & Databases390.8K installs

prisma-postgres

prisma/skills

Deprecated compatibility name for prisma-postgres-setup. Use only when a user or existing integration explicitly invokes prisma-postgres; otherwise select prisma-postgres-setup.

OfficialData & Databases384.4K installs

Required reference for Prisma ORM 7 SQL driver adapter work. Use when implementing or modifying adapters, adding database drivers, or touching SqlDriverAdapter, Transaction, savepoint, result mapping, or DriverAdapterError behavior. Covers current transaction lifecycle, optional savepoint hooks, original database-error preservation, and verification.

OfficialData & Databases378.9K installs