Agent skill · software engineering · sickn33
bevy-ecs-expert
Master Bevy's Entity Component System (ECS) in Rust, covering Systems, Queries, Resources, and parallel scheduling.
Why this skill is useful
Provides specific patterns and best practices for optimizing game logic in Bevy's ECS architecture that the AI wouldn't reliably generate on its own.
What it needs
Requires rust installed locally. About 2k tokens when loaded. Last updated 2026-08-07. 44,571 stars on the source repository.
What this skill does
Bevy ECS Expert Overview A guide to building high-performance game logic using Bevy's data-oriented ECS architecture. Learn how to structure systems, optimize queries, manage resources, and leverage parallel execution. When to Use This Skill Use when developing games with the Bevy engine in Rust. Use when designing game systems that need to run in parallel. Use when optimizing game performance by minimizing cache misses. Use when refactoring object-oriented logic into data-oriented ECS patterns. Step-by-Step Guide 1. Defining Components Use simple structs for data. Import bevy::prelude::; add Reflect only when reflection/inspection is needed. The snippets are alternatives and do not duplicate Player/Velocity definitions in one scope. 2. Writing Systems Systems are regular Rust functions that query components. 3. Managing Resources Use Resource for global data (score, game state). The toy scoresystem increments each Update; use gameplay events or an explicit timer for meaningful scoring, rather than implying frame-rate-independent score behavior. 4. Scheduling Systems Add systems to the App builder, defining execution order if needed. Examples Example 1: Spawning Entities with Require Component Example 2: Query Filters Use With and Without to filter entities efficiently. Best Practices ✅ Do: Use Query filters (With, Without, Changed) to reduce iteration count. ✅ Do: Prefer Res over ResMut when read-only access is sufficient to allow parallel execution. ✅ Do: Use Bundle to spawn complex entities atomically. ❌ Don't: Store heavy logic inside Components; keep them as pure data. ❌ Don't: Use RefCell or interior mutability inside components; prefer normal ECS borrowing; any interior-mutability design still needs valid Send/Sync and a clear synchronization reason. Troubleshooting Problem: System panic with "Conflict" error. Solution: The scheduler normally orders conflicting systems. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills sickn33/bevy-ecs-expert