Skip to main content
BuildOfficialCertifiedAI reviewed Jul 21, 2026

Clickhouse 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 query parameters, managing sessions and temporary tables, working with data types or customizing JSON parsing. Do NOT use for browser/Web client code.

v1.0.1New

Install this skill

No account required. Pick your tool, or use the command that detects it for you.

Run in your terminal. It detects your AI tool.

npx @skills-hub-ai/cli install clickhouse-clickhouse-js-node-coding
Or get the file:
Browse all CLI commands →
Manual setup by platform

Claude Code

~/.claude/skills/clickhouse-clickhouse-js-node-coding/SKILL.md

Setup guide →

Signing

SignedSLSA L2
Signed by
skills-hub.ai distributor
Method
Distributor-signed by skills-hub.aiSigned with the skills-hub.ai Ed25519 distributor key over this exact slug, version and content. Check it with `npx @skills-hub-ai/cli verify`.
Key
skills-hub-ed25519-2026-11
Signed
0Save

Instructions

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.

TaskTriggers / symptomsReference file
Configure / connect the clientBuilding a createClient call, URL parameters, clickhouse_settings, default format, custom HTTP headersreference/client-configuration.md
Compress requests / responsescompression, gzip vs zstd, { codec } option shape, Node version requirements, web limitationsreference/compression.md
Ping the serverHealth 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 JSONObjectEachRowreference/insert-formats.md
Insert into a subset of columns / different databaseinsert({ columns }), excluding columns, ephemeral columns, cross-DB insertsreference/insert-columns.md
Insert values, expressions, dates, decimalsINSERT … 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 UInt128reference/insert-values.md
Async inserts (server-side batching)async_insert=1, fire-and-forget vs wait-for-ackreference/async-insert.md
Select and parse resultsJSONEachRow reads, JSON with metadata, picking a select formatreference/select-formats.md
Parameterize queriesBinding values, special characters / escaping, "SQL injection?", {name: Type} syntaxreference/query-parameters.md
Sessions & temporary tablessession_id, CREATE TEMPORARY TABLE, per-session SET commandsreference/sessions.md
Modern data typesDynamic, Variant, JSON (object), Time, Time64, QBit (vector search)reference/data-types.md
Custom JSON parse/stringifyPlug in JSONBig / safe-stable-stringify / a BigInt-aware serializerreference/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/.
  • TLS, RBAC / read-only users, deeper SQL-injection guidance — see
    examples/node/security/.
  • CREATE TABLE patterns, deployment-shaped connection strings,
    replication / sharding choices
    — see
    examples/node/schema-and-deployments/.
  • Browser, Web Worker, Next.js Edge, Cloudflare Workers — use
    @clickhouse/client-web and see
    examples/web/.

Still Stuck?

  • examples/node/coding/ — the runnable corpus this skill is built on.
  • ClickHouse JS client docs
  • ClickHouse supported formats
  • ClickHouse data types
This skill doesn’t include stateful context yet, instructions only. Learn about stateful skills.

Security

Loading security scan...

Reviews (0)

Browse all →
infra-clickhouseSets up and manages ClickHouse using the clickhousectl CLI — installs and runs a local ClickHouse server for development, and creates managed ClickHouse Cloud services for production (authentication, service creation, schema migration, application connection). Use when the user wants to build an application with ClickHouse, set up a local ClickHouse dev environment, create tables and start querying, deploy ClickHouse to production or ClickHouse Cloud, or migrate from a local setup to the cloud.0 installsclickhouse-js-node-rowbinaryGenerate 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.0 installsclickstack-otel-collectorUse when a user wants to wire an OpenTelemetry collector into a Managed ClickStack service on ClickHouse Cloud, either by deploying a new local collector (Docker run or Docker Compose) or by configuring their own existing collector, then send rich synthetic telemetry and verify it is visible in ClickStack.0 installsclickhouse-js-node-troubleshootingTroubleshoot 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 problems, stream handling issues, data type mismatches, read-only user restrictions, proxy/TLS setup problems, or long-running query timeouts. Trigger even when the user hasn't precisely named the issue; vague symptoms like "my inserts keep failing" or "connection drops randomly" in a Node.js context are strong signals to use this skill. Do NOT use for browser/Web client issues.0 installsclickhousectl-local-devUse when a user wants to build an application with ClickHouse, set up a local ClickHouse development environment, install ClickHouse, create a local server, create tables, or start developing with ClickHouse. Covers the full flow from zero to a working local ClickHouse setup.0 installschdb-sqlUse when the user wants to run SQL — especially analytical SQL — on local files (parquet/csv/json), URLs, S3 paths, or remote databases (Postgres, MySQL, MongoDB, ClickHouse Cloud, Iceberg, Delta Lake) without setting up a server. Provides chDB — embedded ClickHouse SQL in Python with 1000+ functions, Session for stateful multi-step pipelines, parametrized queries, and cross-source joins via `s3()`, `mysql()`, `postgresql()`, `iceberg()`, `deltaLake()`, `remoteSecure()` table functions. TRIGGER when: user wants SQL on parquet/csv/files or across remote analytical sources; uses ClickHouse SQL features (window functions, windowFunnel, geoToH3, JSON path ops, Session, parametrized queries); imports `chdb` or calls `chdb.query()`. SKIP this skill for pandas-style DataFrame method-chaining (use chdb-datastore instead) or ClickHouse server administration.0 installs

