pn-godot

pn-godot is a cursor rule for Cursor from perniemann/pnCore. It costs 1,156 tokens per session, scanned A, original, MIT.

A set of coding rules for Godot 4 projects, covering GDScript, scenes, shaders, resources, and multiplayer code. Godot is a game engine, and GDScript is its scripting language.

In plain words
What is it for?
Use it when editing Godot project files such as scripts, scenes, resources, shaders, or project settings.
Why use it?
It keeps game code consistent and helps catch unclear types, unsafe node access, poor scene structure, and multiplayer mistakes while files are edited.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

Good fit Use it when editing Godot project files such as scripts, scenes, resources, shaders, or project settings.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/perniemann/pncore/pn-godot
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.

Clone the repo
git clone --depth 1 https://github.com/perniemann/pnCore

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pn-godot

README.md
[![agentmods](https://agentmods.dev/badge/rules/perniemann/pncore/pn-godot/github.svg)](https://agentmods.dev/rules/perniemann/pncore/pn-godot)
Your own site
<a href="https://agentmods.dev/rules/perniemann/pncore/pn-godot"><img src="https://agentmods.dev/badge/rules/perniemann/pncore/pn-godot/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for pn-godot

Your own site · 80×15
<a href="https://agentmods.dev/rules/perniemann/pncore/pn-godot"><img src="https://agentmods.dev/badge/rules/perniemann/pncore/pn-godot.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,156 This file is loaded in full into every session.
When invoked 1,156 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.01156 $0.01156
Opus 5 $0.00578 $0.00578
Sonnet 5 $0.00231 $0.00231
Haiku 4.5 $0.00116 $0.00116

Measured 7d ago against content hash 988ac63df55f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

pn-godot 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 7d ago.

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.

packages/pn-core-mcp/content/rules/pn-godot.mdc · 64 lines

How it starts

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

Godot 4.x rules

GDScript

  • Always use type hints. Every variable, parameter, and return type must be annotated: var health: int, func take_damage(amount: int) -> void. Enables static analysis and editor autocomplete.
  • @onready for node references. Use @onready var label: Label = $UI/Label — never get_node() inside _ready(). Null-check when the node may be absent.
  • Signals with types. Declare signal health_changed(new_value: int) — always typed. Connect via signal.connect(callable) in code (not connect("signal", target, "method") — that is Godot 3 style).
  • No magic strings for node paths. Assign node references via @export or @onready; never hardcode long $Path/To/Node strings in logic.
  • Prefer _physics_process for movement. Use _process for visuals/UI; _physics_process for move_and_slide, physics queries, and RigidBody interaction.

Scene composition

  • One responsibility per scene. Extract logical sub-trees into .tscn files. Instance scenes rather than duplicating node trees.
  • Autoloads for globals only. Register autoloads for services/event buses/global state. Do not put per-scene state in autoloads.
  • Signal over direct call. Nodes below should not call nodes above in the tree directly. Emit a signal up; the parent or autoload routes it. Direct calls are acceptable downward (parent → child).
  • Groups for broadcast. Use add_to_group() for queries across unrelated branches (e.g. "enemies"). Do not use groups as a substitute for signals when you need a response.

Naming conventions

  • Files: snake_case.gd, snake_case.tscn, snake_case.tres. No spaces.
  • Nodes: PascalCase (PlayerController, HealthBar). Scene roots match the file name.
  • Variables/functions: snake_case. Constants: ALL_CAPS. Enums: PascalCase, values ALL_CAPS.
  • Signals: past-tense or noun phrase: health_changed, enemy_died, level_completed.
  • Prefixes: _ for private helpers; no prefix for public API. Avoid on_ prefix on signal declarations (reserve _on_ for handler methods: _on_button_pressed).

Read the full file on GitHub · 64 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. 7d ago First seen · 64 lines · 1,156 tokens per session scan A 988ac63df55f

Subscribe to this mod's changes

pn-godot is a cursor rule published in the GitHub repository perniemann/pnCore (0 stars, last pushed 2d ago), licensed MIT. It adds 1,156 tokens to every session, about $0.0058 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-31.