chdb-datastore
Use when the user has tabular data (pandas DataFrame, parquet, csv, Arrow, json) and wants to filter, group, aggregate, join, or…
Generate TypeScript/JavaScript code that reads/decodes AND writes/encodes ClickHouse RowBinary streams for the ClickHouse HTTP server. Use this skill whenever a user wants to parse or produce `RowBinary`, `RowBinaryWithNames`, or `RowBinaryWithNamesAndTypes`. Node.js only,
Claude Code
$ npx -y skills add clickhouse/agent-skills --skill clickhouse-js-node-rowbinary --agent claude-code
Codex
$ npx skills add clickhouse/agent-skills --skill clickhouse-js-node-rowbinary -a codex -y
Cursor
$ npx skills add clickhouse/agent-skills --skill clickhouse-js-node-rowbinary -a cursor -y
Gemini CLI
$ npx skills add clickhouse/agent-skills --skill clickhouse-js-node-rowbinary -a gemini-cli -y
GitHub Copilot
$ npx skills add clickhouse/agent-skills --skill clickhouse-js-node-rowbinary -a github-copilot -y
OpenCode
$ npx skills add clickhouse/agent-skills --skill clickhouse-js-node-rowbinary -a opencode -y
Windsurf
$ npx skills add clickhouse/agent-skills --skill clickhouse-js-node-rowbinary -a windsurf -y
name: clickhouse-js-node-rowbinary description: > Generate TypeScript/JavaScript code that reads/decodes AND writes/encodes ClickHouse RowBinary streams for the ClickHouse HTTP server. Use this skill whenever a user wants to parse or produce `RowBinary`, `RowBinaryWithNames`, or `RowBinaryWithNamesAndTypes`. Node.js only, doesn't cover browsers.
This skill generates both directions of the wire format: **readers** (decode bytes → values) and **writers** (encode values → bytes, the mirror). A given task normally needs only one side. This file is the shared entry point — the format gate plus the principles common to both directions; the per-direction decisions, guidance, and the per-type reference tables live in two sibling files.
**Pick your side — read only the one you need:**
**[reader.md](reader.md)**. Streaming vs whole-buffer, row-objects vs columnar, fixed vs runtime schema, and the per-type reader reference.
**[writer.md](writer.md)**. The `Sink`/`writeX` building blocks, `writeRows` streaming, and the per-type writer reference.
The per-type code is real, split by direction under `src/readers/` and `src/writers/`.
RowBinary exists for throughput, but it is **not automatically the fastest path** — match the format to the shape of the data before committing to a bespoke parser.
**Prefer a `JSON*` format (e.g. `JSONEachRow`) when** the result is mostly strings / JSON-like values that you consume wholesale — randomly accessing essentially every field, running string/regexp methods on them, treating values as text. V8's native `JSON.parse` is heavily optimized C++ and builds JS strings and objects faster than a JS-level RowBinary decoder can; pair it with HTTP response compression (`gzip` / `zstd`, which crushes JSON's repetitive keys) and the wire cost shrinks too.
**RowBinary clearly wins when** the result is dominated by:
`Decimal128`/`Decimal256`.
single `DataView` read.
**Prefer the `Native` format when** columnar load and client-side analytics are the main goal (fold/scan/filter columns, feed typed arrays to a Worker or WASM). `Native` is column-major, so it loads straight into one typed array per column with no transpose.
For help choosing and consuming a `JSON*` format (or CSV / TSV) instead, use the **`clickhouse-js-node-coding`** skill.
These principles apply whether you are generating a reader or a writer; the side-specific operational guidance is in [reader.md](reader.md) / [writer.md](writer.md).
write every multi-byte number with `DataView` accessors passing a **literal** `true` for the `littleEndian` flag.
plain per-type API. Only after it's correct (and tested) specialize it. Don't bake performance assumptions in before correctness.
type combination instead of passing functions as arguments where the type is known ahead of time.
correct, composable reference; the generated codec should INLINE their bodies, not call them, so the row loop is straight-line with no per-field indirection (and so the fixed-width coalescing can fold the offset arithmetic together).
short comment above each column's encode/decode block naming the ClickHouse type it handles.
scratch buffer as a write-then-read pair — correct only because the access is fully synchronous. An `async`/`yield` boundary between populating and reading it corrupts the value.
explicitly asks for plain JavaScript.
Six end-to-end examples with real speedup are catalogued in [EXAMPLES.md](EXAMPLES.md).
`clickhouse-js-node-troubleshooting`.
The official Agent Skills for ClickHouse. These skills help LLMs and agents to adopt best practices when working with ClickHouse and chdb (in-process ClickHouse for Python). You can use these skills with open-source ClickHouse and managed ClickHouse Cloud.
Use when the user has tabular data (pandas DataFrame, parquet, csv, Arrow, json) and wants to filter, group, aggregate, join, or…
Use when the user wants to run SQL — especially analytical SQL — on local files (parquet/csv/json), URLs, S3 paths, or remote…
MUST USE when designing ClickHouse architectures, selecting between ingestion or modeling patterns, or translating best practices…
MUST USE when reviewing ClickHouse schemas, queries, native full-text search, or configurations. Contains 36 rules that MUST be…
Write idiomatic application code with the ClickHouse Node.js client (`@clickhouse/client`). Use this skill whenever a user is…
Troubleshoot and resolve common issues with the ClickHouse Node.js client (@clickhouse/client). Use this skill whenever a user…
Sweep the googleapis/mcp-toolbox docs for broken and non-canonical links, report each finding with its cause, and apply the safe…
Create reusable Convex components with clear boundaries and a small app-facing API.