New advertisers: 50% off your first month with code FIRSTMONTHSee slots

Bevy skills that cover ECS architecture, rendering, input, assets, and advanced query and scheduling patterns.

version
1.4.2
GitHub stars
60
View on GitHub

What it does

  • Adds 2 skills, bevy-game-engine for core ECS, rendering, input, and assets and bevy-ecs-patterns for advanced ECS work
  • Covers entities, components, and systems plus 2D and 3D rendering, keyboard, mouse, and gamepad input, and asset loading
  • Includes change detection with Changed<T> and Added<T>, system ordering and run conditions, and fixed timestep logic
  • Designed for developers building Bevy games in Rust who need help with performance tuning and game architecture

Bevy game engine development - ECS, rendering, game architecture

Add marketplace

/plugin marketplace add laurigates/claude-plugins

Run it inside Claude Code once, then install the plugin below.

Install

/plugin install bevy-plugin@laurigates-claude-plugins

Run it inside Claude Code after adding the marketplace.

Files

Discovered from source

Bevy ECS Patterns

Advanced patterns and techniques for Bevy's Entity Component System, focusing on performance, maintainability, and complex game architectures.

When to Use This Skill

Use this skill when...Use bevy-game-engine instead when...
Optimizing ECS query performanceSetting up a new Bevy project from scratch
Implementing complex entity relationships or hierarchiesLearning basic ECS concepts (components, systems, resources)
Designing system scheduling and orderingHandling input, assets, or game states
Using change detection (Changed<T>, Added<T>)Writing basic game logic or app structure
Working with ParamSet, parallel iteration, or batch operationsConfiguring rendering, UI, or audio
Debugging archetype fragmentation or storage strategiesAdding plugins or common Bevy dependencies

Core Expertise

Advanced Queries

  • Complex query filters and combinations
  • Query state and caching
  • Entity relationships and hierarchies
  • Parallel iteration strategies

System Scheduling

  • System ordering and dependencies
  • Run conditions and gating
  • System sets and scheduling
  • Fixed timestep systems

Change Detection

  • Changed<T> and Added<T> filters
  • Ref<T> for change tracking
  • Efficient reactive systems

Advanced Query Patterns

Query Filters

use bevy::prelude::*;

// Multiple filters
fn targeting_system(
    query: Query<
        (&Transform, &mut Target),
        (With<Enemy>, Without<Dead>, Changed<Health>)
    >,
) {
    for (transform, mut target) in &query {
        // Only enemies that are alive and recently damaged
    }
}

// Optional components
fn flexible_system(
    query: Query<(&Transform, Option<&Velocity>, Option<&Acceleration>)>,
) {
    for (transform, velocity, acceleration) in &query {
        if let Some(vel) = velocity {
            // Has velocity
        }
    }
}

// Or filters
fn pickup_system(
    query: Query<Entity, Or<(With<HealthPickup>, With<AmmoPickup>)>>,
) {
    for entity in &query {
        // Process any pickup type
    }
}

Multiple Queries with Conflicts

// Use ParamSet when queries have conflicting access
fn combat_system(
    mut param_set: ParamSet<(
        Query<&mut Health, With<Player>>,
        Query<&mut Health, With<Enemy>>,
    )>,
) {
    // Access one query at a time
    for mut health in param_set.p0().iter_mut() {
        health.0 += 1.0; // Heal player
    }

    for mut health in param_set.p1().iter_mut() {
        health.0 -= 10.0; // Damage enemies
    }
}

// Query transmutation for flexible access
fn dynamic_query(
    all_entities: Query<(Entity, &Transform)>,
    players: Query<&Player>,
) {
    for (entity, transform) in &all_entities {
        if players.get(entity).is_ok() {
            // This is a player
        }
    }
}

Entity Relationships

// Parent-child hierarchies
#[derive(Component)]
struct Inventory;

#[derive(Component)]
struct InventorySlot(usize);

fn spawn_inventory(mut commands: Commands) {
    commands.spawn((Inventory, SpatialBundle::default()))
        .with_children(|parent| {
            for i in 0..10 {
                parent.spawn((InventorySlot(i), SpriteBundle::default()));
            }
        });
}

// Query parent from child
fn child_system(
    children: Query<(&InventorySlot, &Parent)>,
    parents: Query<&Inventory>,
) {
    for (slot, parent) in &children {
        if let Ok(inventory) = parents.get(parent.get()) {
            // Access parent inventory
        }
    }
}

// Query children from parent
fn parent_system(
    parents: Query<&Children, With<Inventory>>,
    slots: Query<&InventorySlot>,
) {
    for children in &parents {
        for &child in children.iter() {
            if let Ok(slot) = slots.get(child) {
                // Access child slot
            }
        }
    }
}

Agentic Optimizations

