godot-physics

godot-physics is a skill for Claude Code from gamedev-skills/awesome-gamedev-agent-skills. It costs 104 tokens per session (1,639 once invoked), scanned A, original, Apache-2.0.

A guide to physics in Godot 4.7, the game engine, for objects and collision detection in two- and three-dimensional games. It explains body types, collision layers and masks, overlap detection, forces, and raycasts.

In plain words
What is it for?
Use it to set up floors and walls, simulated objects, player-controlled bodies, trigger areas, hurtboxes, line-of-sight checks, and ground checks.
Why use it?
It helps ensure that game objects collide with the right things and that detection behaves as intended.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the godot plugin — 15 skills shipped together , and of gamedev

Good fit Use it to set up floors and walls, simulated objects, player-controlled bodies, trigger areas, hurtboxes, line-of-sight checks, and ground checks.

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

Made for: Claude Code.

Or install godot, the plugin that ships this one along with the rest of its 15 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 godot-physics

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/gamedev-skills/awesome-gamedev-agent-skills/godot-physics"><img src="https://agentmods.dev/badge/skills/gamedev-skills/awesome-gamedev-agent-skills/godot-physics.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 104 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,639 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
  • Socket pass 8 Aug 2026
  • Snyk pass 8 Aug 2026
  • 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.00104 $0.01639
Opus 5 $0.00052 $0.00820
Sonnet 5 $0.00021 $0.00328
Haiku 4.5 $0.00010 $0.00164

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

Security

Grade A, and why

godot-physics 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 13d 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.

skills/godot/godot-physics/SKILL.md · 139 lines

How it starts

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

Godot Physics (4.x, 2D + 3D)

Pick the right physics body, wire up collision layers/masks, detect overlaps, and cast rays. Concepts apply to both 2D and 3D (swap the 2D/3D suffix). Targets Godot 4.7.

When to use

  • Use when choosing between body types, setting collision layers/masks so the right things collide, detecting overlaps (triggers, hurtboxes) with Area, applying forces/impulses to a RigidBody, or casting rays for line-of-sight/ground checks.

When not to use: kinematic character controllers (move_and_slide) → godot-2d-movement; tile collision setup → godot-tilemap; tuning the feel of physics (timestep, mass, jitter) → physics-tuning.

Core workflow

  1. Choose the body type:
    • StaticBody — never moves (floors, walls). Collides, no simulation.
    • RigidBody — fully simulated (gravity, forces, bouncing). Don't set its position directly; apply forces/impulses or set linear_velocity.
    • CharacterBody — script-driven kinematic (see godot-2d-movement).
    • Area — detects overlaps and can apply gravity/damping; no solid collision. Every body needs a CollisionShape (or CollisionPolygon) child.
  2. Configure layers and masks. A body is on its layers and scans for its masks. Two bodies interact only if one's layer is in the other's mask. Name layers in Project Settings > Layer Names for clarity.
  3. Detect overlaps with Area signals (body_entered, area_entered).
  4. Drive RigidBodies with forces/impulses, or override _integrate_forces for full control.
  5. Cast rays with a RayCast2D/3D node (polled each frame) or a one-shot space-state query from code.

Patterns

1. Collision layers vs masks (set from code)

# Player is on layer 1, scans layers 2 (walls) and 3 (enemies).
func _ready() -> void:
    set_collision_layer_value(1, true)    # I am on layer 1
    set_collision_mask_value(2, true)     # I collide with things on layer 2
    set_collision_mask_value(3, true)     # ...and layer 3
    # Bit-field forms also exist: collision_layer = 1; collision_mask = 0b110

Read the full file on GitHub · 139 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. 13d ago First seen · 139 lines · 104 tokens per session scan A 04babff5594d

Subscribe to this mod's changes

godot-physics is a skill published in the GitHub repository gamedev-skills/awesome-gamedev-agent-skills (952 stars, last pushed 2d ago), licensed Apache-2.0. It adds 104 tokens to every session and 1,639 once invoked, about $0.0005 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.