Agent skill

Event Bus

by jame581 in jame581/GodotPrompter

A skill your agent uses when implementing decoupled communication between nodes — global EventBus autoload with typed signals

MITAuto-check passedGame Development

Install Event Bus

skills CLI
$ npx skills add jame581/GodotPrompter --skill event-bus -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jame581/GodotPrompter event-bus --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jame581/GodotPrompter.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/event-bus .claude/skills/event-bus && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
event-bus
GitHub stars
805
Token cost
~2.8k tokens
SKILL.md length
609 words
Files
4 (incl. references)
Skills in repo
58
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when implementing decoupled communication between nodes — global EventBus autoload with typed signals

  • Works in 9 steps: What is an Event Bus → When to Use vs Direct Signals → Basic EventBus → …
  • Implementing decoupled communication between nodes — global EventBus autoload with typed signals
  • SKILL.md covers 1. What is an Event Bus, 2. When to Use vs Direct Signals, 3. Basic EventBus and 4. Connecting to Events, plus 5 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Event Bus is an agent skill from jame581/GodotPrompter. Use when implementing decoupled communication between nodes — global EventBus autoload with typed signals

Its SKILL.md is about 2.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files (for example `references/anti-patterns.md`, `references/testing.md` and `references/typed-signals.md`).

It sits in Game Development, covering Event-driven systems and Game development. It works with Godot and C#. The repository describes itself as: Agentic skills framework for Godot 4.x. Domain-specific skills for AI coding agents (Claude Code, Copilot, Antigravity, Cursor). The licence is MIT.

When your agent uses it

  • Implementing decoupled communication between nodes — global EventBus autoload with typed signals
  • Tasks that involve Event-driven systems
  • Tasks that involve Game development

Example prompts

  • “/event-bus”

Workflow steps

9 steps, taken from the step headings in SKILL.md.

  1. What is an Event Bus
  2. When to Use vs Direct Signals
  3. Basic EventBus
  4. Connecting to Events
  5. Emitting Events
  6. Typed Signal Parameters
  7. Anti-patterns
  8. Testing
  9. Checklist

What it can do on your machine

Read from SKILL.md and the folder at commit 1e7d79d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are gdscript and csharp).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Event Bus loads about 2.8k tokens when it runs, and up to ~6.4k if it reads all its reference files. Until then it costs about 29 tokens; SKILL.md has 609 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~29
When it runs · the whole SKILL.md, loaded when a task matches
~2.8k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~6.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jame581/GodotPrompter at commit 1e7d79d, republished under its MIT licence (© jame581). 609 words, ~2,797 tokens.

Download SKILL.mdSave it as .claude/skills/event-bus/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
event-bus
description
Use when implementing decoupled communication between nodes — global EventBus autoload with typed signals

Event Bus in Godot 4.3+

A global signal hub that lets unrelated nodes communicate without holding references to each other. All examples target Godot 4.3+ with no deprecated APIs.

Related skills: component-system for direct signal communication between components, csharp-signals for C#-specific signal patterns, dependency-injection for alternative decoupling approaches, ability-system for an EventBus usage example with ability events.


1. What is an Event Bus

An EventBus is a singleton autoload that acts as a central registry for signals. Instead of nodes connecting directly to each other, every node connects to (or emits on) the shared EventBus. This removes the need for one node to hold a reference to another.

Without EventBus             With EventBus
──────────────               ──────────────────────────
NodeA ──signal──► NodeB      NodeA ──emit──► EventBus ──signal──► NodeB
                                                       ──signal──► NodeC
                                                       ──signal──► NodeD

Flow diagram

┌─────────┐   emit(player_died)   ┌───────────┐   player_died   ┌──────────┐
│  NodeA  │ ────────────────────► │ EventBus  │ ───────────────► │  NodeB   │
│(Player) │                       │(Autoload) │                  │   (UI)   │
└─────────┘                       └───────────┘ ───────────────► └──────────┘
                                                  player_died    ┌──────────┐
                                                                 │  NodeC   │
                                                                 │(AudioMgr)│
                                                                 └──────────┘

