Skip to content
Skills Library
Programming · Conversion & formats

clickhouse-js-node-rowbinary

/clickhouse-js-node-rowbinary

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.

Licence
Apache-2.0
Last repository change
26.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
193
Scripts
173
HTML comments
0
URLs in SKILL.md
3
Deprecation

No signals detected. Repository changed on 26.10.2026, without references to retired models or APIs.

Licence

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

What to check before installing
  • 173 scripts in this package. Review them before installing, as Claude may execute them.

Scripts: src/examples/carts.ts, src/examples/events.ts, src/examples/iot.ts, src/examples/ledger.ts, src/examples/logs.ts, src/examples/observability.ts, src/examples/orders.ts, src/examples/profiles.ts, src/examples/telemetry.ts, src/readers/aggregateFunction.ts, src/readers/bool.ts, src/readers/columnar.ts, src/readers/compile.ts, src/readers/composite.ts, src/readers/core.ts, src/readers/datetime.ts, sr

What it does and when to use it

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.

Original author 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.

How it works

  1. First: is RowBinary even the right format?
  2. Core guidance (both directions)
  3. Worked examples
  4. Out of scope
  5. Still Stuck?
Original SKILL.md headings · 103 lines, 647 words
SKILL.md preview
---
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.
---

# ClickHouse JS RowBinary Codec Generator for Node.js

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:**

- **Decoding a `RowBinary*` response** from ClickHouse into JS values →
  **[reader.md](reader.md)**. Streaming vs whole-buffer, row-objects vs columnar,
  fixed vs runtime schema, and the per-type reader reference.
