gdscript-syntax-guide_skill

This skill provides authoritative guidance for GDScript syntax in Godot 4.5, ensuring correct syntax, tab indentation, type safety, and consistent style.
  • TypeScript

16

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill hhhh124hhhh/godot-mcp --skill gdscript-syntax-guide

  • SKILL.md12.3 KB

Overview

This skill is an authoritative GDScript syntax and style guide tailored for Godot 4.5. It enforces syntax accuracy, tab-based indentation rules, type-safety practices, and consistent naming conventions to produce clean, maintainable code. The guide targets game developers writing GDScript and teams standardizing their codebase.

How this skill works

The guide inspects code structure, indentation, type annotations, signal usage, node access patterns, and export/property declarations against Godot 4.5 best practices. It highlights correct and incorrect patterns, recommends editor settings (tab width = 4 display), and describes safe runtime checks, memory handling, and performance optimizations. Use it to validate style, improve readability, and reduce runtime errors.

When to use it

  • When starting a new Godot 4.5 project to establish a consistent code style.
  • During code reviews to enforce tab-based indentation and naming rules.
  • When converting legacy GDScript to strongly-typed Godot 4.5 style.
  • Before merging patches to catch unsafe node access or signal misuse.
  • When optimizing performance, memory, or reducing runtime type errors.

Best practices

  • Always use tab characters for indentation; configure editor to display tabs as 4 spaces.
  • Prefer strong typing: annotate variables, parameters, and return types.
  • Use snake_case for variables and functions, PascalCase for class names, UPPER_SNAKE_CASE for constants.
  • Type-check nodes and resources with is and as; prefer @onready for cached node references.
  • Use @export with typed properties and typed signals for editor safety and clarity.
  • Cache frequently used nodes and avoid unnecessary type conversions to reduce overhead.

Example use cases

  • Defining a typed CharacterController with @onready cached nodes and typed signals.
  • Implementing a pooled bullet system that reuses instances to avoid frequent allocations.
  • Writing safe resource loaders with file existence checks and JSON parse handling.
  • Standardizing project imports, preloads, and grouped node lookups for team collaboration.
  • Refactoring input handling into structured, type-checked handlers for keyboard, mouse, and controller.

FAQ

Godot's editor defaults to tabs, tabs avoid mixed-indentation issues across contributors, and they keep file sizes smaller while preserving display width via editor settings.

How strict should I be with type annotations?

Favor strong typing for public APIs, exported properties, and core gameplay logic to catch errors early; lightweight scripts or prototypes can be gradual but should migrate to typed style for stability.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational