
godot-gdscript
Write idiomatic GDScript for Godot 4.7: static typing, the node lifecycle (ready/process/physicsprocess), @export/@onready/@tool annotations, signals, and await for asynchronous flow. Use when editing .gd scripts in a Godot project (project.godot), writing or debugging GDScript, or porting 3.x GDScript to 4.x (function signatures, yield to await, export to @export).
- Installs
- 6.8K
- Last 24h
- +347
- Trending rank
- #880
- Security
- Pass
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/gamedev-skills/awesome-gamedev-agent-skills --skill godot-gdscript- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads godot-gdscript automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
Security audits
Independent scans of the skill's instructions and bundled files.
SKILL.md
The instructions your agent reads when the skill is triggered.
Godot GDScript (4.x)
Write correct, statically typed GDScript and use the node lifecycle and signal system the way the engine intends. Targets Godot 4.7 (GDScript 2.0).
When to use
- Use when writing or fixing
.gdfiles: declaring variables, functions, classes, using@export/@onready, connecting signals, or awaiting coroutines/signals. - Use when porting Godot 3.x scripts to 4.x and the script no longer parses.
When not to use: scene/node structure and instancing questions →
godot-nodes-scenes; signal architecture/decoupling patterns →
godot-signals-groups; using C# instead of GDScript → godot-csharp.
Core workflow
- Type everything you can. GDScript 2.0 supports static types
(
var hp: int = 10,func add(a: int, b: int) -> int:). Types catch errors at parse time and speed up the VM. Use:=for inferred types. - Use the lifecycle callbacks for their purpose:
_ready()once when the node and its children enter the tree;_process(delta)every rendered frame;_physics_process(delta)on the fixed physics tick (use it for movement/physics). - Grab node references with
@onready, not in_init()— children do not exist until the node enters the tree. - Expose tunables with
@exportso designers edit them in the Inspector. - React to events with signals +
await, not polling, where it reads cleanly. - Run and read errors. The Debugger panel prints typed errors with line numbers; fix the first error first (later ones are often cascades).
Patterns
1. A typed script with lifecycle, @export, and @onready
extends Node2D
class_name Spinner # registers a global type usable in other scripts
@export var speed: float = 90.0 # editable in the Inspector (degrees/sec)
@export_range(0, 10, 0.5) var wobble := 2.0
@onready var sprite: Sprite2D = $Sprite2D # resolved when the node enters the tree
func _ready() -> void:
# Runs once, after children are ready. Safe to touch $Sprite2D here.
sprite.modulate = Color.AQUA
func _process(delta: float) -> void:
# delta is seconds since last frame; multiply rates by it for FPS independence.
rotation_degrees += speed * delta
2. Signals: declare, emit, connect (4.x Callable syntax)
extends Node
signal health_changed(current: int, maximum: int) # typed signal params
var health := 100
func take_damage(amount: int) -> void:
health = maxi(health - amount, 0) # maxi/maxf are typed; max() returns Variant
health_changed.emit(health, 100) # 4.x: emit as a method on the signal
func _ready() -> void:
# 4.x: connect with a Callable, not a string method name.
health_changed.connect(_on_health_changed)
func _on_health_changed(current: int, maximum: int) -> void:
print("HP: %d/%d" % [current, maximum])
3. await — pause until a timer or signal fires (replaces 3.x yield)
func flash_then_continue() -> void:
modulate = Color.RED
await get_tree().create_timer(0.2).timeout # resume after 0.2s
modulate = Color.WHITE
# await any signal: var result = await some_node.some_signal
4. Lambdas, typed arrays, and safe access
var enemies: Array[Node] = [] # typed array
func cull_dead() -> void:
enemies = enemies.filter(func(e): return e.is_inside_tree())
func get_first_name(d: Dictionary) -> String:
return d.get("name", "unknown") # default avoids missing-key errors
Pitfalls
- 3.x → 4.x signal API changed.
emit_signal("x")still works but preferx.emit(...);connect("x", self, "_on_x")is gone — usex.connect(_on_x)with a Callable.yield(obj, "sig")is nowawait obj.sig. export varis now@export var(annotation). Likewiseonready→@onready,tool→@tool,remote/masterRPC keywords → the@rpc(...)annotation.@onreadyand$NodePathin_init()fail — the node isn't in the tree yet. Initialize node references in_ready()or with@onready.- Integer division truncates.
5 / 2 == 2. Use5.0 / 2or cast tofloat. _processvs_physics_process. Putmove_and_slide()and physics in_physics_process(delta); using_processmakes motion frame-rate dependent.class_namemust be unique project-wide and is required to use the type name in other scripts or as an Inspector type.- An override stops parsing after upgrading to 4.7 → since 4.7 an overriding method
inherits the parent's typed return, so every path must
returna value (addreturn nullat the end if needed). Also new in 4.7: setting one element of a packed array property (points[0] = v) no longer calls that property's setter; reassign the whole array if the setter must run.
References
- For the full annotation list, advanced typing, and style conventions, read
references/annotations-and-typing.md.
Related skills
godot-nodes-scenes— the scene tree, instancing, and autoloads.godot-signals-groups— event-driven architecture with signals and groups.godot-resources— data-driven design with customResourcetypes.godot-csharp— the same engine concepts using C#/.NET.
FAQ
What does the godot-gdscript skill do?
Write idiomatic GDScript for Godot 4.7: static typing, the node lifecycle (ready/process/physicsprocess), @export/@onready/@tool annotations, signals, and await for asynchronous flow. Use when editing .gd scripts in a Godot project (project.godot), writing or debugging GDScript, or porting 3.x GDScript to 4.x (function signatures, yield to await, export to @export).
How do I install godot-gdscript?
Run npx skills add https://github.com/gamedev-skills/awesome-gamedev-agent-skills --skill godot-gdscript in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/godot-gdscript/ (personal) or .claude/skills/godot-gdscript/ (project).
Which AI agents can use godot-gdscript?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is godot-gdscript safe to install?
Security partners have reviewed it: Gen Agent Trust Hub passed; Socket passed; Snyk passed. As with any skill, read the SKILL.md and bundled scripts before installing.
Who maintains godot-gdscript?
It is published by gamedev-skills in gamedev-skills/awesome-gamedev-agent-skills. It has 6,806 recorded installs.
More from gamedev-skills/awesome-gamedev-agent-skills
game-feel
gamedev-skills/awesome-gamedev-agent-skills
Add "juice" and game feel that makes actions satisfying — screen shake, hit-stop/freeze frames, tweened/eased motion, squash & stretch, knockback, and layered audio-visual feedback — as engine-neutral techniques that pair with the detected engine's tween, particle, and camera APIs. Use when the user mentions game feel, juice, "make it feel good/punchy", screen shake, hit stop, screen freeze, easing, squash and stretch, impact frames, or feedback/polish on hits, jumps, pickups, and deaths.
game-ui-ux
gamedev-skills/awesome-gamedev-agent-skills
Design and build game UI/UX — HUDs, menus, and overlays — that survive every screen: anchor- based responsive layout, resolution/aspect scaling and safe areas, keyboard/gamepad focus navigation, a screen/menu state stack, and event-driven (not polled) HUD updates. Engine- neutral patterns that pair with the detected engine's UI skill. Use when the user mentions HUD, health bar, main menu, pause menu, settings screen, UI layout, anchors, UI scaling, aspect ratio, safe area, controller/keyboard menu navigation, or wiring UI to game state.
level-design
gamedev-skills/awesome-gamedev-agent-skills
Design and build playable levels — the blockout/whitebox-to-playable workflow, player metrics and grid layout, pacing and flow (tension/rest curve), gating and the critical path, and encounter design. Engine-neutral practice. Use when the user mentions level design, blockout/whitebox/greybox, level layout, level pacing, encounter design, or the critical path through a level.
performance-optimization
gamedev-skills/awesome-gamedev-agent-skills
Find and fix game performance problems methodically — measure with the engine profiler first, reason about the frame-time budget, locate the CPU-vs-GPU bottleneck, then apply the right fix: object pooling, draw-call batching, fewer allocations/GC spikes, and asset budgets. Engine- neutral method that pairs with each engine's profiler. Use when the user mentions performance, optimize, low/dropping FPS, frame drops, stutter, lag, profiler, frame budget, draw calls, batching, garbage collection/GC spikes, object pooling, or "the game runs slow".
game-ai
gamedev-skills/awesome-gamedev-agent-skills
Design NPC and enemy decision-making with finite state machines, behavior trees, steering behaviors, and A pathfinding — engine-neutral algorithms that pair with the detected engine's navigation API. Use when building enemy AI, an FSM or behavior tree, steering/flocking, or pathfinding, or when the user mentions state machine, behavior tree, blackboard, A, navmesh, seek, or patrol/chase.
audio-design
gamedev-skills/awesome-gamedev-agent-skills
Implement game audio practice — bus/mixer architecture and gain in decibels, ducking (sidechain), adaptive/dynamic music via layering and re-sequencing, SFX variation, and beat synchronization. Engine-neutral. Use when the user mentions audio mixing, audio buses, adaptive/dynamic music, ducking, SFX variation, music layers, or syncing gameplay to the beat.
Popular ai & agents skills
google-agents-cli-publish
google/agents-cli
This skill should be used when the user wants to "publish an agent", "publish my ADK agent", "register an agent with Gemini", "publish to Gemini" (formerly Gemini Enterprise), or needs guidance on the agents-cli publish gemini command. Also use when the user wants to "manage agents in Agent Registry", "list/update/delete registered agents", or "register an MCP server". Covers ADK vs A2A registration modes, programmatic and interactive usage, flag reference, auto-detection from deployment metadata, Agent Registry fleet management, and troubleshooting. Part of the agents-cli skills suite. Do NOT use for deployment (use google-agents-cli-deploy).
google-agents-cli-eval
google/agents-cli
This skill should be used when the user wants to "run an evaluation", "evaluate my agent", "evaluate my ADK agent", "write an eval dataset", "analyze eval failures", "compare eval results", "optimize agent", or needs guidance on the Gemini platform eval methodology and the Quality Flywheel. Covers eval metrics, dataset schema, LLM-as-judge scoring, and common failure causes. Applies to any agents-cli project, whatever framework the agent is written in. Do NOT use for agent API code patterns (ADK: use google-agents-cli-adk-code), deployment (use google-agents-cli-deploy), or project scaffolding (use google-agents-cli-scaffold).
skill-creator
anthropics/skills
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
codex-pet
prime-skills/runcomfy-agent-skills
Codex Pet generator on RunComfy. Build a Codex-compatible Codex Pet spritesheet.webp + pet.json from a single reference image, drop it into ${CODEXHOME:-$HOME/.codex}/pets/ / and Codex picks it up as a custom Codex Pet next to the 8 built-ins. This skill produces the exact Codex Pet atlas Codex expects (1536x1872 PNG/WebP, 8 cols x 9 rows, 192x208 cells, 9 animation states — idle, running-right, running-left, waving, jumping, failed, waiting, running, review). Calls OpenAI GPT Image 2 edit ONCE via the local RunComfy CLI as runcomfy run openai/gpt-image-2/edit to produce a canonical Codex Pet pose, then assembles all 9 animation rows programmatically with ImageMagick micro-transforms — no Codex Pro, no $imagegen, no OPENAIAPIKEY required, only RUNCOMFYTOKEN. Triggers on "codex pet", "create codex pet", "make codex pet", "hatch codex pet", "/hatch image", "desktop pet codex", "codex pets", "spritesheet.webp", or any explicit ask to build a custom pet for OpenAI Codex.
full-output-enforcement
leonxlnx/taste-skill
Overrides default LLM truncation behavior. Enforces complete code generation, bans placeholder patterns, and handles token-limit splits cleanly. Apply to any task requiring exhaustive, unabridged output.
executing-plans
obra/superpowers
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available