ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified

creationix-rx-data-store

Expert skill for using RX, an embedded data store for JSON-shaped data with random-access reads, no-parse lookups, and a text-safe binary encoding format.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/adisinghstudent/creationix-rx-data-store
Or

RX Data Store

Skill by ara.so — Daily 2026 Skills collection.

RX is an embedded data store for JSON-shaped data. Encode once, then query the encoded document in place — no parsing, no object graph, no GC pressure. Think of it as no-SQL SQLite: unstructured data with database-style random access.

Key benefits:

  • O(1) array access, O(log n) object key lookup on encoded data
  • Automatic deduplication of values and shared schemas
  • Text-safe encoding (copy-paste friendly, no binary tooling needed)
  • Minimal heap allocations (~10 vs millions for JSON parsing)
  • ~18x compression on real deployment manifests (92 MB → 5.1 MB)

Installation

npm install @creationix/rx        # library
npm install -g @creationix/rx     # CLI (global)
npx @creationix/rx data.rx        # CLI (one-off)

Core API

String API (most common)

import { stringify, parse } from "@creationix/rx";

// Encode
const rx = stringify({ users: ["alice", "bob"], version: 3 });
// Returns a string — store it anywhere you'd store JSON text

// Decode (returns a read-only Proxy)
const data = parse(rx) as any;
data.users[0]         // "alice"
data.version          // 3
Object.keys(data)     // ["users", "version"]
JSON.stringify(data)  // works — full JS interop

Uint8Array API (performance-critical paths)

import { encode, open } from "@creationix/rx";

const buf = encode({ path: "/api/users", status: 200 });
const data = open(buf) as any;
data.path    // "/api/users"
data.status  // 200

Inspect API (lazy AST)

import { encode, inspect } from "@creationix/rx";

const buf = encode({ name: "alice", scores: [10, 20, 30] });
const root = inspect(buf);

root.tag          // ":"
root[0].tag       // "," (a string key)
root[0].value     // "name"
root.length       // 4 (key, value, key, value)

// Iterate children
for (const child of root) {
  console.log(child.tag, child.b64);
}

// Object helpers
for (const [key, val] of root.entries()) { /* ... */ }
const node = root.index("name");   // key lookup → node
const elem = root.index(2);        // array index → node

// Filtered key search (O(log n + m) on indexed objects)
for (const [key, val] of root.filteredKeys("/api/")) { /* ... */ }

Escape hatch to underlying buffer

import { handle } from "@creationix/rx";

const h = handle(data.nested);
// h.data: Uint8Array
// h.right: byte offset

Encoding Options

stringify(data, {
  // Add sorted indexes to containers with >= N entries (enables O(log n) lookup)
  // Use 0 for all containers, false to disable entirely
  indexes: 10,

  // External refs — shared dictionary of known values for cross-document dedup
  refs: { R: ["/api/users", "/api/teams"] },

  // Streaming — receive chunks as they're produced
  onChunk: (chunk: string, offset: number) => process.stdout.write(chunk),
});

Metadata

Stars3809
Views1
Updated2026-04-05
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-adisinghstudent-creationix-rx-data-store": {
      "enabled": true,
      "auto_update": true
    }
  }
}
Safety NoteClawKit audits metadata but not runtime behavior. Use with caution.