godot-code-rules

Enforce strict typed GDScript rules for Godot .gd files.

8|3|Updated Jun 12, 2026
One-click install
npx skills add https://github.com/arthur0n/xenodot-forge --skill godot-code-rules
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: godot-code-rules
Source: https://github.com/arthur0n/xenodot-forge/tree/main/plugin/skills/godot-code-rules
Command: npx skills add https://github.com/arthur0n/xenodot-forge --skill godot-code-rules

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents fragile Godot code by enforcing strict typed-GDScript practices, consistent file structure, and validation habits before code is written or edited.

Core Features & Use Cases

  • Strict typing discipline: Requires explicit types, return annotations, and analyzer-friendly references to avoid unsafe access and untyped declarations.
  • Godot lint and validation guidance: Explains how to work with gdlint, gdformat, warnings-as-errors, and the project validation gate.
  • Safe escape hatches: Defines when and how to use warning ignores, SEAM comments, and FIXME markers without weakening the codebase.
  • Use Case: Use this Skill when implementing a new player controller, refactoring a scene script, or fixing a typed GDScript analyzer error.

Quick Start

Use the godot-code-rules skill to review this .gd file for typing, warning, and validation issues before I edit it.

Frequently Asked Questions about godot-code-rules

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce strict typing in GDScript to fix analyzer errors?

Enforce strict typing in GDScript by requiring explicit type declarations, return annotations, and safe node references to resolve analyzer errors and prevent unsafe access. This approach ensures code quality and validation compliance.

What is the best way to lint and format Godot .gd files before validation?

Linting and formatting Godot .gd files involves using gdlint and gdformat alongside warnings-as-errors rules. This ensures your code passes the project validation gate by catching untyped declarations and unsafe structural issues before review.

Can I safely ignore GDScript warnings without weakening my codebase?

You can safely ignore GDScript warnings using controlled SEAM comments and FIXME markers. This provides structured escape hatches for specific situations without weakening the overall codebase or bypassing validation gates.

How do I refactor a Godot scene script to pass validate.sh?

Refactoring a Godot scene script to pass validate.sh requires updating untyped declarations to explicit types and ensuring analyzer-friendly node references. This compliance prevents fragile code and meets strict validation gate requirements.

Why does my Godot code fail validation due to unsafe node references?

Godot code fails validation due to unsafe node references when types are missing or declarations are untyped. Applying strict typed-GDScript practices and analyzer-friendly references resolves these unsafe access issues before validation.