---
title: "@clickhouse/rowbinary: when your library is also a parser compiler"
description: "@clickhouse/rowbinary is a Node.js reader/writer for ClickHouse's RowBinary formats that also ships as an Agent Skill: a coding agent reads its densely commented, monomorphizable primitives plus SKILL.md and generates a parser specialized to a query's exact column types, replacing a traditional codegen compiler."
url: "https://swe.quest/articles/clickhouse-rowbinary-when-your-library-is-also-a-parser-compiler-a30fc022f9070ed3"
canonical: "https://clickhouse.com/blog/clickhouse-rowbinary-library-parser-compiler"
source: "ClickHouse"
published: "2026-07-14"
difficulty: "medium"
kind: "Deep dive"
reading_minutes: 10
tags: ["ai-coding","performance","typescript","analytics","compilers"]
---

# @clickhouse/rowbinary: when your library is also a parser compiler

A post on [ClickHouse](https://swe.quest/sources/clickhouse.md), published 2026-07-14, 10 min read, Deep dive. Original: [https://clickhouse.com/blog/clickhouse-rowbinary-library-parser-compiler](https://clickhouse.com/blog/clickhouse-rowbinary-library-parser-compiler)

## Summary

@clickhouse/rowbinary is a Node.js reader/writer for ClickHouse's RowBinary formats that also ships as an Agent Skill: a coding agent reads its densely commented, monomorphizable primitives plus SKILL.md and generates a parser specialized to a query's exact column types, replacing a traditional codegen compiler. Generated parsers ran 1.5–3.4x faster than composing the library API (e.g. one bounds check and constant-offset reads for fixed-width rows, avoiding V8 megamorphic dispatch), and RowBinary itself beat the correct BigInt-safe JSON path by 2.1–3.3x on numeric schemas, though JSONCompactEachRow wins on string-heavy data. Each parser costs about $0.20 to generate with Claude Sonnet 4.6, and grounding the agent in tested primitives avoids silent bugs such as byte-order-wrong UUID decoding that models produced from memory in 3 of 5 runs.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [AI for coding](https://swe.quest/tags/ai-coding.md) (AI & ML)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)
- [TypeScript](https://swe.quest/tags/typescript.md) (Languages)
- [Analytics & OLAP](https://swe.quest/tags/analytics.md) (Data & databases)
- [Compilers](https://swe.quest/tags/compilers.md) (Compilers & runtimes)

## Prerequisites

- ClickHouse data types ([easy posts on Analytics & OLAP](https://swe.quest/tags/analytics.md?difficulty=easy))
- binary encoding basics ([easy posts on Video & media](https://swe.quest/tags/video-media.md?difficulty=easy))
- V8 inlining and monomorphism ([easy posts on Runtimes & VMs](https://swe.quest/tags/runtimes.md?difficulty=easy))
- TypeScript ([easy posts on TypeScript](https://swe.quest/tags/typescript.md?difficulty=easy))

## Keywords

ClickHouse, RowBinary, @clickhouse/rowbinary, Agent Skills, SKILL.md, V8, Claude Sonnet 4.6, LEB128

## Related posts

- [Building a code search engine with Turso](https://swe.quest/articles/building-a-code-search-engine-with-turso-6a98c3f86064a46b.md): Turso · 2026-02-26 · Medium · 6 min read · Vector search, Search, SQLite, AI agents, RAG & retrieval
  Codemogger is an open-source code indexer and search engine for AI agents, built on a single local Turso (SQLite-compatible) file using native vector columns and full-text search.
- [ClickHouse Input format matchup: Which is fastest & most efficient](https://swe.quest/articles/clickhouse-input-format-matchup-which-is-fastest-most-efficient-9abb3bd9e520be60.md): ClickHouse · 2025-02-26 · Medium · 22 min read · Analytics & OLAP, Performance engineering, Databases, Data pipelines
  FastFormats is a benchmark that measures ClickHouse server-side ingestion time and hardware efficiency across roughly 60 input formats, crossed with batch size, pre-sorting and compression, using the ClickBench web analytics dataset over the HTTP interface.
- [The world’s fastest tool for querying JSON files](https://swe.quest/articles/the-world-s-fastest-tool-for-querying-json-files-5bf7115ac2686d02.md): ClickHouse · 2022-10-14 · Easy · 3 min read · Performance engineering, Analytics & OLAP, SQL
  clickhouse-local, a single-binary SQL engine for local and remote files, outperforms SPySQL, jq, trdsql, Miller, OctoSQL, spark-sql, Pandas and DSQ when querying large JSON files in the SPySQL benchmark on Amazon book reviews data.
- [Ghostwriter AI & Complete Code Beta](https://swe.quest/articles/ghostwriter-ai-complete-code-beta-eb4c500f5fc252eb.md): Replit · 2022-09-08 · Medium · 9 min read · AI for coding, Inference & serving, LLMs, Developer tools
  Replit's Ghostwriter adds AI code completion, generation, transformation, explanation and semantic search to its IDE, with Complete Code starting in closed beta.
- [Executable UDFs are now generally available on ClickHouse Cloud](https://swe.quest/articles/executable-udfs-are-now-generally-available-on-clickhouse-cloud-afc730ccd3e99d10.md): ClickHouse · 2026-10-05 · Medium · 20 min read · Analytics & OLAP, Rust, LLMs, Cost optimization, Observability
  Executable UDFs are now generally available on ClickHouse Cloud across AWS, GCP and Azure, adding a Native runtime for statically linked Rust/Go/C++/JavaScript binaries, outbound network access, per-process memory limits, a deterministic flag that enables the query cache, Cloud API and Terraform support, and per-query UDF metrics in 26.6+.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