- **Encoding JS values into a `RowBinary` payload** to send to ClickHouse →
  **[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/`.

## First: is RowBinary even the right format?

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:

- **Wide numerics** — `Int128`/`Int256`/`UInt128`/`UInt256`,
  `Decimal128`/`Decimal256`.
- **Binary / fixed-width blobs** — `IPv4`, `IPv6`, `UUID`, `FixedString`.
- **High-volume fixed-width numeric columns** generally, where each value is a
  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.

## Core guidance (both directions)

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).

- **Little-endian only.** RowBinary is little-endian; target x86/ARM. Read and
  write every multi-byte number with `DataView` accessors passing a **literal**
  `true` for the `littleEndian` flag.

- **Correct first, then optimize.** First emit a correct codec built from the
  plain per-type API. Only after it's correct (and tested) specialize it. Don't
  bake performance assumptions in before correctness.

- **Monomorphize generic/composite types.** Emit specialized, inlined code per
  type combination instead of passing functions as arguments where the type is
  known ahead of time.

- **Inline the leaf ops.** The per-type `readX`/`writeX` functions are the
  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).

- **Annotate the type per column.** Inlining erases the type structure, so put a
  short comment above each column's encode/decode block naming the ClickHouse
  type it handles.

- **Shared scratch is not reentrant.** Some hot methods reuse a module-level
  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.

- **TypeScript by default.** Generate TypeScript code and helpers unless the user
  explicitly asks for plain JavaScript.

## Worked examples

Six end-to-end examples with real speedup are catalogued in [EXAMPLES.md](EXAMPLES.md).

## Out of scope

- **JSON / CSV / TSV / Parquet parsing** → use `clickhouse-js-node-coding`.
- **Connection errors, hangs, type mismatches** → use
  `clickhouse-js-node-troubleshooting`.
- **Browser / Web Worker / Edge** → `@clickhouse/client-web`.

## Still Stuck?

- [ClickHouse RowBinary format](https://clickhouse.com/docs/interfaces/formats#rowbinary)
- [ClickHouse data types](https://clickhouse.com/docs/sql-reference/data-types)
- [ClickHouse JS client docs](https://clickhouse.com/docs/integrations/javascript)
Files in this package (193)
  • .gitignore 1 KB
  • AGENTS.md 3 KB
  • CHANGELOG.md 3 KB
  • EXAMPLES.md 6 KB
  • README.md 15 KB
  • SKILL.md 5 KB
  • eval_result.md 6 KB
  • eval_result_composer.md 8 KB
  • eval_result_haiku.md 9 KB
  • eval_result_sonnet.md 6 KB
  • package-lock.json 40 KB
  • package.json 2 KB
  • reader.md 15 KB
  • tsconfig.build.json 1 KB
  • tsconfig.json 1 KB
  • vitest.config.ts 1 KB
  • writer.md 7 KB
  • case-studies/iot-rowbinary-vs-json.md 4 KB
  • case-studies/ledger-rowbinary-vs-json.md 5 KB
  • case-studies/logs-json-wins.md 4 KB
  • case-studies/wasm-vs-js.md 10 KB
  • src/examples/carts.ts 3 KB
  • src/examples/events.ts 2 KB
  • src/examples/iot.ts 6 KB
  • src/examples/ledger.ts 4 KB
  • src/examples/logs.ts 3 KB
  • src/examples/observability.ts 5 KB
  • src/examples/orders.ts 3 KB
  • src/examples/profiles.ts 2 KB
  • src/examples/telemetry.ts 3 KB
  • src/readers/aggregateFunction.ts 2 KB
  • src/readers/bool.ts 1 KB
  • src/readers/columnar.ts 6 KB
  • src/readers/compile.ts 11 KB
  • src/readers/composite.ts 7 KB
  • src/readers/core.ts 3 KB
  • src/readers/datetime.ts 4 KB
  • src/readers/decimals.ts 2 KB
  • src/readers/dynamic.ts 12 KB
  • src/readers/enums.ts 2 KB
  • src/readers/floats.ts 1 KB
  • src/readers/geo.ts 4 KB
  • src/readers/header.ts 1 KB
  • src/readers/integers.ts 3 KB
  • src/readers/interval.ts 2 KB
  • src/readers/ip.ts 3 KB
  • src/readers/json.ts 1 KB
  • src/readers/lowCardinality.ts 1 KB
  • src/readers/nested.ts 1 KB
  • src/readers/nothing.ts 1 KB
  • src/readers/reader.ts 3 KB
  • src/readers/rowBinaryWithNamesAndTypes.ts 7 KB
  • src/readers/rows.ts 2 KB
  • src/readers/simpleAggregateFunction.ts 1 KB
  • src/readers/stream.ts 12 KB
  • src/readers/strings.ts 2 KB
  • src/readers/time.ts 2 KB
  • src/readers/uuid.ts 6 KB
  • src/readers/varint.ts 3 KB
  • src/writers/aggregateFunction.ts 1 KB
  • src/writers/bool.ts 1 KB
  • src/writers/composite.ts 5 KB
  • src/writers/core.ts 4 KB
  • src/writers/datetime.ts 5 KB
  • src/writers/decimals.ts 2 KB
  • src/writers/enums.ts 1 KB
  • src/writers/floats.ts 2 KB
  • src/writers/geo.ts 5 KB
  • src/writers/integers.ts 4 KB
  • src/writers/interval.ts 1 KB
  • src/writers/ip.ts 4 KB
  • src/writers/lowCardinality.ts 1 KB
  • src/writers/nested.ts 1 KB
  • src/writers/nothing.ts 1 KB
  • src/writers/rows.ts 7 KB
  • src/writers/simpleAggregateFunction.ts 1 KB
  • src/writers/strings.ts 3 KB
  • src/writers/time.ts 2 KB
  • src/writers/uuid.ts 2 KB
  • src/writers/varint.ts 2 KB
  • src/writers/writer.ts 3 KB
  • tests/AggregateFunction.write.test.ts 1 KB
  • tests/Array.test.ts 2 KB
  • tests/BFloat16.test.ts 1 KB
  • tests/Bool.test.ts 1 KB
  • tests/BoolEnumFloat.write.test.ts 4 KB
  • tests/Composite.write.test.ts 3 KB
  • tests/Date.test.ts 1 KB
  • tests/Date32.test.ts 1 KB
  • tests/DateTime.test.ts 1 KB
  • tests/DateTime.write.test.ts 3 KB
  • tests/DateTime64.test.ts 2 KB
  • tests/DateTime64P3.test.ts 1 KB
  • tests/DateTime64P6.test.ts 1 KB
  • tests/DateTime64P9.test.ts 1 KB
  • tests/Decimal.write.test.ts 3 KB
  • tests/Decimal128.test.ts 2 KB
  • tests/Decimal256.test.ts 2 KB
  • tests/Decimal32.test.ts 2 KB
  • tests/Decimal64.test.ts 2 KB
  • tests/Dynamic.test.ts 13 KB
  • tests/Enum16.test.ts 2 KB
  • tests/Enum8.test.ts 2 KB
  • tests/FixedString.test.ts 1 KB
  • tests/FixedStringBytes.test.ts 1 KB
  • tests/Float32.test.ts 1 KB
  • tests/Float64.test.ts 1 KB
  • tests/Geo.write.test.ts 3 KB
  • tests/Geometry.test.ts 2 KB
  • tests/IP.write.test.ts 3 KB
  • tests/IPv4.test.ts 2 KB
  • tests/IPv6.test.ts 2 KB
  • tests/Int128.test.ts 2 KB
  • tests/Int16.test.ts 2 KB
  • tests/Int256.test.ts 2 KB
  • tests/Int32.test.ts 1 KB
  • tests/Int64.test.ts 1 KB
  • tests/Int8.test.ts 1 KB
  • tests/Integers.write.test.ts 5 KB
  • tests/Interval.test.ts 1 KB
  • tests/JSON.test.ts 4 KB
  • tests/LineString.test.ts 1 KB
  • tests/Map.test.ts 2 KB
  • tests/MultiLineString.test.ts 1 KB
  • tests/MultiPolygon.test.ts 1 KB
  • tests/Nothing.write.test.ts 1 KB
  • tests/Nullable.test.ts 2 KB
  • tests/Point.test.ts 1 KB
  • tests/Polygon.test.ts 1 KB
  • tests/Ring.test.ts 1 KB
  • tests/Rows.write.test.ts 8 KB
  • tests/String.test.ts 2 KB
  • tests/String.write.test.ts 2 KB
  • tests/Time.test.ts 2 KB
  • tests/Time64.test.ts 2 KB
  • tests/TimeInterval.write.test.ts 2 KB
  • tests/Tuple.test.ts 2 KB
  • tests/TupleNamed.test.ts 2 KB
  • tests/UInt128.test.ts 1 KB
  • tests/UInt16.test.ts 1 KB
  • tests/UInt256.test.ts 2 KB
  • tests/UInt32.test.ts 1 KB
  • tests/UInt64.test.ts 1 KB
  • tests/UInt8.test.ts 1 KB
  • tests/UUID.test.ts 4 KB
  • tests/UUID.write.test.ts 2 KB
  • tests/UUIDBigInt.test.ts 2 KB
  • tests/UUIDHiLo.test.ts 2 KB
  • tests/UVarint.test.ts 4 KB
  • tests/UVarint.write.test.ts 2 KB
  • tests/Variant.test.ts 3 KB
  • tests/advance.test.ts 3 KB
  • tests/aggregateFunction.test.ts 4 KB
  • tests/carts.bench.ts 2 KB
  • tests/carts.example.test.ts 2 KB
  • tests/clickhouse.ts 1 KB
  • tests/coalesceChunks.test.ts 5 KB
  • tests/columnar.test.ts 6 KB
  • tests/combinations.generated.test.ts 9 KB
  • tests/compile.test.ts 4 KB
  • tests/encode.ts 1 KB
  • tests/events.bench.ts 2 KB
  • tests/events.example.test.ts 2 KB
  • tests/framing-interleaved.test.ts 11 KB
  • tests/framing-nested.test.ts 12 KB
  • tests/framing.test.ts 19 KB
  • tests/iot.bench.ts 5 KB
  • tests/iot.columnar.bench.ts 2 KB
  • tests/iot.wasm-headroom.bench.ts 5 KB
  • tests/ledger.bench.ts 8 KB
  • tests/logs.bench.ts 4 KB
  • tests/lowCardinality.test.ts 2 KB
  • tests/nested.test.ts 2 KB
  • tests/nothing.test.ts 3 KB
  • tests/observability.bench.ts 2 KB
  • tests/observability.example.test.ts 4 KB
  • tests/orders.bench.ts 2 KB
  • tests/orders.example.test.ts 2 KB
  • tests/parseIP.bench.ts 1 KB
  • tests/profiles.bench.ts 2 KB
  • tests/profiles.example.test.ts 2 KB
  • tests/qbit.test.ts 3 KB
  • tests/readHeader.test.ts 1 KB
  • tests/readUUID.bench.ts 1 KB
  • tests/rowBinaryWithNamesAndTypes.order.test.ts 3 KB
  • tests/rowBinaryWithNamesAndTypes.test.ts 19 KB
  • tests/rows.test.ts 8 KB
  • tests/simpleAggregateFunction.test.ts 2 KB
  • tests/streamRowBatches.test.ts 6 KB
  • tests/streamingRow.bench.ts 8 KB
  • tests/telemetry.bench.ts 2 KB
  • tests/telemetry.example.test.ts 2 KB
  • tests/wasm-int128.experiment.mjs 7 KB

Versions

The database has no other skills named clickhouse-js-node-rowbinary.

Identical content appears in 1 other GitHub folders. We show one copy with the highest score.

Database snapshot: 13.11.2026 · package version 2b7a5f00659b (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100clickhouse-pr-description
    Generate PR descriptions for ClickHouse/ClickHouse that match maintainer expectations. Use when creating or updating PR descriptions.
  • 100clickhouse-js-node-coding
    Write idiomatic application code with the ClickHouse Node.js client (`@clickhouse/client`). Use this skill whenever a user is *building* against the Node.js client — configuring the client, pinging, inserting rows in JSON or raw formats, selecting and parsing results, binding…
  • 100clickhouse-install-auth
    Install @clickhouse/client and configure authentication to ClickHouse Cloud or self-hosted. Use when setting up a new ClickHouse project, configuring connection strings, or initializing the official Node.js or Python client. Trigger with "install clickhouse", "setup clickhouse…
  • 100clickhouse-js-node-troubleshooting
    Troubleshoot and resolve common issues with the ClickHouse Node.js client (@clickhouse/client). Use this skill whenever a user reports errors, unexpected behavior, or configuration questions involving the Node.js client specifically — including socket hang-up errors, Keep-Alive…
  • 90clickhouse-analytics
    Answer data questions against ClickHouse through the ch-ui MCP server. Use when the user asks about data, tables, metrics, dashboards or query performance in ClickHouse, or when ch-ui MCP tools are available.
  • 100clickhouse-local-dev-loop
    Run ClickHouse locally with Docker, configure test fixtures, and iterate fast. Use when setting up a local ClickHouse dev environment, writing integration tests against ClickHouse, or running ClickHouse in Docker Compose for local work. Trigger with "clickhouse local dev",…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.