
Godot Composition
This is a strict architectural style guide for building Godot games using composition instead of inheritance hierarchies. You get nine ready-to-use components (health, hitbox, velocity, state machine, status effects) plus wiring patterns that enforce single responsibility through what it calls the "Orchestrator" model. The parent node does no logic, just connects specialized worker nodes via signals up and method calls down. It's opinionated about avoiding get_node calls, deep inheritance chains, and mixing input with physics. Best for mid-sized projects where you're tired of refactoring brittle player controllers or want to share combat logic between enemies and NPCs without copy-pasting. The "never" section is longer than the implementation examples, which tells you what kind of discipline this expects.
- skills.sh installs
- 326
- GitHub stars
- 464
- last updated
- Aug 21, 2026
Install
$ npx -y skills add thedivergentai/gd-agentic-skills --skill godot-composition --agent claude-codeInstalls into .claude/skills of the current project.
Files
Core Philosophy
This skill enforces Composition over Inheritance ("Has-a" vs "Is-a"). In Godot, Nodes are components. A complex entity (Player) is simply an Orchestrator managing specialized Worker Nodes (Components).
The Golden Rules
- Single Responsibility: One script = One job.
- Encapsulation: Components are "selfish." They handle their internal logic but don't know who owns them.
- The Orchestrator: The root script (e.g.,
player.gd) does no logic. It only manages state and passes data between components. - Decoupling: Components communicate via Signals (up) and Methods (down).
Decision Tree — Composition vs Autoload vs Inheritance
| Situation | Choose |
|---|---|
| Gameplay entity behaviors (HP, hitbox, move, interact) | Composition — child components + orchestrator (composition_root_init.gd) |
| Cross-scene services (audio bus, save, net, economy ledger) | Autoload — not a component on the player |
| True is-a engine specialization (custom Control/Node with shared lifecycle) | Inheritance exception — rare; never for "adds a gun" / "adds HP" |
Sponsors
Details
- Repository
- github.com/thedivergentai/gd-agentic-skills
- Categories
- Frontend Development, AI & Agent Building, Cloud & Infrastructure, Design & UI/UX, Game Development
- First seen
- Jun 3, 2026
More from thedivergentai/gd-agentic-skills
All 51- Godot Audio Systems322
- Godot Characterbody 2d313
- Godot Camera Systems310
- Godot Input Handling305
- Godot Signal Architecture301
- Godot State Machine Advanced291
- Godot Rpg Stats287
- Godot Genre Roguelike285
- Godot Combat System281
- Godot Dialogue System281
- Godot Ui Containers279
- Godot Tilemap Mastery277
- Godot Scene Management276
- Godot Project Foundations273
- Godot Resource Data Patterns272
- Godot Animation Player271
- Godot Economy System271
- Godot Autoload Architecture268
- Godot 3d Lighting266
- Godot 3d Materials260
- Godot Animation Tree Mastery260
- Godot Tweening256
- Godot Physics 3d255
- Godot Ability System253