godot-composition

Implements composition-based entity architecture for Godot games using reusable component nodes.

Updated Aug 22, 2026
One-click install
npx skills add https://github.com/DecioLuvier/Shatterless --skill godot-composition-decioluvier
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: godot-composition
Source: https://github.com/DecioLuvier/Shatterless/tree/main/.claude/skills/godot/references/godot-composition
Command: npx skills add https://github.com/DecioLuvier/Shatterless --skill godot-composition-decioluvier

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Building players, enemies, and weapons in Godot often leads to deep inheritance chains and monolithic scripts that are brittle and hard to refactor. This Skill enforces a Composition over Inheritance pattern where entities are orchestrators wiring specialized, reusable component nodes. ## Core Features & Use Cases - Ready-made component scripts: Health, HitBox/HurtBox damage areas, velocity movement, interaction, follower, state machine (VSM), status effects, and visual sync components. - Orchestrator wiring standards: Typed @export dependency injection, signal-up/method-down communication, and dependency validation with asserts. - Decision guidance: Clear rules for choosing Composition vs Autoload vs Inheritance, plus a NEVER-do list preventing common anti-patterns. - Use Case: When building a shooter enemy that needs HP, damage areas, and movement, assemble it from HealthComponent, HitBoxComponent, and VelocityComponent child nodes wired through a thin orchestrator script instead of subclassing. ## Quick Start Ask the AI to design a Godot player controller using the composition pattern with health, movement, and hitbox components wired via typed exports.

Frequently Asked Questions about godot-composition

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure a Godot player controller using composition?▼

Create a root CharacterBody3D orchestrator script with typed @export slots for components like HealthComponent, VelocityComponent, and InputComponent. Assign child nodes in the Inspector or via Scene Unique Names, and let the orchestrator pass data between components without containing game logic itself.

Composition vs inheritance in Godot: which should I use for game entities?▼

Use composition for gameplay entities like players, enemies, and weapons, since Has-A relationships avoid brittle deep inheritance chains. Reserve inheritance for true engine specialization, and use Autoloads for cross-scene services like audio or save systems.

How do Godot components communicate without tight coupling?▼

Components communicate via signals going up to the orchestrator and method calls going down from it. A component never references its parent script directly, which keeps it reusable across different entities.

Why should I avoid get_node or $ paths for Godot components?▼

Node path lookups break whenever the scene tree is rearranged. Typed @export variables or %UniqueNames survive restructuring and give compile-time type safety plus Inspector-based dependency injection.

Does assert-based dependency validation work in Godot release builds?▼

No, assert() calls are stripped in release builds, so they only catch missing exports during development. For shipping builds, combine typed @export slots with explicit null checks for critical dependencies.

When should I use a Resource instead of a Node component in Godot?▼

Use a Resource when you only need data such as stats or configuration, since nodes carry lifecycle and signal overhead. Nodes are appropriate when you need _process ticks, signals, or scene-tree behavior.