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

Flutter AGENTS.md

AGENTS.md for Flutter apps with Riverpod, go_router and clean feature-first structure.

AGENTS.mdFlutter

MCP server (TypeScript) AGENTS.md

AGENTS.md for building Model Context Protocol servers in TypeScript with clear tools, zod schemas and safe defaults.

AGENTS.mdMCP servers

Python FastAPI AGENTS.md

Universal AGENTS.md for Codex, Jules, Cursor and other agents working on a FastAPI + uv project.

AGENTS.mdPython / FastAPI

SvelteKit AGENTS.md

AGENTS.md for SvelteKit 2 + Svelte 5 (runes) apps with TypeScript.

AGENTS.mdSvelteKit

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.