/xenodot:godot-data-driven-compositionfrom xenodot
Implements a generic data-driven composition pattern in Godot 4.x where typed .tres Resource carriers hold ordered composable parts, enabling designers to author new variants as data instead of code.
Ships in xenodot. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Any "a thing made of an ordered set of composable parts" system — abilities (effects), enemies
(behaviours), items, traps, status stacks — wants the SAME backbone: a typed Resource that
CARRIES the data and lists the parts, parts that compose without subclassing, and new variants
authored as .tres rather than code. This skill is that backbone. The two flavours that build on
it differ on ONE axis — whether a part is STATELESS (a fire-once Resource) or STATEFUL (a
per-frame Node) — and live in their own skills.
godot-code-rules (or the project's strict-typing gate) — every Resource/part is strict typed
GDScript: line-1 path header, class_name, typed @exports/returns; duck-typed seams guarded
with has_method + @warning_ignore("unsafe_method_access"). Load BEFORE writing.godot-composition — parts compose as data (Resource sub-resources) or child component Nodes;
signals up / calls down; no god-object manager by default.Resource (.tres, NOT JSON). Holds metadata + an ordered @export
list of parts (+ optional config such as a resolver). Prefer .tres: Godot gives typed
sub-resources, in-editor authoring, and load-time type checks for free; JSON throws all three
away.@export
tunables. Composing parts = a new combination, never a new subclass.has_method guard (then
@warning_ignore("unsafe_method_access")), assuming no concrete type — so the same part works
across hosts and a missing seam no-ops instead of crashing..tres. Mixing parts / swapping config in a resource is the authoring
act; the call sites never change. That is the whole payoff.The part-shape splits everything. Decide by what a part must DO:
stateless → godot-effect-composition | stateful → godot-enemy-archetype | |
|---|---|---|
| Part is a… | Effect Resource | Node behaviour |
| Lifecycle | apply(target, ctx) fire-once | bind(host) + _physics_process + tweens |
| Per-instance state | none (read-only tunables) | yes (guards, counters, timers, owned nodes/materials) |
| Shared across loaders | YES — fine (stateless) | NO — fresh node instance per host |
| New part | new Effect subclass / .tres | new behaviour scene / .tres |
Why it's load-bearing: a Resource has no _physics_process, no scene-tree lifecycle, and a
.tres loaded twice SHARES its sub-resources across every loader. Perfect for a stateless effect,
FATAL for per-instance behaviour. So: stateless/fire-once → Resource parts (effect flavour);
per-frame/stateful/owns-nodes → Node parts (enemy flavour). Never model a stateful behaviour as an
Effect Resource.
.tres sharing caveat (decides the flavour)A .tres loaded more than once shares its @export sub-resource objects across every loader.
Harmless while a part is stateless (read-only amount). The moment a part holds mutable
per-instance state, either make it a Node (stateful flavour) or, if it must stay a Resource, make
it unique — resource_local_to_scene = true on the sub-resource, or duplicate(true) the carrier
at load.
Keep iteration/application in the entity that OWNS the trigger (the spawned projectile, the enemy, the trap). Introduce a manager component ONLY when a real need forces it — instigator-side effects with no carrier, multi-stage / multi-spawn sequencing, or a prereq/cost gate that must validate before anything spawns. Until then a manager is a god-object that re-centralizes what the composition decentralized.
.tres ONLY (part mix / config swap), no call-site edit, and it
works.godot-runtime-smoke): load the .tres, run the real iteration loop against a
stub/real host, assert the observable — and it FAILS if you break the loop (a test that can't
fail proves nothing)..tres is assigned non-null on the live node in the shipped scene — not only
loadable. Authored + read is TWO halves; the third is WIRED. Load the entity scene, instantiate,
and assert node.get(prop) != null (the deterministic check_scene_export_assigned(scene, node, prop) check). An @export that is authored and read but never assigned in the .tscn is a dead
feature behind a green gate — and a smoke that INJECTS the resource itself proves the seam, not
that production wires it, so it must be a SEPARATE check that reads the real scene without
injecting. Enroll the pair on the gate floor: add a <scene.tscn> <NodePath> <field> line to
design/export-wiring.tsv — validate.sh (check_export_assigned) runs every enrolled pair on
each build; no file = SKIP.| Symptom | Fix |
|---|---|
| Want JSON config | Use .tres typed Resources — typed sub-resources, editor authoring, load-time checks; JSON loses all three. |
UNSAFE_METHOD_ACCESS fails the strict gate | Annotate the guarded duck-typed call @warning_ignore("unsafe_method_access"); never lower warning levels. |
| Part crashes on some hosts | Don't assume a type — has_method guard, no-op when the seam is absent. |
| State bleeds across instances / all share a counter or material | A .tres shares sub-resources across loaders. Stateless part → fine; stateful → use a Node (enemy flavour) or duplicate() the resource/material before mutating. |
| A central manager grew and owns everything | Move iteration back into the owning entity; a manager only validates prereqs / builds context for instigator-side or multi-stage cases. |
| Adding a part forces call-site edits | The host must only iterate the part list + duck-check the role method; a new part is a new scene/.tres, never a call-site change. Widen the seam contract once, not per part. |
| Smoke/gate passes but the feature is dead in the shipped scene | A smoke bot INJECTED the .tres/dependency programmatically — it proves the seam, not that production wires it. Assert the live-node assignment with a SEPARATE check_scene_export_assigned / smoke_*_wire_check.gd that loads the real .tscn and reads node.get(prop) != null WITHOUT injecting. A bot that injects what production must wire manufactures a false green. |
Generic base. Flavours: godot-effect-composition (stateless effects → abilities / buffs / debuffs / dots), godot-enemy-archetype (stateful node behaviours → trait-mixing enemies).
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
godot, data-driven, composition, resource, game-architecture
npx claudepluginhub arthur0n/xenodot-forge --plugin xenodot50 skills in this plugin
/agent-reportThe agent→orchestrator handoff protocol. A backgrounded worker's relayed result string truncates on long, tool-heavy turns, so the handoff is an artifact, not a string — the worker Writes its full report to a file, and the orchestrator reads that file directly. Load this whenever a task asks you to hand off a structured report to another agent. Any agent doing background work that must be handed off uses it — not only builders. Defines the report contract the writer follows./autonomous-main-goalThe hive's Autonomous Mode self-drive loop. When a standing Main Goal is active, evaluate it, break it into ordered slices, then on each `[Autonomous check/cavemanUltra-compressed communication mode — always active for this agent. Cuts token usage ~75% by dropping filler, articles, and pleasantries while keeping full technical accuracy. Drop only when interviewing the user via mcp__ui__form (labels/descriptions must be clear prose).
/godot-3d-pixelationSubViewport-based low-resolution crisp rendering of a 3D scene in Godot 4.x — the foundation of the "3D pixel art" style. Use for pixelated/retro/PSX/low-res 3D, setting SubViewport render resolution, "crisp pixels", restructuring a scene tree so 3D renders below window resolution, or when a downscaled viewport looks blurry./godot-animation-librariesImport and play skeletal animations on a sourced 3D character in Godot 4.6 — the separate-glTF workflow (one model file + anim-only files), merging anim clips into an AnimationLibrary loaded onto your own AnimationPlayer, and retargeting a foreign animation (e.g. Mixamo) onto your skeleton via SkeletonProfileHumanoid. Use when an animated rigged .glb arrives in assets/models/, when a character must stop being a static capsule and play a looping idle/walk, when animations come in their own glTF separate from the model, when a sourced animation targets a different skeleton than your character, or when an imported AnimationPlayer's clips won't play / play on the wrong bones. NOT for static-prop import (that is godot-mesh-import + its style delta), NOT for shader-time foliage sway (godot-foliage), NOT for 2D sprite-frame animation./godot-arena-spatial-designOPT-IN spatial-design principles for a combat/arena encounter space in Godot — nine measurable properties (loop topology, interior cover, partitioned sightlines, cover mix, bounded verticality, landmarks, spawn-to-engagement pacing, scale/density, choke-vs-open) that turn a flat blockout into a real firefight space. Use ONLY when the level being built is a combat/arena encounter (enemy waves, gunfights) — apply ALONGSIDE whichever build method is chosen (`godot-greybox` static default, `godot-runtime-arena` runtime, or `godot-gridmap-level` tile-fill). NOT the build mechanism itself, NOT a general level-design bar for non-combat spaces (that's `level-design-principles`).Other plugins' skills for the same job