NodeA emits the signal. NodeB and NodeC each connected to EventBus independently. Neither knows the other exists.


2. When to Use vs Direct Signals

ScenarioRecommended approach
Parent notifying its own childDirect signal or method call
Child notifying its parentDirect signal (bubble up)
Two nodes with the same parentDirect signal via parent
Completely unrelated nodes in the treeEvent bus
UI reacting to gameplay state changesEvent bus
Audio manager reacting to game eventsEvent bus
Data manager / save system reactingEvent bus
Tight, performance-sensitive inner loopDirect method call

Rule of thumb: if you would otherwise need get_node("../../SomeDistantNode") or a hard-coded NodePath, the event bus is a better fit.


3. Basic EventBus

Create res://autoloads/event_bus.gd (or EventBus.cs), then register it in Project → Project Settings → Globals → Autoload with the name EventBus.

GDScript (autoloads/event_bus.gd)
gdscript
extends Node

## Emitted when the player character has died.
signal player_died

## Emitted whenever the score changes.
signal score_changed(new_score: int)

## Emitted when a level finishes successfully.
signal level_completed(level_id: int)

## Emitted when the player picks up a collectible.
signal item_collected(item_name: String)

## Emitted when the player's health changes.
signal health_changed(current: int, maximum: int)
C# (Autoloads/EventBus.cs)
csharp
using Godot;

/// <summary>
/// Global signal hub. Register as an autoload named "EventBus".
/// </summary>
public partial class EventBus : Node
{
    /// <summary>Emitted when the player character has died.</summary>
    [Signal] public delegate void PlayerDiedEventHandler();

    /// <summary>Emitted whenever the score changes.</summary>
    [Signal] public delegate void ScoreChangedEventHandler(int newScore);

    /// <summary>Emitted when a level finishes successfully.</summary>
    [Signal] public delegate void LevelCompletedEventHandler(int levelId);

    /// <summary>Emitted when the player picks up a collectible.</summary>
    [Signal] public delegate void ItemCollectedEventHandler(string itemName);

    /// <summary>Emitted when the player's health changes.</summary>
    [Signal] public delegate void HealthChangedEventHandler(int current, int maximum);
}

4. Connecting to Events

Consumers connect in _ready(). In C#, always disconnect in _ExitTree() to avoid dangling delegates and memory leaks.

GDScript
gdscript
extends CanvasLayer

# GDScript connections are reference-counted and cleaned up automatically
# when the node is freed, but explicit disconnection is still good practice
# for long-lived nodes that reconnect frequently.

func _ready() -> void:
    EventBus.player_died.connect(_on_player_died)
    EventBus.score_changed.connect(_on_score_changed)
    EventBus.health_changed.connect(_on_health_changed)


func _exit_tree() -> void:
    EventBus.player_died.disconnect(_on_player_died)
    EventBus.score_changed.disconnect(_on_score_changed)
    EventBus.health_changed.disconnect(_on_health_changed)


func _on_player_died() -> void:
    $DeathScreen.show()


func _on_score_changed(new_score: int) -> void:
    $ScoreLabel.text = "Score: %d" % new_score


func _on_health_changed(current: int, maximum: int) -> void:
    $HealthBar.value = float(current) / float(maximum) * 100.0
C#
csharp
using Godot;

public partial class HudLayer : CanvasLayer
{
    private EventBus _eventBus;

    public override void _Ready()
    {
        _eventBus = GetNode<EventBus>("/root/EventBus");

        // Connect using strongly-typed delegate handlers
        _eventBus.PlayerDied      += OnPlayerDied;
        _eventBus.ScoreChanged    += OnScoreChanged;
        _eventBus.HealthChanged   += OnHealthChanged;
    }

