agentleFS
chrisgliddonchrisgliddon/bevy-skills/skills/bevy/SKILL.md

bevy

Skill29 starsChanged 11 days agoMITView on GitHub

Use when starting any Bevy task, choosing between Update and FixedUpdate, picking Cargo feature flags, or recalling which sibling skill covers ECS, assets, rendering, UI, or migration. Routes to the right Bevy 0.20 skill and pins the engine version for downstream snippets.

3 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read this first when working on a Bevy project: All sibling skills assume Bevy 0.20 (0.20.0 released 2026-10-08.

    line 14
  2. Very specific:

    No .unwrap() in systems: Use let ... else { return }.

    line 79

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Bevy 0.20 — Router

Read this first when working on a Bevy project. All sibling skills assume Bevy 0.20 (0.20.0 released 2026-10-08; current patch 0.20.1, requires rustc 1.97.1). If the user's Cargo.toml pins a different version, stop and confirm before applying patterns from this collection.

Smallest valid app

use bevy::prelude::*;

fn main() {
    App::new()
        .add_plugins(DefaultPlugins)
        .add_systems(Startup, setup)
        .run();
}

fn setup(mut commands: Commands) {
    commands.spawn(Camera3d::default());
}

When to use which skill

TaskSkill
App / Plugin / Schedule basics, Update vs FixedUpdate, exclusive systems (&mut World anywhere in 0.20)bevy-core-concepts
#[derive(Component)], #[require(...)], observers (On<E>, On<Add<T>>), hooks (on_add/on_discard), storagebevy-ecs-components
Query, With/Without/Or, Changed/Added, par_iter, iter_many(..).matched(), query lensesbevy-ecs-queries
SystemParam, SystemSet, .run_if, ordering, .chain_weak(), remove_systems_in_setbevy-ecs-systems
Cargo.toml features: 2d/3d/ui, *_api, bevy_curve, compressed_image_saver*, WASM trimbevy-cargo-features
Upgrading from 0.19 — On<Add<T>>, PointerClick, Hovered/Pressed, WESL, set_if_differentbevy-migration-0-19-to-0-20
Upgrading from 0.18 — FontSource/FontSize, bevy_world_serialization, resources-as-componentsbevy-migration-0-18-to-0-19
Upgrading from 0.17 — MessageReader, On, RenderTarget, GlobalAmbientLightbevy-migration-0-17-to-0-18
AssetServer, Handle<T>, load_builder, hot-reload, WorldAssetRoot for glTF scenesbevy-assets
Writing an AssetLoader (Reader::seekable is required)bevy-custom-assets
WASM build pipeline, WebGPU vs WebGL2bevy-wasm-webgpu
Camera3d, Projection, RenderTarget component, Tonemapping::Linear, ScreenSpaceTransmission, FreeCamera, PanCamerabevy-cameras
StandardMaterial, MaterialPlugin<M>, AsBindGroup, WESL custom shaders, lighting, atmospherebevy-pbr-materials
GPU particles (bevy_hanabi), Gaussian splats, flipbooks, custom VFX materialsbevy-vfx
AnimationPlayer, AnimationGraph, AnimationTransitions, AnimationMask, AnimationEvent, easing curvesbevy-animation
Recording a camera to MP4 or PNG sequences (bevy_capture)bevy-capture
Voxel meshing with block-mesh-rs, chunk pipeline, greedy quadsbevy-voxel-pipeline
RON block definitions, palette, KTX2 atlas bakingbevy-voxel-data
Rebindable actions, entity Gamepads, hot-plug, deadzones, Steam Deck, input into FixedUpdatebevy-input-actions
AudioPlayer, PlaybackSettings, AudioSink, spatial listeners, mix groups, browser unlockbevy-audio
Rapier bodies, colliders, fixed-step ordering, events, scene queries, joints, determinismbevy-physics
Built-in vs external/headless rendering, forward vs deferred, render systemsbevy-rendering
DiagnosticPath, DiagnosticsStore, info_span!, RenderDiagnosticsPlugin, CPU/GPU timingsbevy-diagnostics-profiling
Stable IDs, versioned save DTOs, atomic native/browser writes, snapshotsbevy-save-load
Deterministic App::update stepping, TimeUpdateStrategy, MessageCursor, headless testsbevy-testing
Screen readers, adaptive controllers, remapping, captions, contrast, motion safetybevy-a11y
Voxel edit → remesh runtime: dirty/halo fan-out, revision tokens, bounded uploadsbevy-voxel-runtime
es-fluent-manager-bevy i18n — FluentText<T>, BevyFluentText, LocaleChangeEvent, i18n.tomlbevy-fluent
Node, ui_widgets::Button + Hovered/Pressed, children![], TextFont/FontSize, Val::Em, Node::border_radius, InputFocusbevy-ui
Porting from Unity, Unreal, Godot, Phaser, Flash, Defold, Roblox, GameMakerbevy-porting
Detecting copy-paste / near-duplicate Rust code before committing (similarity-rs --cross-file)similarity-rs

Cardinal rules (every Bevy 0.20 task)

  1. Events are messages. EventReader<E> / EventWriter<E> became MessageReader<M> / MessageWriter<M> in 0.17. Observers use On<E>, never Trigger<E>.
  2. Lifecycle observers carry the bundle on the event. On<Add<Player>>, not On<Add, Player> (changed in 0.20). Replace became Discard in 0.19.
  3. Pointer events are flat. On<PointerClick>, click.pointer.position; not On<Pointer<Click>> (0.20).
  4. UI interaction is Hovered + Pressed. ui::Interaction and ui::widgets::Button are deprecated in 0.20; spawn ui_widgets::Button.
  5. Text is FontSource + FontSize. TextFont { font: handle.into(), font_size: FontSize::Px(24.0) } (0.19). Default size is FontSize::Rem(1.) (0.20).
  6. Shaders are WESL. .wesl, import a::b;, @if(DEF). naga_oil #import / #ifdef fail at asset load in 0.20.
  7. Resources are components (0.19). Res<T> still works, but one type cannot be both Component and Resource.
  8. Scenes: glTF spawns with WorldAssetRoot from bevy_world_serialization; bevy_scene is BSN (0.19).
  9. No .unwrap() in systems. Use let ... else { return }; or a real error path.
  10. Schedule order is explicit. Ambiguities are ignored by default (ScheduleBuildSettings::ambiguity_detection is LogLevel::Ignore); opt into LogLevel::Error to catch them. Built-in sets use .chain_weak() in 0.20, so cross-set ordering through channels or atomics needs an explicit .after().

Gotchas

  • Bevy's training-data footprint is dominated by 0.10–0.16 code. If a snippet feels obvious, check it against the three migration skills before trusting it.
  • bevy::prelude::* doesn't re-export everything. Hovered is bevy::picking::hover::Hovered; Pressed is the marker bevy::ui::Pressed (query with Has<Pressed>); Tonemapping is bevy::core_pipeline::tonemapping::Tonemapping; ScreenSpaceTransmission is bevy::pbr::ScreenSpaceTransmission.
  • The bevy crate re-exports many subcrates (bevy_camera, bevy_light, bevy_material, bevy_extract, bevy_curve, bevy_shape, bevy_world_serialization, bevy_ui_widgets, bevy_feathers). Subcrate APIs are stable points to depend on for plugins.
  • Deprecations (Interaction, set_if_neq, AssetId::invalid()) compile with warnings in 0.20 and will be removed later. Fix them now.

See also

  • bevy-migration-0-19-to-0-20 — the latest catalogue of renames and breaks.
  • bevy-cargo-features — what to put in Cargo.toml before any of the above will compile the way you want.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.