
Creationix Rx Data Store
Embed RX so agents encode JSON once and query large documents in place without full parse or heavy GC.
Overview
creationix-rx-data-store is an agent skill for the Build phase that teaches embedding Creationix RX for one-pass JSON encoding and in-buffer random-access reads in TypeScript.
Install
npx skills add https://github.com/aradotso/trending-skills --skill creationix-rx-data-storeWhat is this skill?
- O(1) array index access and O(log n) object key lookup on encoded buffers without building a full object graph
- String API via stringify/parse plus CLI (`npx @creationix/rx`) and npm package `@creationix/rx`
- Automatic value and shared-schema deduplication with text-safe, copy-paste-friendly RX encoding
- Low allocation profile (~10 heap allocs vs millions for typical JSON.parse on large docs)
- Documented ~18x size reduction example on real deployment manifests (92 MB → 5.1 MB)
- O(1) array access and O(log n) object key lookup on encoded data
- ~10 heap allocations versus millions for typical JSON parsing on large documents
- ~18x compression example on deployment manifests (92 MB to 5.1 MB)
Adoption & trust: 813 installs on skills.sh; 31 GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You ship large JSON-shaped documents but full parse on every access wastes memory, CPU, and GC time.
Who is it for?
TypeScript or Node backends and CLIs that repeatedly read the same large JSON manifests, configs, or catalogs and need embedded random access without a SQL engine.
Skip if: Greenfield apps where small JSON fits in memory with JSON.parse, workloads needing SQL joins or transactions, or teams that will not add the @creationix/rx dependency.
When should I use this skill?
Encode data with RX, use RX data store, parse RX format, random access JSON data, RX encoder decoder TypeScript, convert JSON to RX, query RX encoded buffer, or RX format serialization.
What do I get? / Deliverables
After using the skill, your agent integrates RX stringify/parse and buffer queries so encoded strings are stored and read with O(1) array and O(log n) key access instead of rebuilding object graphs.
- RX-encoded string or buffer from stringify
- Integration code using parse and in-buffer queries
- Optional CLI workflows reading .rx files via @creationix/rx
Recommended Skills
Journey fit
RX is a backend data-encoding library you wire into services and CLIs while implementing storage and read paths. Random-access encoding, stringify/parse APIs, and buffer queries belong in backend integration work—not frontend UI or launch distribution.
How it compares
Use for embedded random-access encoding on RX buffers instead of parsing full JSON into objects on every read.
Common Questions / FAQ
Who is creationix-rx-data-store for?
Solo and indie builders using Claude Code, Cursor, or Codex on TypeScript/Node backends who want agents to implement RX encoding and in-place queries correctly.
When should I use creationix-rx-data-store?
During Build backend work when you need to encode data with RX, convert JSON to RX, parse RX format, or query an RX-encoded buffer with random-access semantics.
Is creationix-rx-data-store safe to install?
Treat it like any third-party npm package: review the Security Audits panel on this Prism page and your own dependency policy before installing @creationix/rx in production repos.
SKILL.md
READMESKILL.md - Creationix Rx Data Store
# RX Data Store > Skill by [ara.so](https://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 ```sh 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) ```ts 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) ```ts 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) ```ts 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 ```ts import { handle } from "@creationix/rx"; const h = handle(data.nested); // h.data: Uint8Array // h.right: byte offset ``` --- ## Encoding Options ```ts 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), }); encode(data, { indexes: 10, refs: { R: ["/api/users", "/api/teams"] }, onChunk: (chunk: Uint8Array, offset: number) => { /* ... */ }, }); ``` **If the encoder used external refs, pass the same dictionary to the decoder:** ```ts const data = parse(payload, { refs: { R: ["/api/users", "/api/teams"] } }); const data = open(buf, { refs: { R: ["/api/users", "/api/teams"] } }); ``` --- ## CLI ```sh rx data.rx # pretty-print as tree (default on TTY) rx data.rx -j # convert to JSON rx data.json -r # convert to RX cat data.rx | rx # read from stdin (auto-detect format) rx data.rx -s