rust-bevy-state-flow
Installation
SKILL.md
Rust Bevy State Flow
Use this skill to make Bevy states explicit and reusable. State flow should describe when systems run, what is created on entry, and what is cleaned up on exit.
Core Workflow
- Name the user-visible game phases before adding systems.
- Represent phases with an
AppStateor feature-specific state enum. - Put setup in
OnEnter, cleanup inOnExit, and gameplay in state-filtered update schedules. - Mark state-owned entities with cleanup components.
- Keep transitions event-driven or command-driven, not hidden in rendering systems.
- Test repeated transitions to catch duplicate entities and stale resources.