About rust-bevy-state-flow
A skill for structuring Bevy game states so setup, gameplay, and cleanup are explicit. It guides Rust game developers through reusable state flows and transition testing.
Key features
- 01Define user-visible game phases
- 02Set up systems on state entry
- 03Clean up state-owned entities on exit
- 04Filter gameplay systems by state
- 05Test repeated state transitions
Use cases
- 01Add menu, pause, loading, or game-over states
- 02Review state-scoped systems in Bevy plugins
- 03Find duplicate entities or stale resources after transitions
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ lvtd-llc/ skills --skill rust-bevy-state-flowAfter installing, type/rust-bevy-state-flowin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
guidelines.mdagents/openai.yamlreferences/state-flow-patterns.mdworkflows/add-state-flow.mdDetails
From the project READMERust 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.
Read Next
| Task | Load |
|---|---|
| Add a menu, pause, loading, or game-over state | guidelines.md, workflows/add-state-flow.md |
| Review Bevy plugins and state-scoped systems | references/state-flow-patterns.md |
| Debug transition leaks | guidelines.md, references/state-flow-patterns.md |
Source Notes
Guidance is transformed and paraphrased from Herbert Wolverson, Advanced Hands-On Rust, especially Chapter 5 on reusable game state management. Examples are original skeletons adapted for modern Bevy patterns.
Comments
Markdown supported