Logo van Godot Gdscript

Godot Gdscript

Community
EL4CTEO
godot-gdscript

Write correct, statically typed GDScript for Godot 4.7 - script layout, typing (typed arrays and dictionaries), signals and await, setters, @export annotations, @abstract and variadic functions, lambdas, match, static members, error fixes, plus a real-engine compile check of all .gd files. Use when writing, reviewing or fixing any .gd file.

Overzicht

UitgeverEL4CTEO
Repositorygodot-skills
Skillnaamgodot-gdscript
Sterren
60
Forks
6
Meegeleverde bestanden
4
LicentieMIT
Links
  • Instructies in Markdown

    Het model laadt het bestand SKILL.md alleen als dat nodig is. Dat kost dus alleen tokens als een verzoek daadwerkelijk bij de skill past.

  • Werkt met elk LLM

    AI-skills bestaan uit instructies in gewone Markdown, niet uit aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • Meegeleverde bestanden: 4

    Scripts, sjablonen en referentiemateriaal die het model tijdens het werken kan lezen. De bestanden kunnen alleen worden gelezen en worden nooit uitgevoerd.

  • Open source

    Gepubliceerd door EL4CTEO op GitHub. Bekijk de bronbestanden voordat je de skill installeert.

Installatie

Installeer de AI-skill Godot Gdscript in TypingMind om deze met elk LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map. De app leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/EL4CTEO/godot-skills/tree/main/skills/godot-gdscript
  4. Schakel de skill in voor elke chat waarin je de skill wilt kunnen gebruiken.
Plug-ins → Skills → Skill toevoegen → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/EL4CTEO/godot-skills.git /tmp/godot-skills
mkdir -p .claude/skills
cp -r /tmp/godot-skills/skills/godot-gdscript .claude/skills/godot-gdscript
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel Godot Gdscript in voor een chat naar keuze in TypingMind en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek bij de skill past, laadt het model zelf de volledige instructies. Je hoeft de skill nooit handmatig aan te roepen. Pas als het model de skill daadwerkelijk gebruikt, kost dat tokens.

Het model laadt Godot Gdscript automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is Godot Gdscript niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

GDScript (4.7)

Check after every edit: python scripts/gd_check.py [paths] compiles every .gd file with the real engine and returns {file, line, msg} errors. Autoloads and class_names resolve like they do at runtime. Look up any engine API with ../godot-core/scripts/api_lookup.py before you use it.

Script layout (official style guide order)

@tool / @icon / @abstract  →  class_name  →  extends  →  ## doc comment
signals → enums → constants → static vars → @export vars → vars → @onready vars
_static_init → _init → _enter_tree → _ready → _process/_physics_process → other virtuals
public methods → _private methods → inner classes

Use snake_case for files, functions and variables, PascalCase for classes and nodes, CONSTANT_CASE for constants and enum values. Indent with tabs. Prefix private members with _.

Typing rules (always typed: safer, and up to ~2x faster)

  • var speed := 5.0 infers the type. Use var target: Node3D when there's no initializer. Use : Variant only on purpose.
  • Typed containers: Array[Enemy], Dictionary[StringName, int] (4.4+). Typed arrays reject wrong element types at runtime.
  • Give every function a return type, including -> void. In 4.7, an override of a typed-return method must return on every path.
  • node as Enemy returns null when the cast fails, for objects. is tests the type. Use is_instance_valid(x) after any await that might outlive x.
  • Enforce typing project-wide with debug/gdscript/warnings/untyped_declaration = 2 (Error). Keep inference_on_variant at its default of Error.
  • int / int is integer division. Write float(a) / b when you mean a fraction.

Signals and await

  • Declare typed signals: signal health_changed(current: int, maximum: int). Emit with health_changed.emit(hp, max_hp).
  • Connect a Callable: button.pressed.connect(_on_pressed). Add arguments with .bind(id) and one-shot behavior with connect(f, CONNECT_ONE_SHOT). Avoid string forms like connect("x", self, "y").
  • Connections made in code don't need manual cleanup when either object is freed. Disconnect explicitly only when you'll reconnect, or when the source is a long-lived autoload and the target is a lambda capturing a freed node.
  • await sig suspends the function. The caller gets control back immediately unless it also awaits. Any function containing await is a coroutine, so the caller must await it to get its return value.
  • Prefer await get_tree().create_timer(0.5).timeout and await get_tree().process_frame/physics_frame to busy waits.
  • "Call down, signal up": parents call methods on children, children emit signals. Cross-scene events go through an autoload event bus (see godot-architecture).

