Tooluck logoTooluck
SKILL.md

godot-signals-groups

Agent skill fromgamedev-skills/awesome-gamedev-agent-skills

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.

How to install godot-signals-groups

install godot-signals-groups
# install the awesome-gamedev-agent-skills pack with the skills CLI
npx skills add gamedev-skills/awesome-gamedev-agent-skills

# or add only this skill to Claude Code: copy the folder

skills/godot/godot-signals-groups/

# into

~/.claude/skills/godot-signals-groups/ (all projects)

.claude/skills/godot-signals-groups/ (one project)

skills/godot/godot-signals-groups/SKILL.md

Apache-2.0Full file
1# Godot Signals & Groups (4.x)
2
3Decouple nodes with the observer pattern (signals) and act on many nodes at once
4(groups), instead of hard-coding references between scenes. Targets **Godot 4.7**.
5
6## When to use
7
8- Use when a node needs to tell others "something happened" (player died, item picked
9 up, wave cleared) without holding direct references to them.
10- Use when you need to address a whole category of nodes at once ("pause all enemies",
11 "save every checkpoint").
12
13**When *not* to use:** raw signal *syntax* basics → `godot-gdscript`; scene structure
14and instancing → `godot-nodes-scenes`. For cross-scene global events, emit from an
15autoload (see `godot-nodes-scenes`).
16
17## Core workflow
18
191. **Decide the direction.** A child/sub-scene should *emit* a signal upward; the parent
20 *connects* to it. This keeps the child reusable and ignorant of who listens.
212. **Declare typed signals** on the emitter; `emit()` them when the event occurs.
223. **Connect with a Callable** (`sig.connect(_on_sig)`), optionally in the editor's Node
23 dock. Use `CONNECT_ONE_SHOT` for fire-once, `bind()` to pass extra context.
244. **Use groups for broadcast**: add nodes to a named group, then iterate
25 `get_tree().get_nodes_in_group(...)` or `call_group(...)`.
265. **Disconnect when needed** (e.g. before freeing a long-lived listener) and check
27 `is_connected()` to avoid duplicate connections.
28
29## Patterns
30
31### 1. Emit upward, connect from the parent
32
33```gdscript
34…

Excerpt shown under the repository's Apache-2.0 license.

More skills in awesome-gamedev-agent-skills

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates