Godot Composition Apps logo

Godot Composition Apps

Community
bgrenat
godot-composition-apps

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.

Overview

Publisherbgrenat
Repositorygodot-game-dev-studio
Skill namegodot-composition-apps
Stars
27
Forks
3
Bundled files
13
LicenseLGPL-3.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 13 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by bgrenat on GitHub. Read the source before you install it.

Installation

Install the Godot Composition Apps AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/bgrenat/godot-game-dev-studio/tree/main/skills/godot-composition-apps
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/bgrenat/godot-game-dev-studio.git /tmp/godot-game-dev-studio
mkdir -p .claude/skills
cp -r /tmp/godot-game-dev-studio/skills/godot-composition-apps .claude/skills/godot-composition-apps
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Godot Composition Apps in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Godot Composition Apps on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Godot Composition Apps is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Godot Composition & Architecture (Apps & UI)

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.

The Core Philosophy

The Litmus Test

Before writing a script, ask: "If I attached this script to a literal rock, would it still function?"

  • Pass: An AuthComponent on a rock allows the rock to log in. (Context Agnostic)
  • Fail: A LoginForm script on a rock tries to grab text fields the rock doesn't have. (Coupled)

The Backpack Model (Has-A > Is-A)

Stop extending base classes to add functionality. Treat the Root Node as an empty Backpack.

  • Wrong (Inheritance): SubmitButton extends AnimatedButton extends BaseButton.
  • Right (Composition): SubmitButton (Root) HAS-A AnimationComponent and HAS-A NetworkRequestComponent.

The Hierarchy of Power (Communication Rules)

Strictly enforce this communication flow to prevent "Spaghetti Code":

DirectionSource → TargetMethodReason
DownwardOrchestrator → ComponentFunction CallManager owns the workers; knows they exist.
UpwardComponent → OrchestratorSignalsWorkers are blind; they just yell "I'm done!"
SidewaysComponent A ↔ Component BFORBIDDENSiblings must never talk directly.

The Sideways Fix: Component A signals the Orchestrator; Orchestrator calls function on Component B.

The Orchestrator Pattern

The Root Node script (e.g., LoginScreen.gd, UserProfile.gd) is now an Orchestrator.

  • Math/Logic: 0%
  • State Management: 100%
  • Job: Wire components together. Listen to Component signals and trigger other Component functions.

Example: App/UI Context

ConceptApp/UI Example
OrchestratorUserProfile.gd
Component 1AuthValidator (Logic)
Component 2AuthVisualSyncer (Visuals)
Component 3ThemeManager (Visuals)

Implementation Standards

1. Type Safety

Define components globally. Never use dynamic typing for core architecture.

gdscript
# auth_component.gd
class_name AuthComponent extends Node

2. Dependency Injection

NEVER use get_node("Path/To/Child"). Paths are brittle. ALWAYS use Typed Exports and drag-and-drop in the Inspector.

gdscript
# Orchestrator script
@export var auth: AuthComponent
@export var form_ui: Control

3. Scene Unique Names

If internal referencing within a scene is strictly necessary for the Orchestrator, use the % Unique Name feature.

gdscript
@onready var submit_btn = %SubmitButton

4. Stateless Components

Components should process the data given to them.

  • Bad: NetworkComponent finds the username text field itself.
  • Good: NetworkComponent has a function login(username, password). The Orchestrator passes the text field data into that function.

NEVER Do (Expert Architectural Rules)

Hierarchy & Dependencies

  • NEVER use get_parent() to fetch data — Components must be blind. If they need data, it must be injected via @export or passed into a function call.
  • NEVER talk sideways — ComponentA must never call functions on ComponentB. High-coupling makes refactoring impossible. Always signal up to the Orchestrator.
  • NEVER use brittle Node Paths — get_node("Child/Subchild/Node") breaks when you move a single node. Use @export and the Inspector.

Logic & State

  • NEVER put business logic in the Orchestrator — The Orchestrator should only have _on_signal methods that delegate to other components.
  • NEVER store global state in individual components — Use a shared Context Resource or the Global Autoload for cross-scene state.
  • NEVER assume a component's parent is of a specific type — If a HealthComponent requires its parent to be a CharacterBody2D, it fails the "Rock Test."

Polish & Orchestration

  • NEVER skip signal cleanup — Connecting signals dynamically without disconnecting can lead to memory leaks or multiple execution bugs.
  • NEVER let Logic know about Visuals — A CombatComponent should never call AnimationPlayer.play(). It emits attack_performed, and a Syncer or Orchestrator handles the visual response.

Godot 4.7: App UI

  • Control offset transform for non-destructive visual tweaks in tool UIs.
  • Editor-style searchable dropdowns pattern applicable to in-app pickers.

Code Structure Example (General App)

Component: clipboard_copier.gd

gdscript
class_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()

Orchestrator: share_menu.gd

gdscript
extends 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!")

Expert Composition Patterns (Apps)

1. App-Level Service Locator

Avoid polluting the Global Autoload list with dozens of Node-based singletons. Use Engine.register_singleton() for lightweight, non-node business logic services (Auth, Config, Networking) [6].

gdscript
# AppServiceLocator.gd (Autoload)
func _ready() -> void:
    # Register a lightweight RefCounted object as a global singleton
    if not Engine.has_singleton(&"AuthService"):
        Engine.register_singleton(&"AuthService", AuthService.new())

# Access from anywhere
var auth = Engine.get_singleton(&"AuthService")

2. Visual-Logic-Syncers (VLS)

Strictly decouple UI animations and VFX from business logic. The Logic component emits signals, and the VLS component listens and triggers the AnimationPlayer [12, 13].

gdscript
# AuthVisualSyncer.gd
@export var logic: AuthFormLogic
@export var anim: AnimationPlayer

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

func _on_login_failed(reason: String):
    anim.play("shake_form")
    # Procedural juice via Tweens
    var t = create_tween()
    t.tween_property(self, "modulate", Color.RED, 0.2)

3. O(1) Component Registry

In complex dashboards, use a Dictionary in the Orchestrator to store sibling components for instant lookup, bypassing brittle get_node() paths [3, 13].

gdscript
# DashboardOrchestrator.gd
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)

Reference

comp_orchestrator_base.gd

Central hub for signal delegation and component wiring. Logic-free manager.

comp_base_component.gd

Foundational component with type-safe signals and auto-group registration.

comp_health_component.gd

Context-agnostic health/damage logic that works on players, enemies, or barrels.

comp_hitbox_component.gd

Area-based collision interface that bridges physical hits to the HealthComponent.

comp_ability_sequencer.gd

Dynamic ability manager that executes child 'Ability' nodes via unified interfaces.

comp_data_driven_config.gd

Late-binding configuration loader for hot-swapping behavior via Resources (.tres).

comp_dependency_injector.gd

Expert injection pattern for passing refs to dynamic components without get_node.

comp_persistence_component.gd

Automated save/load registration for modular node persistence.

comp_logic_visual_syncer.gd

Decoupling agent that syncs gameplay logic state to visual animations/VFX.

comp_rock_test_boilerplate.gd

Architectural validator to ensure components are truly decoupled.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Godot Composition Apps AI skill do?

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.

Why use Godot Composition Apps on TypingMind?

Because you install it once and use it with any model. Godot Composition Apps is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Godot Composition Apps in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/bgrenat/godot-game-dev-studio/tree/main/skills/godot-composition-apps. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Godot Composition Apps?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Godot Composition Apps?

As many as you like. As long as a model supports skills, you can use Godot Composition Apps with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Godot Composition Apps AI skill free?

Yes. It is published on GitHub by bgrenat under the LGPL-3.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