add-mechanic

add-mechanic is a skill for Claude Code from n24q02m/better-godot-mcp. It costs 26 tokens per session (1,724 once invoked), scanned A, original, Apache-2.0.

A guide for adding common game systems in GDScript 4.x, the programming language and current syntax used by Godot 4.

In plain words
What is it for?
Use it when implementing player movement, health, inventories, saving, and loading in a Godot game.
Why use it?
It prevents outdated Godot 3 syntax from being used in Godot 4 projects, which can cause scripts to fail or behave incorrectly.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the better-godot-mcp plugin — 3 skills, 1 MCP server shipped together

Good fit Use it when implementing player movement, health, inventories, saving, and loading in a Godot game.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/n24q02m/better-godot-mcp/add-mechanic
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 n24q02m/better-godot-mcp --skill add-mechanic
Clone the repo
git clone --depth 1 https://github.com/n24q02m/better-godot-mcp

Made for: Claude Code.

Or install better-godot-mcp, the plugin that ships this one along with the rest of its 3 skills, 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 add-mechanic

README.md
[![agentmods](https://agentmods.dev/badge/skills/n24q02m/better-godot-mcp/add-mechanic/github.svg)](https://agentmods.dev/skills/n24q02m/better-godot-mcp/add-mechanic)
Your own site
<a href="https://agentmods.dev/skills/n24q02m/better-godot-mcp/add-mechanic"><img src="https://agentmods.dev/badge/skills/n24q02m/better-godot-mcp/add-mechanic/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 add-mechanic

Your own site · 80×15
<a href="https://agentmods.dev/skills/n24q02m/better-godot-mcp/add-mechanic"><img src="https://agentmods.dev/badge/skills/n24q02m/better-godot-mcp/add-mechanic.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 26 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,724 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00026 $0.01724
Opus 5 $0.00013 $0.00862
Sonnet 5 $0.00005 $0.00345
Haiku 4.5 $0.00003 $0.00172

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

Security

Grade A, and why

add-mechanic 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 12d 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

Copies of this mod

1 near-identical copy found in the catalogue:

skills/add-mechanic/SKILL.md · 221 lines

How it starts

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

Add Mechanic

Add game mechanics using correct GDScript 4.x syntax. Prevents common LLM mistakes with outdated GDScript 3.x patterns.

GDScript 4.x Syntax Rules

These changed from Godot 3 to 4. LLMs frequently generate the OLD syntax:

Correct (GDScript 4.x) Wrong (GDScript 3.x -- will error)
@export var speed: float = 200.0 export var speed = 200.0
@onready var sprite = $Sprite2D onready var sprite = $Sprite2D
signal health_changed(new_hp: int) signal health_changed (no typed params)
func _ready() -> void: func _ready(): (return type optional but preferred)
velocity = Vector2(...) then move_and_slide() move_and_slide(velocity, Vector2.UP) (args removed in 4.x)
super() .method() for parent calls
await get_tree().create_timer(1.0).timeout yield(get_tree().create_timer(1.0), "timeout")
%UniqueNode get_node("path/to/node") when unique name is set

Movement Patterns

Platformer Movement

extends CharacterBody2D

@export var speed: float = 300.0
@export var jump_velocity: float = -400.0
@export var gravity: float = 980.0

func _physics_process(delta: float) -> void:
    # Gravity
    if not is_on_floor():
        velocity.y += gravity * delta

    # Jump
    if Input.is_action_just_pressed("jump") and is_on_floor():
        velocity.y = jump_velocity

    # Horizontal movement
    var direction := Input.get_axis("move_left", "move_right")
    velocity.x = direction * speed

    move_and_slide()

Key: move_and_slide() takes NO arguments in Godot 4. Velocity is set on the velocity property directly.

Top-Down Movement

extends CharacterBody2D

@export var speed: float = 200.0

func _physics_process(_delta: float) -> void:
    var direction := Input.get_vector("move_left", "move_right", "move_up", "move_down")
    velocity = direction * speed
    move_and_slide()

Point-and-Click Movement

extends CharacterBody2D

@export var speed: float = 200.0
var target_position: Vector2

func _input(event: InputEvent) -> void:
    if event is InputEventMouseButton and event.pressed:
        target_position = get_global_mouse_position()

func _physics_process(_delta: float) -> void:
    if position.distance_to(target_position) > 5.0:
        velocity = position.direction_to(target_position) * speed
    else:
        velocity = Vector2.ZERO
    move_and_slide()

Read the full file on GitHub · 221 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. 12d ago First seen · 221 lines · 26 tokens per session scan A cdc5d9c0b4f8

Subscribe to this mod's changes

add-mechanic is a skill published in the GitHub repository n24q02m/better-godot-mcp (37 stars, last pushed today), licensed Apache-2.0. It adds 26 tokens to every session and 1,724 once invoked, about $0.0001 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.

Related

Other skills, from other repositories

okx-cex-portfolio

This skill should be used when the user asks about 'account balance', 'how much USDT do I have', 'my funding account', 'show my positions', 'open positions', 'position P&L', 'unrealized PnL', 'closed positions', 'position history', 'realized PnL', 'account bills', 'transaction history', 'trading fees', 'fee tier'…

okx/agent-trade-kit · 236 tokens

aba-precision-protocol

FOUNDATIONAL BEHAVIORAL PROTOCOL — ABA-based precision execution rules. Every prompt processed must follow these rules. Mistakes caught late create intermittent reinforcement of wrong patterns. Stop-fix-verify before proceeding.

dcostenco/prism-coder · 48 tokens

add-export

Add a new subpath export to the @cyanheads/mcp-ts-core package. Use when creating a new public API surface that consumers import from a dedicated subpath (e.g., @cyanheads/mcp-ts-core/newutil).

cyanheads/mcp-ts-core · 50 tokens

prism-startup

Activate on the first user turn of every conversation, including greetings. Load Prism context using the user's configured project and quick, standard, or deep depth, then greet the developer by their configured agent name and show the matching recent-session context.

dcostenco/prism-coder · 52 tokens

Verification Planner

Mandates generation of testassertions.json during planning. v7.2.0 enhanced with severity gates (warn/gate/abort), dependency chains, and Claw-as-Validator support.

dcostenco/prism-coder · 44 tokens

bulk-update

Update properties or content across many pages in a Notion database with dry-run and error recovery.

n24q02m/better-notion-mcp · 21 tokens