bevy-physics

bevy-physics is a skill for Claude Code from chrisgliddon/bevy-skills. It costs 59 tokens per session (1,654 once invoked), scanned A, original, MIT.

A guide to adding Rapier physics to Bevy 0.19 games. Rapier handles bodies, collisions, joints, sensors, and character movement; Bevy itself does not include a physics engine.

In plain words
What is it for?
It supports rigid bodies, colliders, collision events, ray and overlap queries, character controllers, fixed-step simulation, interpolation, and physics tests.
Why use it?
It helps choose and configure a physics engine correctly, so gameplay systems run at the right time and objects do not move or collide unpredictably.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions OpenCode.

Part of the bevy-skills plugin — 31 skills shipped together

Good fit It supports rigid bodies, colliders, collision events, ray and overlap queries, character controllers, fixed-step simulation, interpolation, and physics tests.

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

Made for: Claude Code.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/chrisgliddon/bevy-skills/bevy-physics"><img src="https://agentmods.dev/badge/skills/chrisgliddon/bevy-skills/bevy-physics.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 59 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,654 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.00059 $0.01654
Opus 5 $0.00030 $0.00827
Sonnet 5 $0.00012 $0.00331
Haiku 4.5 $0.00006 $0.00165

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

Security

Grade A, and why

bevy-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 9d 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/bevy-physics/SKILL.md · 159 lines

How it starts

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

Bevy 0.19 — physics with Rapier

When to use this skill

  • Add 2D/3D rigid bodies, colliders, sensors, joints, or character movement.
  • Decide between bevy_rapier and an alternative such as Avian.
  • Place input/gameplay systems around a physics step without transform jitter.
  • Read collision messages or perform ray, shape, point, and overlap queries.
  • Configure headless physics, interpolation, CCD, collision groups, or tests.

Bevy core does not include a physics engine. For Bevy 0.19, use bevy_rapier2d/bevy_rapier3d 0.36 for the mature Rapier integration. Consider avian2d/avian3d 0.7 when its ECS-native architecture or modular solver is the specific reason to choose it. Do not install both engines on the same simulated entities.

Canonical fixed-step Rapier 3D pattern

[dependencies]
bevy = "0.19"
bevy_rapier3d = "0.36"
use bevy::prelude::*;
use bevy_rapier3d::prelude::*;

const PHYSICS_HZ: f64 = 60.0;
const PHYSICS_DT: f32 = 1.0 / PHYSICS_HZ as f32;

#[derive(Component)]
struct Player;

#[derive(SystemSet, Debug, Clone, Copy, PartialEq, Eq, Hash)]
enum GamePhysics {
    Drive,
    React,
}

fn main() {
    let mut app = App::new();
    app.add_plugins(DefaultPlugins)
        .insert_resource(Time::<Fixed>::from_hz(PHYSICS_HZ))
        .insert_resource(TimestepMode::Fixed {
            dt: PHYSICS_DT,
            substeps: 1,
        })
        .add_plugins((
            RapierPhysicsPlugin::<NoUserData>::default().in_fixed_schedule(),
            RapierDebugRenderPlugin::default(),
        ))
        .configure_sets(
            FixedUpdate,
            (
                GamePhysics::Drive.before(PhysicsSet::SyncBackend),
                GamePhysics::React.after(PhysicsSet::Writeback),
            ),
        )
        .add_systems(Startup, setup)
        .add_systems(FixedUpdate, drive_player.in_set(GamePhysics::Drive))
        .add_systems(FixedUpdate, react_to_collisions.in_set(GamePhysics::React));
    app.run();
}

fn setup(mut commands: Commands) {
    commands.spawn((
        Camera3d::default(),
        Transform::from_xyz(8.0, 6.0, 12.0).looking_at(Vec3::ZERO, Vec3::Y),
    ));

    // A collider without RigidBody is fixed. Cuboid arguments are half-extents.
    commands.spawn((
        Name::new("Ground"),
        Collider::cuboid(8.0, 0.25, 8.0),
        Transform::from_xyz(0.0, -0.25, 0.0),
    ));

    commands.spawn((
        Name::new("Player"),
        Player,
        RigidBody::Dynamic,
        Collider::ball(0.5),
        Velocity::linear(Vec3::new(1.5, 0.0, 0.0)),
        ActiveEvents::COLLISION_EVENTS,
        Transform::from_xyz(0.0, 4.0, 0.0),
    ));
}

fn drive_player(mut bodies: Query<&mut Velocity, With<Player>>) {
    for mut velocity in &mut bodies {
        velocity.linear.x = 1.5;
    }
}

fn react_to_collisions(mut events: MessageReader<CollisionEvent>) {
    for event in events.read() {
        if let CollisionEvent::Started(a, b, _) = event {
            let _pair = (*a, *b);
        }
    }
}

Read the full file on GitHub · 159 lines

Files

What ships with it

5 files 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. 9d ago First seen · 159 lines · 59 tokens per session scan A 740ccc60d8c6

Subscribe to this mod's changes

bevy-physics is a skill published in the GitHub repository chrisgliddon/bevy-skills (11 stars, last pushed 15d ago), licensed MIT. It adds 59 tokens to every session and 1,654 once invoked, about $0.0003 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-31.