cursorrules

A set of Cursor coding rules for Godot 4.4 game projects. Godot is a game engine, and these rules cover typed GDScript, naming, scene organization, and how game objects communicate.

In plain words
What is it for?
Use them when building or modifying Godot scenes and GDScript, including lifecycle methods, signals, node names, files, classes, variables, and functions.
Why use it?
They give the coding agent consistent project conventions, making generated or edited game code easier to check and maintain.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/bluebirdback/godot-cursorrules/cursorrules
Clone the repo
git clone --depth 1 https://github.com/BlueBirdBack/godot-cursorrules

Made for: Cursor.

Per session 774 This file is loaded in full into every session.
When invoked 774 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00774 $0.00774
Opus 5 $0.00387 $0.00387
Sonnet 5 $0.00155 $0.00155
Haiku 4.5 $0.00077 $0.00077

Measured yesterday against content hash 149d6aa4dbae, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cursorrules scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursorrules · 79 lines

How it starts

The opening of the file, as written. The whole thing — 79 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Godot 4.4 Game Development .cursorrules

Core Development Guidelines

  • Use strict typing in GDScript for better error detection and IDE support
  • Implement _ready() and other lifecycle functions with explicit super() calls
  • Use @onready annotations instead of direct node references in _ready()
  • Prefer composition over inheritance where possible
  • Use signals for loose coupling between nodes
  • Follow Godot's node naming conventions (PascalCase for nodes, snake_case for methods)

Code Style

  • Use type hints for all variables and function parameters
  • Document complex functions with docstrings
  • Keep methods focused and under 30 lines when possible
  • Use meaningful variable and function names
  • Group related properties and methods together

Naming Conventions

  • Files: Use snake_case for all filenames (e.g., player_character.gd, main_menu.tscn)
  • Classes: Use PascalCase for custom class names with class_name (e.g., PlayerCharacter)
  • Variables: Use snake_case for all variables including member variables (e.g., health_points)
  • Constants: Use ALL_CAPS_SNAKE_CASE for constants (e.g., MAX_HEALTH)
  • Functions: Use snake_case for all functions including lifecycle functions (e.g., move_player())
  • Enums: Use PascalCase for enum type names and ALL_CAPS_SNAKE_CASE for enum values
  • Nodes: Use PascalCase for node names in the scene tree (e.g., PlayerCharacter, MainCamera)
  • Signals: Use snake_case in past tense to name events (e.g., health_depleted, enemy_defeated)

Scene Organization

  • Keep scene tree depth minimal for better performance
  • Use scene inheritance for reusable components
  • Implement proper scene cleanup on queue_free()
  • Use SubViewport nodes carefully due to performance impact
  • Provide step-by-step instructions to create Godot scene(s) instead of providing scene source code

Signal Best Practices

  • Use clear, contextual signal names that describe their purpose (e.g., player_health_changed)
  • Utilize typed signals to improve safety and IDE assistance (e.g., signal item_collected(item_name: String))
  • Connect signals in code for dynamic nodes, and in the editor for static relationships
  • Avoid overusing signals - reserve them for important events, not frequent updates
  • Pass only necessary data through signal arguments, avoiding entire node references when possible
  • Use an autoload "EventBus" singleton for global signals that need to reach distant nodes
  • Minimize signal bubbling through multiple parent nodes
  • Always disconnect signals when nodes are freed to prevent memory leaks
  • Document signals with comments explaining their purpose and parameters

Read the full file on GitHub · 79 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 79 lines · 774 tokens per session scan A 149d6aa4dbae

Subscribe to this mod's changes

cursorrules is a cursor rule published in the GitHub repository BlueBirdBack/godot-cursorrules (119 stars, last pushed 1y ago), licensed MIT. It adds 774 tokens to every session, about $0.0039 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.