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.
от reason-machines★ 99 звёзд на GitHubОб этом скилле
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),
});
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:
const data = parse(payload, { refs: { R: ["/api/users", "/api/teams"] } });
const data = open(buf, { refs: { R: ["/api/users", "/api/teams"] } });
CLI
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 key 0 sub # select a sub-value: data["key"][0]["sub"]
rx data.rx -o out.json # write to file
rx data.rx --ast # output encoding structure as JSON
rx data.rx -w # write converted file (.json↔.rx)
Full CLI flags:
| Flag | Description |
|---|---|
<file> |
Input file (format auto-detected) |
- |
Read from stdin explicitly |
-j, --json |
Output as JSON |
-r, --rexc |
Output as RX |
-t, --tree |
Output as tree |
-a, --ast |
Output encoding structure |
-s, --select <seg>... |
Select a sub-value by path segments |
-w, --write |
Write converted file |
-o, --out <path> |
Write to file instead of stdout |
-c, --color / --no-color |
Force or disable ANSI color |
--index-threshold <n> |
Index containers above n values (default: 16) |
--string-chain-threshold <n> |
Split strings longer than n (default: 64) |
--string-chain-delimiter <s> |
Delimiter for string chains (default: /) |
--key-complexity-threshold <n> |
Max object complexity for dedupe keys (default: 100) |
Shell completions:
rx --completions setup zsh # or bash
Tip — paged, colorized viewing:
p() { rx "$1" -t -c | less -RFX; }
Proxy Behavior
The value returned by parse/open is read-only:
obj.newKey = 1; // throws TypeError
delete obj
Установить creationix-rx-data-store в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл 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.
Как установить скилл creationix-rx-data-store?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл creationix-rx-data-store запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic