iii-state-reactions
Originally fromiii-hq/skills
Installation
SKILL.md
State Reactions
Comparable to: Firebase onSnapshot, Convex mutations
Key Concepts
Use the concepts below when they fit the task. Not every state reaction needs all of them.
- A state trigger fires whenever a value changes within a watched scope
- The handler receives
{ new_value, old_value, key, event_type }describing the change - condition_function_id gates execution — the reaction only fires if the condition returns truthy
- Multiple reactions can independently watch the same scope
- Reactions fire on
state::set,state::update, andstate::deleteoperations
Architecture
state::set, state::update, or state::delete
→ iii-state emits change event
→ registerTrigger type:'state' (scope match)
Related skills