clickhouse-js-node-coding
Write idiomatic application code with the ClickHouse Node.js client (`@clickhouse/client`).
Skill by ClickHouseOfficial
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/clickhouse-clickhouse-js-node-coding
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: data, writing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/clickhouse-js-node-coding
What's inside
- Skill name
clickhouse-js-node-coding- Description
- 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 query parameters, managing sessions and temporary tables, working with data types or customizing JSON parsing. Do NOT use for browser/Web client code.
- License
- Apache-2.0
- Instructions
- 132 lines in SKILL.md · view on GitHub
Files (13)
- SKILL.md
- async-insert.md · reference/
- client-configuration.md · reference/
- compression.md · reference/
- custom-json.md · reference/
- data-types.md · reference/
- insert-columns.md · reference/
- insert-formats.md · reference/
- insert-values.md · reference/
- ping.md · reference/
- query-parameters.md · reference/
- select-formats.md · reference/
- sessions.md · reference/
SKILL.md (first lines)
# ClickHouse Node.js Client — Coding
Reference: https://clickhouse.com/docs/integrations/javascript
> **⚠️ Node.js runtime only.** This skill covers the `@clickhouse/client`
> package running in a **Node.js runtime** exclusively — including **Next.js
> Node runtime** API routes, React Server Components, Server Actions, and
> standard Node.js processes. Do **not** apply this skill to browser client
> components, Web Workers, **Next.js Edge runtime**, Cloudflare Workers, or
> any usage of `@clickhouse/client-web`. For browser/edge environments, the
> correct package is `@clickhouse/client-web`.
---
## How to Use This Skill
1. **Match the user's intent** to a row in the Task Index below and read the
corresponding reference file before writing code. After reading it, scan any
**Answer checklist** in that reference and make sure the final answer covers
each relevant item; those checklists capture details users usually need but
are easy to omit in short answers.
2. **Always import from `@clickhouse/client`** (never `@clickhouse/client-web`)
and create a client with `createClient({ url })` or rely on
supported defaults when appropriate. Close it with `await client.close()`
preferably when it's no longer needed or during graceful shutdown for global resources.
3. **Prefer `JSONEachRow` for typical row inserts/selects** unless the user
has already chosen another format or is streaming raw bytes (CSV / TSV /
Parquet — see `examples/node/performance/`).
**Note on `clickhouse_settings`:** settings passed to `createClient` are
defaults for every request; they can be overridden per-call by passing
`clickhouse_settings` directly to `insert()`, `query()`, or `command()`.
Always mention this when the user configures settings at the client level.
4. **Always use `query_params` for user-supplied values** — never template-
literal-interpolate them into SQL. See `reference/query-parameters.md`.
**When answering a parameter-binding question, your response must
explicitly name template-literal interpolation as a "SQL injection
risk"** — even when the user only asked about syntax and did not raise
security. The literal phrase "SQL injection" needs to appear; this is
the most common mistake from PostgreSQL/MySQL users and the security
framing is part of the correct answer, not an optional aside.
5. **Pick the right method for the job:**
- `client.insert()` — write rows.
- `client.query()` + `resultSet.json()` / `.text()` / `.stream()` — read
rows that return data.
- `client.command()` — DDL and other statements that don't return rows
(`CREATE`, `DROP`, `TRUNCATE`, `ALTER`, `SET` in a session, etc.).
- `client.exec()` — when you need the raw response stream of an arbitrary
statement (rare in coding scenarios).
- `client.ping()` — health check; returns `{ success, error? }`, never
throws on connection failure.
6. **Note version constraints** when relevant. Examples:
- `pathname` config option: client `>= 1.0.0`.
- `BigInt` values in `query_params`: client `>= 1.15.0`.
- `TupleParam` and JS `Map` in `query_params`: client `>= 1.9.0`.
- Configurable `json.parse` / `json.stringify`: client `>= 1.14.0`.
- `Time` / `Time64` data types: ClickHouse server `>= 25.6`.
- `QBit` data type: ClickHouse server `>= 25.10` (GA on `26.x`).
- `Dynamic` / `Variant` / new `JSON` types: ClickHouse server `>= 24.1` /
`24.5` / `24.8` (no longer experimental since `25.3`).
---
## Task Index
Identify the user's task and read the matching reference file.
| Task | Triggers / symptoms | Reference file |
| -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- |
| **Configure / connect the client** | Building a `createClient` call, URL parameters, `clickhouse_settings`, default format, custom HTTP headers | `reference/client-configuration.md` |
| **Compress requests / responses** | `compression`, gzip vs `zstd`, `{ codec }` option shape, Node version requirements, web limitations | `reference/compression.md` |
| **Ping the server** | Health checks, readiness probes, "is ClickHouse up?" | `reference/ping.md` |
| **Choose an insert format** | "Which format should I use to insert?", JSON vs raw, `JSONEachRow` vs `JSON` vs `JSONObjectEachRow` | `reference/insert-formats.md` |
| **Insert into a subset of columns / different database** | `insert({ columns })`, excluding columns, ephemeral columns, cross-DB inserts | `reference/insert-columns.md` |
| **Insert values, expressions, dates, decimals** | `INSERT … VALUES` with SQL functions, `Date`/`DateTime` from JS, `Decimal` precision, `INSERT … SELECT`; inserting a UUID into a `UInt128` column is tricky — use when the user is writing code that stores a UUID as `UInt128` | `reference/insert-values.md` |
| **Async inserts (server-side batching)** | `async_insert=1`, fire-and-forget vs wait-for-ack | `reference/async-insert.md` |
| **Select and parse results** | `JSONEachRow` reads, `JSON` with metadata, picking a select format | `reference/select-formats.md` |
| **Parameterize queries** | Binding values, special characters / escaping, "SQL injection?", `{name: Type}` syntax | `reference/query-parameters.md` |
| **Sessions & temporary tables** | `session_id`, `CREATE TEMPORARY TABLE`, per-session `SET` commands | `reference/sessions.md` |
| **Modern data types** | `Dynamic`, `Variant`, `JSON` (object), `Time`, `Time64`, `QBit` (vector search) | `reference/data-types.md` |
| **Custom JSON parse/stringify** | Plug in `JSONBig` / `safe-stable-stringify` / a `BigInt`-aware serializer | `reference/custom-json.md` |
---
## Conventions used in answers
- Always show `import { createClient } from '@clickhouse/client'` (Node, never
Web).
- Always `await client.close()` at the end of self-contained snippets; in
long-running services, close on graceful shutdown.
- For inserts, prefer `format: 'JSONEachRow'` and `values: [...]` unless the
user's scenario requires otherwise.
- For selects, prefer `await (await client.query({...})).json<RowType>()` for
small / medium result sets; for bigger results suggest streaming.
- When showing parameter binding, use ClickHouse's native `{name: Type}`
syntax — never `$1`, `?`, or `:name`.
- For DDL inside a cluster or behind a load balancer, set
`clickhouse_settings: { wait_end_of_query: 1 }` on the `command()` call so
the server only acknowledges after the change is applied. See
https://clickhouse.com/docs/en/interfaces/http/#response-buffering.
---
## Out of scope
This skill covers day-to-day coding against `@clickhouse/client` (Node).
The following topics are intentionally **not** covered here:
- **Errors, hangs, type mismatches, proxy pathname surprises, log silence,
socket hang-ups, `ECONNRESET`** → use the
`clickhouse-js-node-troubleshooting` skill.
- **Streaming, Parquet, file streams, server-side bulk moves, progress
streaming, async-insert throughput tuning** — see
[`examples/node/performance/`](https://github.com/ClickHouse/clickhouse-js/tree/main/examples/node/performance).
- **TLS, RBAC / read-only users, deeper SQL-injection guidance** — see
[`examples/node/security/`](https://github.com/ClickHouse/clickhouse-js/tree/main/examples/node/security).
- **`CREATE TABLE` patterns, deployment-shaped connection strings,
replication / sharding choices** — see
[`examples/node/schema-and-deployments/`](https://github.com/ClickHouse/clickhouse-js/tree/main/examples/node/schema-and-deployments).
- **Browser, Web Worker, Next.js Edge, Cloudflare Workers** — useFrom ClickHouse/agent-skills, Apache-2.0.
More from ClickHouse/agent-skills
- 0.809score
infra-postgres
ClickHouse IncOfficial
Sets up and manages Postgres using the clickhousectl CLI — runs a local Docker-backed Postgres for development, and creates and operates managed ClickHouse…
SkillAFreshness: A★ 560Claude Code +9 - 0.806score
clickhouse-js-node-rowbinary
ClickHouseOfficial
Generate TypeScript/JavaScript code that reads/decodes AND writes/encodes ClickHouse RowBinary streams for the ClickHouse HTTP server.
SkillAFreshness: A★ 560Claude Code +9 - 0.763score
infra-clickhouse
ClickHouse IncOfficial
Sets up and manages ClickHouse using the clickhousectl CLI — installs and runs a local ClickHouse server for development, and creates managed ClickHouse Cloud…
SkillBFreshness: B★ 560Claude Code +9 - 0.712score
chdb-datastore
chdb-ioOfficial
Use when the user has tabular data (pandas DataFrame, parquet, csv, Arrow, json) and wants to filter, group, aggregate, join, or speed up slow pandas.
SkillCFreshness: C★ 560Claude Code +9 - 0.712score
chdb-sql
chdb-ioOfficial
Use when the user wants to run SQL — especially analytical SQL — on local files (parquet/csv/json), URLs, S3 paths, or remote databases (Postgres, MySQL…
SkillCFreshness: C★ 560Claude Code +9 - 0.706score
clickhouse-architecture-advisor
ClickHouse IncOfficial
MUST USE when designing ClickHouse architectures, selecting between ingestion or modeling patterns, or translating best practices into workload-specific…
SkillCFreshness: C★ 560Claude Code +9 - 0.706score
clickhouse-best-practices
ClickHouse IncOfficial
MUST USE when reviewing ClickHouse schemas, queries, or configurations.
SkillCFreshness: C★ 560Claude Code +9 - 0.706score
clickhouse-js-node-troubleshooting
ClickHouseOfficial
Troubleshoot and resolve common issues with the ClickHouse Node.js client (@clickhouse/client).
SkillCFreshness: C★ 560Claude Code +9 - 0.706score
clickhouse-managed-postgres-rca
ClickHouse IncOfficial
MUST USE when investigating performance issues on a ClickHouse-managed Postgres instance.
SkillCFreshness: C★ 560Claude Code +9 - 0.696score
clickstack-otel-collector
ClickHouse IncOfficial
Use when a user wants to wire an OpenTelemetry collector into a Managed ClickStack service on ClickHouse Cloud, either by deploying a new local collector…
SkillCFreshness: C★ 560Claude Code +9 - 0.410score
AGENTS.md · ClickHouse/agent-skills
ClickHouse
AGENTS.md from ClickHouse/agent-skills: 212 lines covering Repository Overview, Repository Structure, Creating a New Skill, Contributing Guidelines and more.
TemplateDFreshness: D★ 560Codex +5
Signals
- Stars
- 560
- Forks
- 38
- Open issues
- 1
- Last commit (this folder)
- Jun 30, 2026 (4 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- Apache-2.0
- Repository
- github.com/ClickHouse/agent-skills
- Website
- clickhouse.ai
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from ClickHouse
- 0.806score
clickhouse-js-node-rowbinary
ClickHouseOfficial
Generate TypeScript/JavaScript code that reads/decodes AND writes/encodes ClickHouse RowBinary streams for the ClickHouse HTTP server.
SkillAFreshness: A★ 560Claude Code +9 - 0.781score
ClickHouse
ClickHouseOfficial
Official ClickHouse MCP server for querying and exploring ClickHouse clusters and chDB.
ConnectorAFreshness: ALocal★ 892↓ 71.4K/wkClaude Code +5 - 0.706score
clickhouse-js-node-troubleshooting
ClickHouseOfficial
Troubleshoot and resolve common issues with the ClickHouse Node.js client (@clickhouse/client).
SkillCFreshness: C★ 560Claude Code +9 - 0.544score
docs-drift-reviewer
ClickHouse
Subagent "docs-drift-reviewer" from ClickHouse/mcp-clickhouse: Checks whether README.md, server.json, fastmcp.json, and CHANGELOG.md still match the code on…
TemplateBFreshness: B★ 892Claude Code - 0.544score
AGENTS.md · ClickHouse/mcp-clickhouse
ClickHouse
AGENTS.md from ClickHouse/mcp-clickhouse: 158 lines covering Role, Project Map, Working Rules, Architecture And MCP Contract and more.
TemplateBFreshness: B★ 892Codex +5 - 0.410score
AGENTS.md · ClickHouse/agent-skills
ClickHouse
AGENTS.md from ClickHouse/agent-skills: 212 lines covering Repository Overview, Repository Structure, Creating a New Skill, Contributing Guidelines and more.
TemplateDFreshness: D★ 560Codex +5
Cite this page
clickhouse-js-node-coding skill. Agent Mart. https://agentmart.dev/skills/clickhouse-clickhouse-js-node-coding (last updated 2026-10-24)