All skills
thedivergentai avatar

/godot-composition-apps

@9d6e91e

Expert architectural standards for scalable Godot Apps, Tools, EditorPlugins, and Control-heavy UIs using Composition (Has-A Orchestrator + components). Use when building dashboards, tool windows, forms, settings panels, or EditorPlugin UIs. Do NOT use for gameplay entities (Player/Enemy/Weapon/Hitbox) — route those to godot-composition. Trigger keywords: Control, EditorPlugin, tool UI, Orchestrator, VLS, rock test, AuthComponent, ThemeManager, Saveable component, dependency injection.

Use this Skill: https://skilld.dev/gh/thedivergentai/gd-agentic-skills/godot-composition-apps

This session only. Nothing lands on disk.

referencesapp-orchestrator-examples.md

≈576 tokens on demand. Your agent reads this file only when SKILL.md points to it.

App Orchestrator Examples (load on demand)

MANDATORY for clipboard/share flows, service locator registration, and VLS examples beyond comp_orchestrator_base.gd.

Clipboard + toast orchestrator

extends Control

@export var copier: ClipboardCopier
@export var link_label: Label

func _ready() -> void:
	%CopyButton.pressed.connect(_on_copy_button_pressed)
	copier.copy_success.connect(_on_copy_success)

func _on_copy_button_pressed() -> void:
	copier.copy_text(link_label.text)

func _on_copy_success() -> void:
	%ToastNotification.show("Link Copied!")

Component: clipboard_copier.gd. Auth flows: resources/auth_component.gd in this skill package.

App-level service locator

WHY Engine.register_singleton: Avoid dozens of Autoload Nodes for lightweight RefCounted services (Auth, Config).

# AppServiceLocator.gd (Autoload)
func _ready() -> void:
	if not Engine.has_singleton(&"AuthService"):
		Engine.register_singleton(&"AuthService", AuthService.new())

# Anywhere:
var auth = Engine.get_singleton(&"AuthService")

Visual-Logic-Syncer (VLS)

Logic emits; VLS owns AnimationPlayer / modulate tweens.

@export var logic: AuthComponent
@export var anim: AnimationPlayer

func _ready() -> void:
	logic.login_failed.connect(_on_login_failed)

func _on_login_failed(_reason: String) -> void:
	anim.play("shake_form")
	var t := create_tween()
	t.tween_property(self, "modulate", Color.RED, 0.2)

Production: comp_logic_visual_syncer.gd.

O(1) component registry

Dashboard orchestrators catalog children once — lookup is orchestrator-private; sideways calls remain forbidden.

var _registry: Dictionary = {}

func _ready() -> void:
	for child in get_children():
		_registry[child.name] = child
		for group in child.get_groups():
			_registry[group] = child

func get_comp(key: StringName) -> Node:
	return _registry.get(key)

Rock test

MANDATORY comp_rock_test_boilerplate.gd before shipping new app components.

Source: SKILL.md on GitHub

No alerts16d4 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    No security risks or malicious patterns were detected in this skill. The files contain standard Godot architectural guidelines and boilerplate scripts using composition and orchestrator design patterns.

  • Socket16d

    No alerts

  • Snyk16d

    Risk: LOW · No issues

  • Runlayer7mo

    1/4 files flagged

Signed by skilld at 9d6e91e. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 3 weeks ago.

Activeupdated 2 months ago

README badge

README badge for thedivergentai/gd-agentic-skills/godot-composition-apps