More from ClickHouse

View source →
clickhouse-best-practicesMUST USE when reviewing ClickHouse schemas, queries, native full-text search, or configurations. Contains 36 rules that MUST be checked before providing recommendations. Always read relevant rule files and cite specific rules in responses.2 installschdb-datastoreUse when the user has tabular data (pandas DataFrame, parquet, csv, Arrow, json) and wants to filter, group, aggregate, join, or speed up slow pandas. Provides chDB DataStore — same pandas API, ClickHouse engine underneath. Also handles reading from S3, MySQL, PostgreSQL, MongoDB, ClickHouse Cloud, Iceberg, Delta Lake as DataFrames and joining across sources. TRIGGER when: user mentions DataFrame, parquet, csv, "fast pandas", "speed up pandas", or cross-source DataFrame joins; user imports `chdb.datastore` or `from datastore import DataStore`. SKIP this skill for raw SQL syntax (use chdb-sql instead), ClickHouse server administration, or non-Python DataStore API work.1 installsclickhouse-managed-postgres-rcaMUST USE when investigating performance issues on a ClickHouse-managed Postgres instance. Provides an evidence-based RCA workflow that scrapes the Prometheus endpoint for system signal, pulls per-digest evidence from the Slow Query Patterns API, and recommends (does not apply) a fix.1 installsinfra-postgresSets up and manages Postgres using the clickhousectl CLI — runs a local Docker-backed Postgres for development, and creates and operates managed ClickHouse Cloud Postgres services (connections, TLS, runtime config, read replicas, failover, point-in-time restore). Use when the user wants a Postgres or PostgreSQL database for their application, a local Postgres dev environment, psql access, or a managed/production Postgres in ClickHouse Cloud, or mentions moving a local Postgres to production. Also use when migrating an existing Postgres database (Neon, Supabase, RDS, Aurora, Cloud SQL, self-hosted) into ClickHouse Cloud Postgres.0 installsclickhousectl-cloud-deployUse when a user wants to deploy ClickHouse to the cloud, go to production, use ClickHouse Cloud, host a managed ClickHouse service, or migrate from a local ClickHouse setup to ClickHouse Cloud.0 installsclickhouse-architecture-advisorMUST USE when designing ClickHouse architectures, selecting between ingestion or modeling patterns, or translating best practices into workload-specific system designs. Complements clickhouse-best-practices with decision frameworks and explicit provenance labels.0 installs

More Build skills

Browse category →
senior-frontendBuild and review React, Next.js, TypeScript or Tailwind frontends: components, scaffolding, performance and bundle size. Use whenever the user wants a new component or app, a page feels slow, the bundle is too big, or asks for a frontend code review.642 installsui-design-systemUse when building a design system: tokens, component docs, responsive scales or developer handoff. Generates tokens with design_token_generator.py.546 installsfrontend-designGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.353 installssenior-backendBuild and fix backend services: REST or GraphQL APIs, auth, microservices, PostgreSQL queries, migrations and load tests. Use whenever the user's API is slow or broken, needs login or auth added, a schema change, or a new endpoint or service scaffolded.252 installsself-improving-agentCurate what the agent has learned into durable project knowledge. Reviews Claude Code auto-memory (MEMORY.md and its topic files) for learnings worth keeping, promotes proven ones into CLAUDE.md or .claude/rules/, records a correction as a lesson that persists across sessions, prunes stale or duplicate entries, and turns a recurring fix into a reusable skill. Use whenever the user asks what you have learned or saved about the project, which memories should become permanent rules, to remember a lesson or stop repeating a mistake, or to clean up, audit or check memory health.179 installsusing-superpowersUse when starting any conversation - establishes how to find and use skills, requiring skill invocation before ANY response including clarifying questions146 installs

Frequently asked questions about clickhouse-js-node-coding

What does the clickhouse-js-node-coding skill do?

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. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.

How do I install the clickhouse-js-node-coding skill?

Run `npx @skills-hub-ai/cli install clickhouse-clickhouse-js-node-coding` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/clickhouse-clickhouse-js-node-coding/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.

Which AI tools does clickhouse-js-node-coding work with?

clickhouse-js-node-coding runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.

Is the clickhouse-js-node-coding skill free?

Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.

How do I use clickhouse-js-node-coding after installing it?

In Claude Code, type `/clickhouse-clickhouse-js-node-coding` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.

Can I share the clickhouse-js-node-coding skill with my team?

Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.