Language features you should use

  • Properties: var hp: int = 10: followed by an indented set(value): hp = clampi(value, 0, max_hp), or set = _set_hp.
  • @export variants (check them with api_lookup.py @export_range): @export_range(0, 100, 1, "or_greater"), @export_enum, @export_flags_3d_physics, @export_file("*.json"), @export_group("Movement"), @export_subgroup, @export_category, @export_storage, @export_custom, @export_tool_button("Bake", "Bake") (4.4+).
  • @onready var label: Label = %ScoreLabel uses a scene-unique name (%). That's safer than long $A/B/C paths.
  • @abstract class_name Weapon with @abstract func fire() -> void (4.5+). Variadic arguments: func log_all(...parts: Array) -> void (4.5+).
  • Lambdas: var double := func(x: int) -> int: return x * 2. They capture locals by value. Mutate shared state through an Array or Dictionary, or through a member variable.
  • match handles literals, [a, b, ..], {"k": v}, var x bindings and when guards (4.3+).
  • static var/static func, const PRELOADED := preload("res://x.tscn"), &"string_name", ^"Node/Path".
  • Doc comments: ## above members (shown in the editor's help and by --gdscript-docs).

Pitfalls (with fixes)

SymptomCause, then fix
Invalid access ... on a base object of type 'null instance'Wrong node path, or used before _ready. Use @onready/%Unique, and get_node_or_null when a node is optional.
previously freedAn await or deferred call outlived the node. Check is_instance_valid() or is_inside_tree().
Physics or tree changes during a callback error outUse call_deferred("add_child", n), set_deferred("disabled", true) or queue_free().
Cyclic reference / Could not resolve classclass_name cycles between preloads. Use type hints with load() at runtime, or split the shared type into its own script.
A signal callback never firesConnected in _ready of a node that isn't in the tree yet, signature mismatch, or a typo in the signal name. Typed sig.connect() catches typos at parse time.
Exported var resetsValue set in _init gets overwritten by the scene file. Initialize in the declaration or in _ready.
Mixed tabs and spacesTabs only. Godot rejects mixed indentation.

Deeper patterns, all compiled by the test suite: references/patterns.md.

Meegeleverde bestanden

Zolang de skill geladen is, leest het model deze bestanden als dat nodig is. Het model kan ze alleen lezen; ze worden nooit uitgevoerd.

Veelgestelde vragen

Wat doet de AI-skill Godot Gdscript?

Write correct, statically typed GDScript for Godot 4.7 - script layout, typing (typed arrays and dictionaries), signals and await, setters, @export annotations, @abstract and variadic functions, lambdas, match, static members, error fixes, plus a real-engine compile check of all .gd files. Use when writing, reviewing or fixing any .gd file.

Waarom Godot Gdscript gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. Godot Gdscript bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model. Ook als je midden in een chat van model wisselt, blijft de skill werken. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek af te sluiten. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik Godot Gdscript in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/EL4CTEO/godot-skills/tree/main/skills/godot-gdscript. TypingMind leest het bestand SKILL.md, bundelt de bijbehorende bestanden en installeert het geheel als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen Godot Gdscript gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met Godot Gdscript gebruiken?

Zoveel als je wilt. Je kunt Godot Gdscript gebruiken met elk model dat skills ondersteunt, zoals GPT, Claude, Gemini, Grok, DeepSeek, Mistral of Llama. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill Godot Gdscript gratis?

Ja. Deze skill is door EL4CTEO op GitHub gepubliceerd onder de licentie MIT. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. De skill volgt het open Agent Skills-formaat: het bestand SKILL.md bevat de naam en beschrijving van de skill. Daarnaast kan de skill scripts, sjablonen of referentiebestanden bevatten die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Bekijk alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