    // IMPORTANT: Always disconnect in _ExitTree() in C#.
    // C# delegates are not automatically cleaned up when a node is freed.
    // Failing to disconnect causes the EventBus to hold a reference to the
    // freed node, leading to memory leaks and InvalidOperationExceptions.
    public override void _ExitTree()
    {
        _eventBus.PlayerDied    -= OnPlayerDied;
        _eventBus.ScoreChanged  -= OnScoreChanged;
        _eventBus.HealthChanged -= OnHealthChanged;
    }

    private void OnPlayerDied()
    {
        GetNode<Control>("DeathScreen").Show();
    }

    private void OnScoreChanged(int newScore)
    {
        GetNode<Label>("ScoreLabel").Text = $"Score: {newScore}";
    }

    private void OnHealthChanged(int current, int maximum)
    {
        GetNode<ProgressBar>("HealthBar").Value = (double)current / maximum * 100.0;
    }
}

5. Emitting Events

Producers call EventBus.<signal_name>.emit(...) (GDScript) or EmitSignal(SignalName.*) (C#). The producer does not know which nodes are listening.

GDScript
gdscript
extends CharacterBody2D

@export var max_health: int = 100
var current_health: int = max_health
var score: int = 0


func take_damage(amount: int) -> void:
    current_health = clampi(current_health - amount, 0, max_health)
    EventBus.health_changed.emit(current_health, max_health)

    if current_health == 0:
        EventBus.player_died.emit()


func add_score(points: int) -> void:
    score += points
    EventBus.score_changed.emit(score)


func collect_item(item_name: String) -> void:
    EventBus.item_collected.emit(item_name)


func complete_level(level_id: int) -> void:
    EventBus.level_completed.emit(level_id)
C#
csharp
using Godot;

public partial class Player : CharacterBody2D
{
    [Export] public int MaxHealth { get; set; } = 100;

    private int _currentHealth;
    private int _score;
    private EventBus _eventBus;

    public override void _Ready()
    {
        _currentHealth = MaxHealth;
        _eventBus = GetNode<EventBus>("/root/EventBus");
    }

    public void TakeDamage(int amount)
    {
        _currentHealth = Mathf.Clamp(_currentHealth - amount, 0, MaxHealth);
        _eventBus.EmitSignal(EventBus.SignalName.HealthChanged, _currentHealth, MaxHealth);

        if (_currentHealth == 0)
            _eventBus.EmitSignal(EventBus.SignalName.PlayerDied);
    }

    public void AddScore(int points)
    {
        _score += points;
        _eventBus.EmitSignal(EventBus.SignalName.ScoreChanged, _score);
    }

    public void CollectItem(string itemName)
    {
        _eventBus.EmitSignal(EventBus.SignalName.ItemCollected, itemName);
    }

    public void CompleteLevel(int levelId)
    {
        _eventBus.EmitSignal(EventBus.SignalName.LevelCompleted, levelId);
    }
}

6. Typed Signal Parameters

Type every signal parameter. An untyped bus degrades into "what shape is this payload?" archaeology at every call site, and typos in parameter counts only surface at runtime. For anything richer than two or three primitives, pass a small Resource or a class_name'd data object rather than growing the parameter list.

Typed signal declarations, payload-object patterns, and the C# [Signal] delegate equivalents: references/typed-signals.md


Show full SKILL.md (251 more words)Show less

7. Anti-patterns

Four recurring failures: routing everything through the bus when a parent could just reach its own child (over-decoupling); handlers whose side effects emit further signals, so tracing one event means reading every handler; circular chains, where a listener re-emits the signal it just received and loops forever; and connecting without disconnecting in C#, which leaks the handler for the bus's lifetime.

Each anti-pattern with the failing code, why it hurts, and the fix, in GDScript and C#: references/anti-patterns.md


8. Testing

Use GUT to verify both producer-side emission (watch_signals(event_bus) then assert_signal_emitted_with_parameters(...)) and consumer-side reactions (emit on the bus, then assert on the consumer's state). Always test against the real autoload EventBus retrieved via get_tree().root.get_node("EventBus"), not a fresh instance.

See references/testing.md for full producer-side and consumer-side test files plus a GUT-helper reference table.


9. Checklist

  • EventBus autoload is registered in Project → Project Settings → Globals → Autoload
  • All signals use typed parameters (signal foo(bar: int)) — no untyped signals
  • Every consumer connects in _ready() and disconnects in _exit_tree() (mandatory in C#)
  • Producers emit through EventBus, not by calling consumer methods directly
  • No node holds a direct reference to another unrelated node just to emit or receive signals
  • Complex payloads use a Resource subclass, not a raw Dictionary
  • No handler re-emits the same signal it just received (prevents infinite loops)
  • No event bus signal used where a direct parent-child call or signal is simpler
  • GUT tests cover both emission (producer) and reception (consumer) for critical signals
  • C# handlers verified to disconnect in _ExitTree() before merging

© jame581, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (references) in skills/event-bus of jame581/GodotPrompter.

  • SKILL.md
  • references/anti-patterns.md
  • references/testing.md
  • references/typed-signals.md

Open the folder on GitHubat commit 1e7d79d

Compare with similar skills

Event Bus next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Event Bus compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Event Bus this skilljame581/GodotPrompter805—~2.8kAutomated safety check: PassMIT
Godot Admob App Openpoingstudios/godot-admob-plugin632—~1kAutomated safety check: PassMIT
Godot Admob Bannerpoingstudios/godot-admob-plugin632—~718Automated safety check: PassMIT
Godot Admob Get Startedpoingstudios/godot-admob-plugin632—~1kAutomated safety check: PassMIT
Godot Admob Interstitialpoingstudios/godot-admob-plugin632—~1.1kAutomated safety check: PassMIT
Godot Admob Native Overlaypoingstudios/godot-admob-plugin632—~1kAutomated safety check: PassMIT

Similar skills

  • Godot Admob App Open

    poingstudios/godot-admob-plugin

    Provides instructions to implement, load, show, and destroy App Open ads (shown on application startup or app resume) in GDScript and C.

    632 GitHub stars~1k tokensUpdated 9 days ago
    Game DevelopmentAuto-check passed
  • Godot Admob Banner

    poingstudios/godot-admob-plugin

    Provides instructions to implement, load, and destroy banner ads (AdView) using custom or adaptive sizes in GDScript and C.

    632 GitHub stars~718 tokensUpdated 9 days ago
    Game DevelopmentAuto-check passed
  • Godot Admob Get Started

    poingstudios/godot-admob-plugin

    Provides instructions to initialize the Godot AdMob SDK and configure user consent (UMP Flow) in GDScript and C.

    632 GitHub stars~1k tokensUpdated 9 days ago
    Game DevelopmentAuto-check passed
  • Godot Admob Interstitial

    poingstudios/godot-admob-plugin

    Provides instructions to implement, load, show, and destroy interstitial ads (full-screen image/text ads) in GDScript and C.

    632 GitHub stars~1.1k tokensUpdated 9 days ago
    Game DevelopmentAuto-check passed
  • Godot Admob Native Overlay

    poingstudios/godot-admob-plugin

    Provides instructions to implement, load, show, and destroy Native Overlay ads (customized/native-looking Control node template overlays) in GDScript and C.

    632 GitHub stars~1k tokensUpdated 9 days ago
    Game DevelopmentAuto-check passed
  • Apply the Stage Tamagotchi Godot C development method and code style when working in apps/stage-tamagotchi-kirie or its migration predecessor, engines/stage-tamagotchi-godot.

    50k GitHub stars~677 tokensUpdated today
    Game DevelopmentAuto-check passed

More from jame581/GodotPrompter

All 58 skills in this repo
  • Godot 2D Essentials

    jame581/GodotPrompter

    Covers Godot 4.3+ 2D systems with GDScript and C# examples: canvas layers, draw order, TileMaps, parallax, lights and shadows, particles and custom drawing.

    805 GitHub stars~2.3k tokensUpdated yesterday
    Auto-check passed
  • Godot 3D Essentials

    jame581/GodotPrompter

    Covers Godot 4.3+ 3D systems such as materials, lighting, shadows, environment, global illumination, fog, LOD, occlusion culling and decals, with GDScript first and C# second.

    805 GitHub stars~3.7k tokensUpdated yesterday
    Auto-check passed
  • Godot Ability System

    jame581/GodotPrompter

    Builds a data-driven ability system in Godot 4 from Resources and a component node, with cooldowns, buffs, stat modifiers, gameplay tags and HUD binding.

    805 GitHub stars~3k tokensUpdated yesterday
    Auto-check passed
  • Godot Addon Development

    jame581/GodotPrompter

    Covers Godot 4.3+ editor plugins: plugin folders, @tool scripts, the EditorPlugin lifecycle, custom inspectors, dock panels and gizmos, in GDScript and C#.

    805 GitHub stars~3.3k tokensUpdated yesterday
    Auto-check passed
  • Godot AI Navigation

    jame581/GodotPrompter

    Covers pathfinding and enemy movement in Godot 4.3 and later: navigation regions, NavigationAgent nodes, steering, behavior trees and patrol routes.

    805 GitHub stars~3.5k tokensUpdated yesterday
    Auto-check passed
  • Godot Animation System

    jame581/GodotPrompter

    Covers animation in Godot 4.3 and later: AnimationPlayer basics, AnimationTree blend trees and state machines, sprite animation, skeleton IK and code-driven motion.

    805 GitHub stars~3.8k tokensUpdated yesterday
    Auto-check passed

Works with

Questions about Event Bus

What does Event Bus do?

A skill your agent uses when implementing decoupled communication between nodes — global EventBus autoload with typed signals. Event Bus is an agent skill from jame581/GodotPrompter.

When should I use Event Bus?

Event Bus fits situations like: implementing decoupled communication between nodes — global EventBus autoload with typed signals; tasks that involve Event-driven systems; tasks that involve Game development.

How do I install Event Bus in Claude Code?

Run `npx skills add jame581/GodotPrompter --skill event-bus -a claude-code`. Or copy the skill folder (skills/event-bus in jame581/GodotPrompter) into .claude/skills/event-bus in your project. Claude Code loads it when a task matches its description.

How do I install Event Bus in Codex?

Run `npx skills add jame581/GodotPrompter --skill event-bus -a codex`. Or copy the skill folder (skills/event-bus in jame581/GodotPrompter) into .agents/skills/event-bus in your project. Codex loads it when a task matches its description.

Can I use Event Bus in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jame581/GodotPrompter --skill event-bus -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/event-bus, .gemini/skills/event-bus, .github/skills/event-bus and .opencode/skills/event-bus in your project.

What does Event Bus need to run?

SKILL.md names no scripts, command-line tools or credentials: Event Bus is instructions for the agent only.

Does Event Bus access the network?

SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.

Is Event Bus safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Event Bus use?

Event Bus is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Event Bus use?

About 2.8k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.6k tokens, read only when the agent opens those files.

What are the alternatives to Event Bus?

Skills that share tags, products or a category with Event Bus: Godot Admob App Open (poingstudios/godot-admob-plugin, 632 stars), Godot Admob Banner (poingstudios/godot-admob-plugin, 632 stars), Godot Admob Get Started (poingstudios/godot-admob-plugin, 632 stars) and Godot Admob Interstitial (poingstudios/godot-admob-plugin, 632 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Event Bus?

jame581 (a GitHub user) maintains it in jame581/GodotPrompter, which has 805 GitHub stars. The repository holds 58 skills in this directory. The repository was last updated on October 9, 2026.

Source: jame581/GodotPrompter on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.