add-mechanic

add-mechanic is a skill for Claude Code from n24q02m/claude-plugins. It costs 26 tokens per session (1,724 once invoked), scanned A, a copy of add-mechanic, Apache-2.0.

A guide for adding movement, health, inventory, and saving to Godot 4 games using current GDScript syntax.

In plain words
What is it for?
Use it when implementing player movement, platformer controls, health systems, inventories, or save and load features in Godot 4.
Why use it?
It helps avoid code written with Godot 3 syntax, which can fail in Godot 4 projects.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the better-godot-mcp plugin — 3 skills shipped together

Good fit Use it when implementing player movement, platformer controls, health systems, inventories, or save and load features in Godot 4.

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

Made for: Claude Code.

Or install better-godot-mcp, the plugin that ships this one along with the rest of its 3 skills.

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/claude-plugins/add-mechanic/github.svg)](https://agentmods.dev/skills/n24q02m/claude-plugins/add-mechanic)
Your own site
<a href="https://agentmods.dev/skills/n24q02m/claude-plugins/add-mechanic"><img src="https://agentmods.dev/badge/skills/n24q02m/claude-plugins/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/claude-plugins/add-mechanic"><img src="https://agentmods.dev/badge/skills/n24q02m/claude-plugins/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.
Origin 100% 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.00026 $0.01724
Opus 5 $0.00013 $0.00862
Sonnet 5 $0.00005 $0.00345
Haiku 4.5 $0.00003 $0.00172

Measured 10d ago against content hash cdc5d9c0b4f8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, 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 10d 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

100% identical to add-mechanic — 0 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.

plugins/better-godot-mcp/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. 10d 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/claude-plugins (4 stars, last pushed yesterday), 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. It is 100% identical to add-mechanic, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

media-higgsfield-assets

A Higgsfield workflow for creating or processing media beyond ordinary image and video generation. It covers 3D GLB models, rigging and animation, audio, video analysis, upscaling, reframing, outpainting, and background removal.

modu-ai/moai-cowork · 293 tokens

ux-design

Guided, section-by-section UX spec authoring for a screen, flow, or HUD. Reads game concept, player journey, and relevant GDDs to provide context-aware design guidance. Produces ux-spec.md (per screen/flow) or hud-design.md using the studio templates.

Donchitos/Claude-Code-Game-Studios · 61 tokens

architecture-review

Validates completeness and consistency of the project architecture against all GDDs. Builds a traceability matrix mapping every GDD technical requirement to ADRs, identifies coverage gaps, detects cross-ADR conflicts, verifies engine compatibility consistency across all decisions, and produces a PASS/CONCERNS/FAIL…

Donchitos/Claude-Code-Game-Studios · 71 tokens

localize

Full localization pipeline: scan for hardcoded strings, extract and manage string tables, validate translations, generate translator briefings, run cultural/sensitivity review, manage VO localization, test RTL/platform requirements, enforce string freeze, and report coverage.

Donchitos/Claude-Code-Game-Studios · 50 tokens

vertical-slice

Pre-Production validation — build a production-quality end-to-end build to confirm the full game loop is achievable before committing to Production. Run after GDDs, architecture, and UX specs are complete. Produces a PROCEED/PIVOT/KILL verdict that gates the Pre-Production → Production transition.

Donchitos/Claude-Code-Game-Studios · 66 tokens

quick-design

Lightweight design spec for small changes — tuning adjustments, minor mechanics, balance tweaks. Skips full GDD authoring when a system GDD already exists or the change is too small to warrant one. Produces a Quick Design Spec that embeds directly into story files.

Donchitos/Claude-Code-Game-Studios · 57 tokens