← 返回 Skills 市场
rohitg00

iii-reactive-backend

作者 Rohit Ghumare · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
83
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install iii-reactive-backend
功能描述
Builds reactive real-time backends on the iii engine. Use when building event-driven apps where state changes automatically trigger side effects, clients rec...
使用说明 (SKILL.md)

Reactive Backend

Comparable to: Convex, Firebase, Supabase, Appwrite

Key Concepts

Use the concepts below when they fit the task. Not every reactive backend needs every trigger or realtime surface shown here.

  • State is the "database" — CRUD via state::set, state::get, state::update, state::delete, state::list
  • State triggers fire automatically when any value in a scope changes
  • Side effects (notifications, metrics, stream pushes) are wired reactively, not imperatively
  • Streams deliver real-time updates to connected clients

Architecture

HTTP 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'

iii Primitives Used

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

Reference Implementation

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.

Common Patterns

Code using this pattern commonly includes, when relevant:

  • registerWorker(url, { workerName }) — worker initialization
  • trigger state::set, state::get — CRUD via state module
  • registerTrigger({ type: 'state', function_id, config: { scope } }) — reactive side effects on state change
  • Event argument destructuring in reactive handlers: async (event) => { const { new_value, old_value, key } = event }
  • trigger({ function_id: 'stream::send', payload, action: TriggerAction.Void() }) — push live updates to clients
  • const logger = new Logger() — structured logging inside handlers

Adapting This Pattern

Use the adaptations below when they apply to the task.

  • State triggers fire on any change in the scope — use the event argument (new_value, old_value, key) to determine what changed
  • Multiple functions can react to the same scope independently (on-change and update-metrics both watch todos)
  • Stream clients connect via ws://host:port/stream/{stream_name}/{group_id}
  • Keep reactive functions fast — offload heavy work to queues if needed

Pattern Boundaries

  • If the request focuses on registering external/legacy HTTP endpoints via registerFunction (especially with endpoint lists like { path, id } plus iteration), prefer iii-http-invoked-functions.
  • Stay with iii-reactive-backend when state scopes, state triggers, and live stream updates are the core requirement.

When to Use

  • Use this skill when the task is primarily about iii-reactive-backend in the iii engine.
  • Triggers when the request directly asks for this pattern or an equivalent implementation.

Boundaries

  • Never use this skill as a generic fallback for unrelated tasks.
  • You must not apply this skill when a more specific iii skill is a better fit.
  • Always verify environment and safety constraints before applying examples from this skill.
安全使用建议
This is a documentation-style, instruction-only skill that appears coherent with its stated purpose. Before installing/use: (1) confirm your agent runtime actually implements the iii primitives referenced (registerWorker, registerTrigger, state::set, stream::send) — otherwise the examples won't run; (2) note the SKILL.md points to a ../references/reactive-backend.js example that isn't bundled — ensure the agent won't try to load arbitrary filesystem paths or fetch external code without explicit approval; (3) review any example code you paste/run from this pattern for network endpoints, logging, or side-effecting operations before execution; and (4) avoid supplying unrelated secrets — this skill does not require them.
功能分析
Type: OpenClaw Skill Name: iii-reactive-backend Version: 1.0.0 The skill bundle provides documentation and architectural patterns for building reactive backends using the 'iii engine'. The instructions in SKILL.md focus on legitimate development tasks such as state management, real-time triggers, and stream updates, with no evidence of malicious intent, data exfiltration, or harmful command execution.
能力评估
Purpose & Capability
Name/description describe a reactive backend pattern and the SKILL.md contains only primitives and patterns (registerWorker, registerTrigger, state::set, stream::send) that are coherent with that purpose. Nothing in the metadata asks for unrelated credentials, binaries, or system access.
Instruction Scope
Instructions are narrowly scoped to implementing reactive state, triggers, and streams on the iii engine. They do reference a relative example file ('../references/reactive-backend.js') that is not bundled; this is a documentation reference rather than an explicit runtime requirement, but you should confirm the agent/runtime will not attempt to read arbitrary filesystem paths to fetch it.
Install Mechanism
No install spec and no code files — instruction-only. This minimizes risk since nothing is downloaded or written to disk by the skill itself.
Credentials
The skill declares no required environment variables, credentials, or config paths. The documented primitives are consistent with an engine-embedded runtime and do not imply unnecessary external secrets.
Persistence & Privilege
always is false and the skill is user-invocable; it doesn't request permanent presence or elevated privileges or propose modifying other skills or system-wide settings.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install iii-reactive-backend
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /iii-reactive-backend 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of iii-reactive-backend. - Enables building reactive, real-time backends on the iii engine. - Supports state triggers, automatic side effects, and real-time client updates via streams or websockets. - Provides CRUD endpoints through the state module and REST. - Includes clear boundaries and adaptation guidelines for using this pattern. - Reference implementation demonstrates a real-time todo app with live updating and aggregate metrics.
元数据
Slug iii-reactive-backend
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

iii-reactive-backend 是什么?

Builds reactive real-time backends on the iii engine. Use when building event-driven apps where state changes automatically trigger side effects, clients rec... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 83 次。

如何安装 iii-reactive-backend?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install iii-reactive-backend」即可一键安装,无需额外配置。

iii-reactive-backend 是免费的吗?

是的,iii-reactive-backend 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

iii-reactive-backend 支持哪些平台?

iii-reactive-backend 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 iii-reactive-backend?

由 Rohit Ghumare(@rohitg00)开发并维护,当前版本 v1.0.0。

💬 留言讨论