Cursor Rules for Godot: Scenes, Scripts, and Project Context

Godot projects have specific conventions around scene ownership, GDScript versus C#, resource changes, and playtest steps. These Cursor rules keep an AI assistant aligned with how your game actually works.

Updated 6 min read

Cursor rules for Godot tell the AI assistant which scenes it may edit, how scripts are organized, what resource changes require a person to review, and how to verify that a change works. Without them, an assistant working on a game codebase will make edits that compile but break the scene hierarchy in ways that only appear at runtime.

The design decisions behind a game — which scenes are owned by which system, why a particular node structure was chosen — belong in fenbs alongside the tasks. An assistant that reads both the rules file and the project context in fenbs starts each session with the current design intent, not just the code constraints.

What Godot rules should cover

  • Scene ownership: which scenes the AI may edit freely, which need a person to review, and which are off-limits entirely.
  • Script language choice: GDScript or C# (or both), and which directories use which.
  • Node naming and structure conventions: snake_case or PascalCase, how child nodes are named relative to their parent.
  • Resource changes: whether the AI may add or modify .tres and .res files without asking.
  • Playtest verification: the exact steps to confirm a change works in the editor before committing.
  • Asset pipeline: where imported assets live and what the AI should not modify in the .import/ directory.

A starting template

Cursor rules for a Godot project
# Godot project rules

## Language
- Use GDScript unless the file is in src/dotnet/ where C# is used.
- Keep GDScript typed: always declare variable types explicitly.

## Scene ownership
- Freely editable: scenes in src/ui/ and src/hud/
- Ask before editing: src/world/, src/enemies/, src/player/
- Do not edit: addons/, .godot/

## Node conventions
- Node names: PascalCase (e.g. PlayerBody, MainCamera)
- Script class names match the file name exactly.
- @onready variables are declared at the top of the script.

## Resources
- Do not add or modify .tres or .res files without asking.
- Do not modify files in .import/ — Godot manages these.

## Verification
- After changes, describe which scene to open and which interaction to test.
- Do not assume a change is safe without a manual play test in the editor.

GDScript versus C# rules

If your project uses only GDScript, the language rule is simple. If you mix GDScript and C#, be explicit about which directories use which. A rule that says "use GDScript for gameplay, C# for editor tools" is clearer than a general instruction. An assistant that gets this wrong will produce working code in the wrong language that takes real effort to convert.

Godot MCP is another way to give AI assistants project context at runtime. The Godot MCP guide covers how an MCP server can expose scene information and editor state to a connected assistant.

Game design decisions and fenbs

Rules files capture code conventions. Game design decisions are different: why the player movement uses physics impulses instead of move_and_slide, why the enemy AI cycles through states in a specific order, why multiplayer is deferred to a later milestone. Those decisions change how an assistant should approach a task, and they belong in fenbs as Decisions linked to the relevant work.

When your game design changes — a new mechanic replaces an old one, a level structure is refactored — update the Decision in fenbs and update the rules file. An assistant that only reads the rules file will follow the old structure. One that reads both the rules and the fenbs context will know the current design intent.

How fenbs helps

Keep game design decisions with the work

Add your game's design choices to fenbs as Decisions and rules: the mechanic choices, the scene ownership model, the current milestone. Connected AI apps read the project context before starting, so they know what the game is trying to do, not just how the code is organized.

Create a free account

Free for one person · No credit card · Works with Claude, ChatGPT, Cursor and more

How to set up Godot rules with fenbs

  1. Create a free account and add your game project to fenbs. Write the key design decisions as Decisions and rules: what the game is, who owns which scenes, and the current milestone.
  2. Add the rules template above to your project's .cursor/rules/ directory and replace the placeholder paths and language choices with your actual setup.
  3. Connect Cursor to fenbs over MCP from Integrations. Ask the assistant to read the project context at session start, including any rules about scene ownership.
  4. When the game design changes significantly, update the relevant Decision in fenbs and the rules file. Record what changed and why so the next session starts with the current intent.

Signals and autoload conventions

Godot signals are the standard way to communicate between nodes without creating direct dependencies. An assistant that bypasses signals and calls methods on sibling nodes directly creates tight coupling that breaks whenever the scene tree changes. Add a rule: nodes communicate through signals, not by calling methods on nodes they do not own.

Autoloads (singletons) are a common source of confusion for AI assistants. A rule that names which autoloads exist and what each one is for prevents an assistant from creating a new singleton for functionality that already exists, or from calling an autoload that is not registered. List each autoload by name in the rules file alongside a one-line description of its purpose.

Scene instancing and node references

Godot scenes are instanced at runtime, and node references obtained through get_node() or the $ shorthand are only valid after the node has entered the scene tree. An assistant that caches a node reference before _ready() or accesses a child node before the child is added will produce code that throws a null reference error at runtime, not a compile-time error.

Add a rule about when node references may be acquired and how they should be stored. If your project uses @onready for all node references, say so explicitly. If some nodes are optional and may not be present in every scene instance, note the pattern for checking before accessing.

What to watch for

Godot project files (.godot/) and import metadata (.import/) must never be modified by an assistant. These are managed by the Godot editor automatically. Include an explicit rule that prohibits touching them, and verify that the rule is in effect before giving an assistant access to your project directory.

Scene changes that look correct in code may break node references that the editor manages as internal paths. Any rule that asks an assistant to verify a change should include a step that opens the scene in the Godot editor and confirms node references are intact.

Questions people ask.

Should Cursor rules reference specific scene file paths?

Yes, for ownership and access restrictions. Name the actual directories — src/player/, src/enemies/ — rather than describing them in general terms. An assistant can match a path against a rule but cannot reliably interpret a vague description.

Can Cursor edit Godot scene files (.tscn) directly?

Godot scene files are text files and can be read by Cursor. Editing them directly is risky because node references and resource paths use internal IDs that the Godot editor manages. A rules file should require the assistant to ask before making structural scene changes.

How do I handle rules for a Godot 4 project versus Godot 3?

State the Godot version in the rules file. GDScript syntax and APIs differ significantly between versions. An assistant given Godot 4 code should not use Godot 3 patterns like yield or the old signal syntax.

Where should game design documentation live if not in the rules file?

Decisions about mechanics, level structure, or art style belong in fenbs as Decisions linked to the relevant tasks. The rules file captures code conventions; the design reasoning belongs with the work.

More in Prompts and skills for AI work

All Prompts and skills for AI work articles

Start with one thing.

Free for one person · No credit card · Works with Claude, ChatGPT, Cursor and more

There is nothing to set up first. Write one line and you’ve started.