godot-gdscript-patterns

godot-gdscript-patterns is a skill for Claude Code, Codex from makifbaysal/tasktrooper. It costs 69 tokens per session (1,627 once invoked), scanned A, original, Apache-2.0.

A set of coding patterns for Godot 4's GDScript, the scripting language used by Godot. It recommends typed code, small component nodes, signals for communication, and separate data and rules.

In plain words
What is it for?
Use it when writing or reviewing Godot gameplay code, choosing between nodes, Resources, and autoloads, building state machines, or loading data and physics work safely.
Why use it?
It reduces errors that would otherwise appear only while the game is running and avoids tightly connected scene trees and oversized global services.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when writing or reviewing Godot gameplay code, choosing between nodes, Resources, and autoloads, building state machines, or loading data and physics work safely.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/makifbaysal/tasktrooper/godot-gdscript-patterns
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.

Any agent
npx skills add makifbaysal/tasktrooper --skill godot-gdscript-patterns
Clone the repo
git clone --depth 1 https://github.com/makifbaysal/tasktrooper

Made for: Claude Code, Codex.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/makifbaysal/tasktrooper/godot-gdscript-patterns/github.svg)](https://agentmods.dev/skills/makifbaysal/tasktrooper/godot-gdscript-patterns)
Your own site
<a href="https://agentmods.dev/skills/makifbaysal/tasktrooper/godot-gdscript-patterns"><img src="https://agentmods.dev/badge/skills/makifbaysal/tasktrooper/godot-gdscript-patterns/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 godot-gdscript-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/makifbaysal/tasktrooper/godot-gdscript-patterns"><img src="https://agentmods.dev/badge/skills/makifbaysal/tasktrooper/godot-gdscript-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 69 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,627 The whole file, excluding the scripts and references it only reads on demand.
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.00069 $0.01627
Opus 5.5 $0.00028 $0.00651
Sonnet 5.5 $0.00014 $0.00325
Haiku 4.5 $0.00007 $0.00163

Measured 4d ago against content hash 5fe805549524, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

godot-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 4d 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.

catalog/agents/game-developer/skills/godot-gdscript-patterns/SKILL.md · 145 lines

How it starts

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

Godot GDScript Patterns

Overview

Godot's building blocks are nodes composed into scenes, signals between them, and Resources for data. GDScript is dynamic by default, which hides typos until runtime and costs speed; typed GDScript catches them at parse time and runs faster. The common failure modes are untyped code, get_node chains reaching up the tree, logic in Resources, and autoloads holding everything.

Core principle: Type everything, compose scenes from small nodes, call down and signal up, keep data in Resources and rules in plain classes.

Type everything

# ❌ untyped: typos and wrong types surface only when this line runs
var speed = 200
func take_damage(amount):
    health -= amount

# ✅ typed: checked when the script parses, faster at runtime
class_name Player extends CharacterBody2D

signal health_changed(current: int, maximum: int)
signal died

@export var definition: PlayerDefinition
@onready var _sprite: AnimatedSprite2D = $AnimatedSprite2D
@onready var _hurtbox: Area2D = %Hurtbox

var health: int

func _ready() -> void:
    health = definition.max_health

func take_damage(amount: int) -> void:
    health = maxi(0, health - amount)
    health_changed.emit(health, definition.max_health)
    if health == 0:
        died.emit()

Turn on Project Settings → Debug → GDScript → untyped_declaration (and unsafe_* warnings) as warnings or errors if the repository has not yet. Typed arrays and dictionaries (Array[Enemy], Dictionary[StringName, int] in 4.4+) everywhere a collection has one element type.

Composition with component nodes

Build behaviour from small reusable child scenes rather than deep inheritance:

Enemy (CharacterBody2D)          enemy.gd: wires components, no rules of its own
├── HealthComponent (Node)       health_component.gd: health, damage(), signal died
├── HitboxComponent (Area2D)     deals damage on overlap
├── HurtboxComponent (Area2D)    forwards hits to HealthComponent
└── StateMachine (Node)          child state nodes: Idle, Chase, Attack

Read the full file on GitHub · 145 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. 4d ago First seen · 145 lines · 69 tokens per session scan A 5fe805549524

Subscribe to this mod's changes

godot-gdscript-patterns is a skill published in the GitHub repository makifbaysal/tasktrooper (113 stars, last pushed yesterday), licensed Apache-2.0. It adds 69 tokens to every session and 1,627 once invoked, about $0.0003 per session on Opus 5.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-10-09.

Related

Other skills, from other repositories