Home › Godot › Godot 4 GDScript AGENTS.md

Godot 4 GDScript AGENTS.md

AGENTS.md for Godot 4 projects using typed GDScript, signals and scene composition.

AGENTS.mdGodot

How to use

Save this as AGENTS.md in your repository root, commit it, and your agent will pick it up automatically. Edit the commands to match your project.

AGENTS.mdDownload  
# AGENTS.md — Godot 4

## Project
- Godot 4.x, GDScript only. Scenes in `scenes/`, scripts next to their scene, autoloads in `autoload/`.

## GDScript style
- Static typing everywhere: `var speed: float = 200.0`, `func move(dir: Vector2) -> void:`.
- Use `@export` for tunables, `@onready var sprite: Sprite2D = $Sprite2D` for node refs.
- snake_case for functions/vars, PascalCase for `class_name`, CONSTANT_CASE for constants.
- Communicate upward with signals, downward with method calls ("call down, signal up").
- Physics movement in `_physics_process`, using `move_and_slide()` on CharacterBody nodes.
- Prefer composition: small reusable scenes (HitboxComponent, HealthComponent) over deep inheritance.

## Don't
- Don't hand-edit `.tscn`/`.tres` files unless asked; describe Inspector changes instead.
- Don't use `get_node` with long absolute paths; use unique names (`%Player`) or exported NodePaths.

## Verify
- `godot --headless --check-only --script <file>` for syntax; run GUT tests if `addons/gut` exists.

Related rules

REST API design AGENTS.md

AGENTS.md for designing consistent HTTP/JSON APIs: resource naming, status codes, errors, pagination, and versioning.

AGENTS.mdAPI design

Bevy game engine AGENTS.md

AGENTS.md for Bevy (0.16+) games in Rust: ECS systems, plugins, required components, and fast dev builds.

AGENTS.mdBevy (Rust)

Git commits & PRs AGENTS.md

AGENTS.md rules for how agents commit: Conventional Commits, atomic changes, safe git commands, and PR descriptions.

AGENTS.mdAgent workflows

CrewAI multi-agent AGENTS.md

AGENTS.md for CrewAI 1.x projects: YAML agents and tasks, crews and flows, tools, and cost-aware runs.

AGENTS.mdLLM apps & agents

Get new rules weekly

One email a week: fresh rule files, agent tips, and what's changing in Cursor, Claude Code and Copilot. Free, unsubscribe anytime.

Opens the Rulestack Newsletter on beehiiv in a new tab. Or subscribe directly on beehiiv.