ContextCommand
Quick compile checkcargo check 2>&1 | head -30
Fast test runcargo test --lib -- --test-threads=1 -q
Check ECS usage errorscargo clippy -- -W clippy::all 2>&1 | head -50
List components in projectgrep -rn "derive(Component)" src/ --include="*.rs"
List systems in projectgrep -rn "fn.*Query<" src/ --include="*.rs"
Find system orderinggrep -rn "\.add_systems|\.chain()|\.after(|\.before(" src/ --include="*.rs"
Check for ParamSet usagegrep -rn "ParamSet" src/ --include="*.rs"

For system scheduling, change detection, performance patterns, custom entity commands, and design best practices, see REFERENCE.md.

Readme

Bevy Plugin

Comprehensive Bevy game engine development support including ECS architecture, rendering, input handling, asset management, and advanced game architecture patterns.

Overview

This plugin provides expert guidance for developing games with Bevy, the data-driven game engine built in Rust. It covers both fundamental Bevy concepts and advanced ECS patterns for building performant, maintainable games.

Skills

bevy-game-engine

Core Bevy development expertise including:

  • ECS Architecture: Entity-Component-System fundamentals, entities, components, systems
  • Plugin System: Modular game organization with reusable plugins
  • Rendering: 2D/3D rendering, sprites, meshes, materials, lighting, cameras, shaders
  • Input Handling: Keyboard, mouse, gamepad input processing
  • Asset Management: Loading and managing sprites, fonts, sounds, textures
  • Game States: State management, transitions, and conditional systems
  • Events: Typed message passing between systems
  • Resources: Global singleton data accessible to systems
  • Project setup: Scaffolding from the official Bevy templates via cargo generate (see rust-plugin's cargo-generate skill), or from an empty crate with cargo new

Use when: Building games with Bevy, working with entities/components/systems, implementing game features, or when the user mentions Bevy, game development in Rust, or 2D/3D games.

SKILL.md carries the ECS core, app structure, and the command set; the detail is split across references/ so a run loads only the material its path needs (input.md, assets-and-states.md, events.md, project-architecture.md). The pointer table in SKILL.md names each one.

bevy-ecs-patterns

Advanced ECS patterns and techniques:

  • Advanced Queries: Complex filters, combinations, query state, entity relationships
  • System Scheduling: Ordering, dependencies, run conditions, system sets
  • Change Detection: Reactive systems with Changed<T>, Added<T>, and Ref<T>
  • Performance Optimization: Parallel iteration, query caching, component storage hints
  • Entity Hierarchies: Parent-child relationships, query patterns
  • Fixed Timestep: Physics and deterministic game logic
  • Batch Operations: Efficient entity spawning and updates

Use when: Working on advanced Bevy game architecture, optimizing ECS performance, implementing complex game systems, or debugging performance issues.

When to Use This Plugin

Enable this plugin when:

  • Developing games with Bevy
  • Working with Entity-Component-System architecture
  • Implementing game features (movement, collision, AI, etc.)
  • Optimizing game performance
  • Designing game architecture and systems
  • Integrating Bevy plugins and third-party crates
  • Working with 2D or 3D rendering in Bevy
  • Building game prototypes or production games in Rust

Key Features

  • Data-Driven Design: Leverage Bevy's ECS for clean separation of data and logic
  • Performance Focused: Best practices for high-performance game loops
  • Modular Architecture: Plugin-based organization for reusable game systems
  • Type Safety: Rust's type system for catching bugs at compile time
  • Modern Rendering: PBR, custom shaders, 2D/3D rendering pipelines
  • Ergonomic API: Bevy's builder patterns and query system

Common Patterns

Basic Game Structure

use bevy::prelude::*;

fn main() {
    App::new()
        .add_plugins(DefaultPlugins)
        .add_plugins(GamePlugin)
        .run();
}

struct GamePlugin;

impl Plugin for GamePlugin {
    fn build(&self, app: &mut App) {
        app.add_systems(Startup, setup)
           .add_systems(Update, (player_movement, enemy_ai));
    }
}

ECS Query Pattern

fn movement_system(
    time: Res<Time>,
    mut query: Query<(&Velocity, &mut Transform), With<Player>>,
) {
    for (velocity, mut transform) in &mut query {
        transform.translation += velocity.0.extend(0.0) * time.delta_seconds();
    }
}

Event-Driven Communication

#[derive(Event)]
struct CollisionEvent(Entity, Entity);

fn detect_collisions(mut events: EventWriter<CollisionEvent>) {
    // Detection logic
    events.send(CollisionEvent(entity_a, entity_b));
}

fn handle_collisions(mut events: EventReader<CollisionEvent>) {
    for event in events.read() {
        // Handle collision
    }
}

Related Skills

  • rust-plugin: General Rust development patterns and best practices
  • testing-plugin: Testing strategies for Bevy games

Resources

Details

Marketplace
laurigates/claude-plugins
Source
bevy-plugin
Author
Lauri Gates
Category
Gamedev
License
MIT
Keywords
bevy, game-engine, ecs, rust, gamedev
Listed since
Apr 7, 2026

More from laurigates/claude-plugins

All 52

Similar to bevy-plugin

More Game Development