Builds reactive real-time backends on the iii engine. Use when building event-driven apps where state changes automatically trigger side effects, clients receive live updates via streams or websockets, or you need a real-time database layer with pub/sub and CRUD endpoints.
83
78%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Passed
No known issues
Optimize this skill with Tessl
npx tessl skill review --optimize ./skills/iii-reactive-backend/SKILL.mdComparable to: Convex, Firebase, Supabase, Appwrite
Use the concepts below when they fit the task. Not every reactive backend needs every trigger or realtime surface shown here.
state::set, state::get, state::update, state::delete, state::listHTTP CRUD endpoints
→ `state::set`, `state::update`, `state::delete` (writes to 'todos' scope)
↓ (automatic state triggers)
→ on-change → stream::send (push to clients)
→ update-metrics → state::update (aggregate counters)
HTTP GET /metrics → reads from 'todo-metrics' scope
WebSocket clients ← stream 'todos-live'| Primitive | Purpose |
|---|---|
registerWorker | Initialize the worker and connect to iii |
registerFunction | CRUD handlers and reactive side effects |
trigger({ function_id: 'state::...', payload }) | Database layer |
registerTrigger({ type: 'state', config: { scope } }) | React to any change in a scope |
trigger({ ..., action: TriggerAction.Void() }) | Fire-and-forget stream push to clients |
registerTrigger({ type: 'http' }) | REST endpoints |
See ../references/reactive-backend.js for the full working example — a real-time todo app with CRUD endpoints, automatic change broadcasting via streams, and reactive aggregate metrics.
Code using this pattern commonly includes, when relevant:
registerWorker(url, { workerName }) — worker initializationstate::set, state::get — CRUD via state moduleregisterTrigger({ type: 'state', function_id, config: { scope } }) — reactive side effects on state changeasync (event) => { const { new_value, old_value, key } = event }trigger({ function_id: 'stream::send', payload, action: TriggerAction.Void() }) — push live updates to clientsconst logger = new Logger() — structured logging inside handlersUse the adaptations below when they apply to the task.
event argument (new_value, old_value, key) to determine what changedtodos)ws://host:port/stream/{stream_name}/{group_id}registerFunction (especially with endpoint lists like { path, id } plus iteration), prefer iii-http-invoked-functions.iii-reactive-backend when state scopes, state triggers, and live stream updates are the core requirement.iii-reactive-backend in the iii engine.8921efa
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.