bevy-ecs-patterns

bevy-ecs-patterns is a skill for Claude Code, Codex from makifbaysal/tasktrooper. It costs 74 tokens per session (1,868 once invoked), scanned A, original, Apache-2.0.

A guide to writing Bevy game code in Rust using an entity-component-system design, where game objects have data components and systems update them. It focuses on matching the repository's Bevy version and organising schedules, states, resources, and messages.

In plain words
What is it for?
Use it when adding or changing Bevy systems, plugins, queries, resources, schedules, or state handling. It also covers testing systems by updating a small game application with controlled time.
Why use it?
Bevy changes its programming interface between versions, so code remembered from another project may not compile or behave correctly. The patterns also make game systems easier to test and keep simulation timing consistent.

Skill for Claude CodeCodex

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

Good fit Use it when adding or changing Bevy systems, plugins, queries, resources, schedules, or state handling. It also covers testing systems by updating a small game application with controlled time.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/makifbaysal/tasktrooper/bevy-ecs-patterns"><img src="https://agentmods.dev/badge/skills/makifbaysal/tasktrooper/bevy-ecs-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 74 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,868 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.00074 $0.01868
Opus 5.5 $0.00030 $0.00747
Sonnet 5.5 $0.00015 $0.00374
Haiku 4.5 $0.00007 $0.00187

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

Security

Grade A, and why

bevy-ecs-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/bevy-ecs-patterns/SKILL.md · 151 lines

How it starts

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

Bevy ECS Patterns

Overview

Bevy is a code-first Rust engine built on an ECS: entities are IDs, components are plain structs, systems are ordinary functions whose parameters declare the data they touch, and the scheduler runs them in parallel where it can. Bevy also ships a breaking release every few months — the API you remember may not be the API the repository pins.

Core principle: The repository's pinned Bevy minor is the API. Systems are small functions over queries, simulation runs in FixedUpdate, and every system is testable by building an App and calling update().

Version first

# Cargo.toml — for 0.x crates "0.18" already means >=0.18.0, <0.19.0: the minor is pinned
bevy = "0.18"

Read Cargo.lock for the resolved version and that version's migration guide before writing code. Never bump the minor in a feature task. Changes that bite code written from memory:

Since Change
0.15 Time::delta_seconds() → delta_secs(); required components (#[require(...)]) replace most bundles; Single<...> system parameter
0.16 Query::single() / get_single() return Result; systems may return Result and use ?
0.17 Buffered events renamed to messages: #[derive(Message)], MessageWriter::write, MessageReader::read, app.add_message::<T>(); observers use On<T> for entity events

Plugins, components, systems

use bevy::prelude::*;

#[derive(Component, Default)]
#[require(Transform, Velocity)]
pub struct Player;

#[derive(Component, Default, Deref, DerefMut)]
pub struct Velocity(pub Vec2);

#[derive(Resource)]
pub struct MoveTuning { pub speed: f32 }

#[derive(Message)]
pub struct PlayerHit { pub damage: u32 }

pub struct MovementPlugin;

impl Plugin for MovementPlugin {
    fn build(&self, app: &mut App) {
        app.insert_resource(MoveTuning { speed: 220.0 })
            .insert_resource(Time::<Fixed>::from_hz(60.0))
            .add_message::<PlayerHit>()
            .add_systems(Update, read_input.run_if(in_state(GameState::Playing)))
            .add_systems(FixedUpdate, (apply_velocity, resolve_hits).chain());
    }
}

fn read_input(keys: Res<ButtonInput<KeyCode>>, tuning: Res<MoveTuning>, mut player: Single<&mut Velocity, With<Player>>) {
    let x = keys.pressed(KeyCode::KeyD) as i8 as f32 - keys.pressed(KeyCode::KeyA) as i8 as f32;
    player.0 = Vec2::new(x * tuning.speed, player.0.y);
}

fn apply_velocity(time: Res<Time>, mut q: Query<(&mut Transform, &Velocity)>) {
    for (mut t, v) in &mut q {
        t.translation += (v.0 * time.delta_secs()).extend(0.0);   // in FixedUpdate, Time is the fixed clock
    }
}

Read the full file on GitHub · 151 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 · 151 lines · 74 tokens per session scan A c2184dc262b8

Subscribe to this mod's changes

bevy-ecs-patterns is a skill published in the GitHub repository makifbaysal/tasktrooper (113 stars, last pushed yesterday), licensed Apache-2.0. It adds 74 tokens to every session and 1,868 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.