skills/godot-composition-apps/SKILL.md
Expert architectural standards for building scalable Godot applications (Apps, Tools, UI, or Games) using the Composition pattern. Use when designing node structures, refactoring monolithic scripts, or implementing complex behaviors. Enforces "Has-A" relationships over "Is-A" inheritance.
npx skillsauth add thedivergentai/gd-agentic-skills godot-composition-appsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill enforces the Single Responsibility Principle within Godot's Node system. Whether building an RPG or a SaaS Dashboard, the rule remains: One Script = One Job.
Before writing a script, ask: "If I attached this script to a literal rock, would it still function?"
AuthComponent on a rock allows the rock to log in. (Context Agnostic)LoginForm script on a rock tries to grab text fields the rock doesn't have. (Coupled)Stop extending base classes to add functionality. Treat the Root Node as an empty Backpack.
SubmitButton extends AnimatedButton extends BaseButton.SubmitButton (Root) HAS-A AnimationComponent and HAS-A NetworkRequestComponent.Strictly enforce this communication flow to prevent "Spaghetti Code":
| Direction | Source → Target | Method | Reason | |-----------|-----------------|--------|--------| | Downward | Orchestrator → Component | Function Call | Manager owns the workers; knows they exist. | | Upward | Component → Orchestrator | Signals | Workers are blind; they just yell "I'm done!" | | Sideways | Component A ↔ Component B | FORBIDDEN | Siblings must never talk directly. |
The Sideways Fix: Component A signals the Orchestrator; Orchestrator calls function on Component B.
The Root Node script (e.g., LoginScreen.gd, UserProfile.gd) is now an Orchestrator.
| Concept | App/UI Example |
|---------|----------------|
| Orchestrator | UserProfile.gd |
| Component 1 | AuthValidator (Logic) |
| Component 2 | FormListener (Input) |
| Component 3 | ThemeManager (Visual) |
Define components globally. Never use dynamic typing for core architecture.
# auth_component.gd
class_name AuthComponent extends Node
NEVER use get_node("Path/To/Child"). Paths are brittle.
ALWAYS use Typed Exports and drag-and-drop in the Inspector.
# Orchestrator script
@export var auth: AuthComponent
@export var form_ui: Control
If internal referencing within a scene is strictly necessary for the Orchestrator, use the % Unique Name feature.
@onready var submit_btn = %SubmitButton
Components should process the data given to them.
NetworkComponent finds the username text field itself.NetworkComponent has a function login(username, password). The Orchestrator passes the text field data into that function.@export or passed into a function call.ComponentA must never call functions on ComponentB. High-coupling makes refactoring impossible. Always signal up to the Orchestrator.get_node("Child/Subchild/Node") breaks when you move a single node. Use @export and the Inspector._on_signal methods that delegate to other components.Context Resource or the Global Autoload for cross-scene state.HealthComponent requires its parent to be a CharacterBody2D, it fails the "Rock Test."CombatComponent should never call AnimationPlayer.play(). It emits attack_performed, and a Syncer or Orchestrator handles the visual response.clipboard_copier.gdclass_name ClipboardCopier extends Node
signal copy_success
signal copy_failed(reason)
func copy_text(text: String) -> void:
if text.is_empty():
copy_failed.emit("Text empty")
return
DisplayServer.clipboard_set(text)
copy_success.emit()
share_menu.gdextends Control
# Wired via Inspector
@export var copier: ClipboardCopier
@export var link_label: Label
func _ready():
# Downward communication
%CopyButton.pressed.connect(_on_copy_button_pressed)
# Upward communication listening
copier.copy_success.connect(_on_copy_success)
func _on_copy_button_pressed():
# Orchestrator delegation
copier.copy_text(link_label.text)
func _on_copy_success():
# Orchestrator managing UI state based on signal
%ToastNotification.show("Link Copied!")
Central hub for signal delegation and component wiring. Logic-free manager.
Foundational component with type-safe signals and auto-group registration.
Context-agnostic health/damage logic that works on players, enemies, or barrels.
Area-based collision interface that bridges physical hits to the HealthComponent.
Dynamic ability manager that executes child 'Ability' nodes via unified interfaces.
Late-binding configuration loader for hot-swapping behavior via Resources (.tres).
Expert injection pattern for passing refs to dynamic components without get_node.
Automated save/load registration for modular node persistence.
Decoupling agent that syncs gameplay logic state to visual animations/VFX.
Architectural validator to ensure components are truly decoupled.
development
Godot Expert Auditor: Aurelius. Exhaustive never-list enforcement and architectural slap-down for Godot 4.6 projects.
development
--- name:# Godot Expert Analyst: Anara ## Visionary Architect of Godot 4.6+ Excellence > "Scale is not a feature; it is a philosophy. I don't look at what your game is today; I look at whether it can survive tomorrow." — Anara You are **Anara**, the visionary architect of Godot 4.6+ excellence. You evaluate projects not for "if they work", but for "how well they scale". Your purpose is to certify professional-grade projects and provide the blueprint for architectural transcendence. Your voice
development
Expert blueprint for AI pathfinding (tower defense, RTS, stealth) using NavigationAgent2D/3D, NavigationServer, avoidance, and dynamic navigation mesh generation. Use when implementing enemy AI, NPC movement, or obstacle avoidance. Keywords NavigationAgent2D, NavigationRegion2D, pathfinding, NavigationServer, avoidance, baking, NavigationObstacle.
development
Expert patterns for Godot audio including AudioStreamPlayer variants (2D positional, 3D spatial), AudioBus mixing architecture, dynamic effects (reverb, EQ,compression), audio pooling for performance, music transitions (crossfade, bpm-sync), and procedural audio generation. Use for music systems, sound effects, spatial audio, or audio-reactive gameplay. Trigger keywords: AudioStreamPlayer, AudioStreamPlayer2D, AudioStreamPlayer3D, AudioBus, AudioServer, AudioEffect, music_crossfade, audio_pool, positional_audio, reverb, bus_volume.