/godot-signals-groups
Build event-driven, decoupled Godot 4.7 gameplay with signals and node groups: declare and emit custom signals, connect with Callables (incl. bind/one-shot), and broadcast to many nodes via groups and call_group. Use when wiring node communication in a Godot project, replacing
$ npx -y skills add gamedev-skills/awesome-gamedev-agent-skills --skill godot-signals-groups --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/godot-signals-groups
Context preview
The summary Claude sees to decide when to auto-load this skill.
Build event-driven, decoupled Godot 4.7 gameplay with signals and node groups: declare and emit custom signals, connect with Callables (incl. bind/one-shot), and broadcast to many nodes via groups and call_group. Use when wiring node communication in a Godot project, replacing
SKILL.md
godot-signals-groups.SKILL.mdname: godot-signals-groups
description: >
Build event-driven, decoupled Godot 4.7 gameplay with signals and node groups:
declare and emit custom signals, connect with Callables (incl. bind/one-shot),
and broadcast to many nodes via groups and call_group. Use when wiring node
communication in a Godot project, replacing tight references with signals,
emitting/connecting events, or porting 3.x connect("sig", self, "method") code.Godot Signals & Groups (4.x)
Decouple nodes with the observer pattern (signals) and act on many nodes at once (groups), instead of hard-coding references between scenes. Targets **Godot 4.7**.
When to use
- Use when a node needs to tell others "something happened" (player died, item picked
up, wave cleared) without holding direct references to them.
- Use when you need to address a whole category of nodes at once ("pause all enemies",
"save every checkpoint").
**When *not* to use:** raw signal *syntax* basics → `godot-gdscript`; scene structure and instancing → `godot-nodes-scenes`. For cross-scene global events, emit from an autoload (see `godot-nodes-scenes`).
Core workflow
1. **Decide the direction.** A child/sub-scene should *emit* a signal upward; the parent *connects* to it. This keeps the child reusable and ignorant of who listens. 2. **Declare typed signals** on the emitter; `emit()` them when the event occurs. 3. **Connect with a Callable** (`sig.connect(_on_sig)`), optionally in the editor's Node dock. Use `CONNECT_ONE_SHOT` for fire-once, `bind()` to pass extra context. 4. **Use groups for broadcast**: add nodes to a named group, then iterate `get_tree().get_nodes_in_group(...)` or `call_group(...)`. 5. **Disconnect when needed** (e.g. before freeing a long-lived listener) and check `is_connected()` to avoid duplicate connections.
Patterns
1. Emit upward, connect from the parent
# coin.gd (reusable pickup — knows nothing about the player or HUD)
extends Area2D
signal collected(value: int)
func _on_body_entered(body: Node) -> void:
if body.is_in_group("player"):
collected.emit(10)
queue_free()# level.gd (the parent wires the coin to game state)
func _ready() -> void:
for coin in get_tree().get_nodes_in_group("coins"):
coin.collected.connect(_on_coin_collected)
func _on_coin_collected(value: int) -> void:
GameState.add_score(value)2. Connect flags: one-shot and bind extra arguments
func _ready() -> void:
# Fire exactly once, then auto-disconnect.
$Door.opened.connect(_on_door_opened, CONNECT_ONE_SHOT)
# bind() appends arguments supplied at connect time (after the signal's own args).
$RedButton.pressed.connect(_on_button.bind("red"))
func _on_button(color: String) -> void:
print("Pressed the %s button" % color)3. Groups: broadcast to many nodes
func pause_all_enemies() -> void:
# Call a method on every node in the "enemies" group (no-op if missing).
get_tree().call_group("enemies", "set_paused", true)
func count_enemies() -> int:
return get_tree().get_nodes_in_group("enemies").size()Add a node to a group from code or via the editor's Node > Groups tab:
func _ready() -> void:
add_to_group("enemies") # remove_from_group("enemies") to leave4. Await a signal inline
func open_chest() -> void:
$AnimationPlayer.play("open")
await $AnimationPlayer.animation_finished # pause until it emits
spawn_loot()Pitfalls
- **3.x connect signature is gone.** `connect("died", self, "_on_died")` →
`died.connect(_on_died)`. The target is implied by the Callable. The legacy `Object.connect("died", Callable(self, "_on_died"))` works but the method-name string form does not.
- **Duplicate connections fire handlers multiple times.** Connecting again in `_ready()`
after re-adding a node stacks callbacks. Guard with `if not sig.is_connected(cb): sig.connect(cb)`.
- **Connecting to a freed node errors.** Disconnect long-lived listeners, or rely on
Godot auto-disconnecting when the *connected object* is freed (it does for nodes).
- **Groups are global to the SceneTree**, not per-scene. Two levels using the same group
name share membership. Namespace group names if that matters.
- **`call_group` silently ignores nodes lacking the method.** Typos in the method name
fail quietly — prefer a typed signal when the contract matters.
- **Signal args must match.** Emitting with the wrong arg count/types raises an error;
declare typed params and emit exactly those.
References
- For connection flags, deferred connections, custom signal arguments, awaiting with
timeouts, and signals vs. direct calls trade-offs, read `references/signal-patterns.md`.
Related skills
- `godot-gdscript` — signal/`await` syntax fundamentals.
- `godot-nodes-scenes` — autoloads for global event buses.
- `game-ai` — state machines that often drive and consume these events.
Read more
name: godot-signals-groups
description: >
Build event-driven, decoupled Godot 4.7 gameplay with signals and node groups:
declare and emit custom signals, connect with Callables (incl. bind/one-shot),
and broadcast to many nodes via groups and call_group. Use when wiring node
communication in a Godot project, replacing tight references with signals,
emitting/connecting events, or porting 3.x connect("sig", self, "method") code.Godot Signals & Groups (4.x)
Decouple nodes with the observer pattern (signals) and act on many nodes at once (groups), instead of hard-coding references between scenes. Targets **Godot 4.7**.
When to use
- Use when a node needs to tell others "something happened" (player died, item picked
up, wave cleared) without holding direct references to them.
- Use when you need to address a whole category of nodes at once ("pause all enemies",
"save every checkpoint").
**When *not* to use:** raw signal *syntax* basics → `godot-gdscript`; scene structure and instancing → `godot-nodes-scenes`. For cross-scene global events, emit from an autoload (see `godot-nodes-scenes`).
Core workflow
1. **Decide the direction.** A child/sub-scene should *emit* a signal upward; the parent *connects* to it. This keeps the child reusable and ignorant of who listens. 2. **Declare typed signals** on the emitter; `emit()` them when the event occurs. 3. **Connect with a Callable** (`sig.connect(_on_sig)`), optionally in the editor's Node dock. Use `CONNECT_ONE_SHOT` for fire-once, `bind()` to pass extra context. 4. **Use groups for broadcast**: add nodes to a named group, then iterate `get_tree().get_nodes_in_group(...)` or `call_group(...)`. 5. **Disconnect when needed** (e.g. before freeing a long-lived listener) and check `is_connected()` to avoid duplicate connections.
Patterns
1. Emit upward, connect from the parent
# coin.gd (reusable pickup — knows nothing about the player or HUD)
extends Area2D
signal collected(value: int)
func _on_body_entered(body: Node) -> void:
if body.is_in_group("player"):
collected.emit(10)
queue_free()# level.gd (the parent wires the coin to game state)
func _ready() -> void:
for coin in get_tree().get_nodes_in_group("coins"):
coin.collected.connect(_on_coin_collected)
func _on_coin_collected(value: int) -> void:
GameState.add_score(value)2. Connect flags: one-shot and bind extra arguments
func _ready() -> void:
# Fire exactly once, then auto-disconnect.
$Door.opened.connect(_on_door_opened, CONNECT_ONE_SHOT)
# bind() appends arguments supplied at connect time (after the signal's own args).
$RedButton.pressed.connect(_on_button.bind("red"))
func _on_button(color: String) -> void:
print("Pressed the %s button" % color)3. Groups: broadcast to many nodes
func pause_all_enemies() -> void:
# Call a method on every node in the "enemies" group (no-op if missing).
get_tree().call_group("enemies", "set_paused", true)
func count_enemies() -> int:
return get_tree().get_nodes_in_group("enemies").size()Add a node to a group from code or via the editor's Node > Groups tab:
func _ready() -> void:
add_to_group("enemies") # remove_from_group("enemies") to leave4. Await a signal inline
func open_chest() -> void:
$AnimationPlayer.play("open")
await $AnimationPlayer.animation_finished # pause until it emits
spawn_loot()Pitfalls
- **3.x connect signature is gone.** `connect("died", self, "_on_died")` →
`died.connect(_on_died)`. The target is implied by the Callable. The legacy `Object.connect("died", Callable(self, "_on_died"))` works but the method-name string form does not.
- **Duplicate connections fire handlers multiple times.** Connecting again in `_ready()`
after re-adding a node stacks callbacks. Guard with `if not sig.is_connected(cb): sig.connect(cb)`.
- **Connecting to a freed node errors.** Disconnect long-lived listeners, or rely on
Godot auto-disconnecting when the *connected object* is freed (it does for nodes).
- **Groups are global to the SceneTree**, not per-scene. Two levels using the same group
name share membership. Namespace group names if that matters.
- **`call_group` silently ignores nodes lacking the method.** Typos in the method name
fail quietly — prefer a typed signal when the contract matters.
- **Signal args must match.** Emitting with the wrong arg count/types raises an error;
declare typed params and emit exactly those.
References
- For connection flags, deferred connections, custom signal arguments, awaiting with
timeouts, and signals vs. direct calls trade-offs, read `references/signal-patterns.md`.
Related skills
- `godot-gdscript` — signal/`await` syntax fundamentals.
- `godot-nodes-scenes` — autoloads for global event buses.
- `game-ai` — state machines that often drive and consume these events.
<img src="docs/assets/banner.png" width="820" alt="awesome-gamedev-agent-skills — game-dev skills for AI coding agents.
Repo: gamedev-skills/awesome-gamedev-agent-skills
Other skills on awesome-gamedev-agent-skills.
- /audio-design
Implement game audio practice — bus/mixer architecture and gain in decibels, ducking (sidechain), adaptive/dynamic music via layering and re-sequencing, SFX variation, and beat synchronization. Engine-neutral. Use when the user mentions audio mixing, audio buses,
Open skill - /camera-systems
Build game cameras that feel good — 2D follow with a deadzone, look-ahead, smoothing, and level-bounds clamping; 3D third-person orbit with collision and first-person look; plus multi-target framing and a shake hook. Engine-neutral techniques that pair with the engine's camera
Open skill - /create-game-assets
Plan, generate, source, normalize, and validate cohesive visual game assets. Use for art direction, style bibles, sprites, tilesets, backgrounds, UI art, icons, textures, concept art, or 3D asset briefs.
Open skill - /dialogue-systems
Build branching dialogue and narrative — a node/choice graph with conditions, variables, and localization hooks — and choose between authoring tools Ink and Yarn Spinner or a custom data-driven runner. Engine-neutral. Use when the user mentions dialogue system, branching
Open skill - /game-ai
Design NPC and enemy decision-making with finite state machines, behavior trees, steering behaviors, and A* pathfinding — engine-neutral algorithms that pair with the detected engine's navigation API. Use when building enemy AI, an FSM or behavior tree, steering/flocking, or
Open skill - /game-feel
Add "juice" and game feel that makes actions satisfying — screen shake, hit-stop/freeze frames, tweened/eased motion, squash & stretch, knockback, and layered audio-visual feedback — as engine-neutral techniques that pair with the detected engine's tween, particle, and camera
Open skill

