gdscript-patterns

gdscript-patterns is a skill for Claude Code from ouzlifaneyassine1-dot/onyx-engine. It costs 79 tokens per session (1,854 once invoked), scanned A, a copy of gdscript-patterns, MIT.

A set of patterns for writing GDScript, the programming language used by Godot game projects. It covers typed variables, signals, editable properties, and node lifecycle methods.

In plain words
What is it for?
Use it when creating or refactoring GDScript, connecting signals, exposing settings in the editor, or working with scene nodes.
Why use it?
It helps keep Godot scripts consistent and makes their data and behavior clearer in the editor.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions Claude Code; mentions Codex.

Not installable on its own: it reads a path above its own folder, which only exists inside its repository. The line is var target = get_node("../Enemy/HealthBar").

Part of the onyx plugin — 77 skills, 1 command, 2 hooks, 1 MCP server shipped together

Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add ouzlifaneyassine1-dot/onyx-engine
Claude Code
/plugin install onyx

Made for: Claude Code.

Or install onyx, the plugin that ships this one along with the rest of its 77 skills, 1 command, 2 hooks, 1 MCP server.

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 gdscript-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/ouzlifaneyassine1-dot/onyx-engine/gdscript-patterns.svg)](https://agentmods.dev/skills/ouzlifaneyassine1-dot/onyx-engine/gdscript-patterns)
Your own site
<a href="https://agentmods.dev/skills/ouzlifaneyassine1-dot/onyx-engine/gdscript-patterns"><img src="https://agentmods.dev/badge/skills/ouzlifaneyassine1-dot/onyx-engine/gdscript-patterns.svg" alt="Measured on agentmods" height="20"></a>
Per session 79 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,854 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 94% copy Near-identical to another mod 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.00079 $0.01854
Opus 5 $0.00039 $0.00927
Sonnet 5 $0.00016 $0.00371
Haiku 4.5 $0.00008 $0.00185

Measured 5d ago against content hash c62400206cd3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

gdscript-patterns 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 5d 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.

Origin

This is a copy

94% identical to gdscript-patterns — 14 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/scripting-patterns/gdscript-patterns/SKILL.md · 151 lines

How it starts

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

GDScript Patterns for Onyx Engine

When writing GDScript for Onyx Engine projects, follow these patterns. They align with Godot 4.x conventions and work well with MCP scene operations.

Type Hints

Always use type hints for clarity and editor support:

var health: int = 100
var speed: float = 5.0
var player_name: String = ""
var velocity: Vector3 = Vector3.ZERO
var is_alive: bool = true

For nodes, use typed references:

@onready var collision_shape: CollisionShape3D = $CollisionShape3D
@onready var camera: Camera3D = $Camera3D

Signals

Define signals at the top of the script, then emit them:

signal died
signal health_changed(new_health: int)
signal item_collected(item_name: String)

func take_damage(amount: int) -> void:
    health -= amount
    health_changed.emit(health)
    if health <= 0:
        died.emit()

When connecting via MCP, use onyx_connect_signal with the emitter path, signal name, receiver path, and method name. The receiver script must have the method defined.

Exports

Use @export for inspector-editable properties:

@export var move_speed: float = 5.0
@export var jump_force: float = 10.0
@export var max_health: int = 100
@export var can_double_jump: bool = false

Exports appear in the inspector. MCP can set initial values via onyx_set_prop after the node exists, but exports are best for values the designer tweaks.

Lifecycle Methods

Method When it runs Use for
_ready() Once when node enters tree Initialization, getting node references
_process(delta: float) Every frame UI, non-physics logic
_physics_process(delta: float) Every physics frame (fixed) Movement, physics, collision

For character movement, use _physics_process and move_and_slide().

Node Access

# Prefer $ for direct children
var camera = $Camera3D

# get_node() for dynamic paths
var target = get_node("../Enemy/HealthBar")

# get_parent() / get_children() when needed
var siblings = get_parent().get_children()

Read the full file on GitHub · 151 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 5d ago First seen · 151 lines · 79 tokens per session scan A c62400206cd3

Subscribe to this mod's changes

gdscript-patterns is a skill published in the GitHub repository ouzlifaneyassine1-dot/onyx-engine (0 stars, last pushed 2mo ago), licensed MIT. It adds 79 tokens to every session and 1,854 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. It is 94% identical to gdscript-patterns, differing in 14 lines, and is treated as a copy.

Related

Other skills, from other repositories

zoom-meeting-sdk-unreal

Zoom Meeting SDK for Unreal Engine wrapper integrations. Use when building Unreal projects that embed Zoom meetings with C++ and Blueprint wrappers, including wrapper-to-SDK mapping concerns.

anthropics/knowledge-work-plugins · 41 tokens

reflection-method-call

Call a C# method by reflection — including private methods. Requires a method schema obtained via 'reflection-method-find'. Supports static methods, instance methods (with optional target deserialization), and main-thread / off-thread execution.

IvanMurzak/Unity-MCP · 48 tokens

script-execute

Compiles and executes C# code dynamically using Roslyn. Supports a full-code mode (default) and a body-only mode — see the skill body for the difference and for how to pass Unity object references as parameters.

IvanMurzak/Unity-MCP · 48 tokens

reflection-method-find

Find C# methods across every loaded assembly by name / type / parameters — including private methods. Returns serialized MethodData entries usable as schemas for 'reflection-method-call'.

IvanMurzak/Unity-MCP · 39 tokens

unity-version-split

Split a C# file into Unity 6.5+ and pre-Unity 6.5 variants. Use when a file needs different implementations for different Unity versions due to API changes (e.g., EntityId vs int, GetEntityId vs GetInstanceID).

IvanMurzak/Unity-MCP · 59 tokens

script-delete

Delete one or more .cs script files from disk, refresh the AssetDatabase, and wait for Unity compilation to settle before delivering the final result via the request's requestId. Pair with 'script-read' to inspect files before deletion.

IvanMurzak/Unity-MCP · 52 tokens