What problem does it solve? Rust event loops, tick loops, and handler registries often fail to compile when every handler needs &mut access to one shared state, producing errors like E0499, E0502, E0207, and E0119, or runtime panics from Rc<RefCell<_>> and ECS access conflicts. This Skill provides triage tables, structural patterns, and verified fixes for designing or reviewing such loops. ## Core Features & Use Cases - Structure selection: Pick the right architecture from a decision table, from a simple Vec<Box<dyn Handler>> plus separate State, to generic Handler<S> traits with capability bounds, to an ECS-shaped dynamic world. - Diagnostic triage: Map compiler errors (E0499, E0502, E0207, E0119) and runtime panics (RefCell already borrowed, ECS B0001 conflicts) directly to their causes and repairs. - Suspendable routines: Implement coroutine-style routines over shared state with a resume(&mut self, &mut State) trait instead of async fn(&mut State), which cannot work. - Use Case: A game loop stores its handler collection inside the game state and fails with E0499 on dispatch. Use this Skill to move the collection out, drain the event queue by value, and replace handler-held borrows with generational keys. ## Quick Start Ask the agent to review your Rust event loop that fails with E0499 when handlers mutate shared state and apply the recommended ownership structure.