clickhouse-js-node-coding

clickhouse-js-node-coding is a skill for Claude Code, Codex from ClickHouse/agent-skills. It costs 89 tokens per session (2,165 once invoked), scanned A, original, Apache-2.0.

A guide for writing Node.js application code with the official ClickHouse client library, @clickhouse/client. It covers connections, inserts, queries, parameters, and sessions.

In plain words
What is it for?
Use it when configuring the client, inserting or selecting data, binding query parameters, managing sessions, or closing connections in Node.js applications.
Why use it?
It helps use the correct client and runtime, avoiding browser or edge environments that this Node.js guide does not support.

Skill for Claude CodeCodex

Part of the clickhouse-best-practices plugin — 11 skills shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/clickhouse/agent-skills/clickhouse-js-node-coding
Any agent
npx skills add ClickHouse/agent-skills --skill clickhouse-js-node-coding
Clone the repo
git clone --depth 1 https://github.com/ClickHouse/agent-skills

Made for: Claude Code, Codex.

Or install clickhouse-best-practices, the plugin that ships this one along with the rest of its 11 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for clickhouse-js-node-coding

README.md
[![agentmods](https://agentmods.dev/badge/skills/clickhouse/agent-skills/clickhouse-js-node-coding.svg)](https://agentmods.dev/skills/clickhouse/agent-skills/clickhouse-js-node-coding)
Your own site
<a href="https://agentmods.dev/skills/clickhouse/agent-skills/clickhouse-js-node-coding"><img src="https://agentmods.dev/badge/skills/clickhouse/agent-skills/clickhouse-js-node-coding.svg" alt="Measured on agentmods" height="20"></a>
Per session 89 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,165 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00089 $0.02165
Opus 5 $0.00044 $0.01082
Sonnet 5 $0.00018 $0.00433
Haiku 4.5 $0.00009 $0.00216

Measured 4d ago against content hash 6dd189aaf023, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

clickhouse-js-node-coding scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/clickhouse-js-node-coding/SKILL.md · 142 lines

How it starts

The opening of the file, as written. The whole thing — 142 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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

Read the full file on GitHub · 142 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 142 lines · 89 tokens per session scan A 6dd189aaf023

Subscribe to this mod's changes

clickhouse-js-node-coding is a skill published in the GitHub repository ClickHouse/agent-skills (523 stars, last pushed 28d ago), licensed Apache-2.0. It adds 89 tokens to every session and 2,165 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

use-gfs-mcp

GFS MCP Server for AI agent integration. Provides Model Context Protocol tools for database version control with automatic schema versioning.

Guepard-Corp/gfs · 30 tokens

use-gfs-cli

Git-like version control for databases using the GFS CLI. Manage database states with commits, branches, time travel, and schema versioning.

Guepard-Corp/gfs · 33 tokens

bigquery-graph

Skill for Graph Query Language (GQL) or SQL/PGQ queries against a property graph. Includes path finding, multi-hop traversal, topological connection, shortest path, node reachability, edge connectivity, and semantic graph queries.

google/adk-python · 52 tokens

dbx

DBX CLI for database schema exploration and read-only queries. When the user needs to list connections, explore tables, describe schemas, run queries, or generate AI-friendly schema context from DBX-managed databases. Do NOT use for write operations unless the user explicitly confirms with --allow-writes.

t8y2/dbx · 61 tokens

migration-review

Review database migration files when a change adds or modifies paths under migrations/. Use it before merge to collect forward, rollback, locking, and data-safety evidence.

rohitg00/ai-engineering-from-scratch · 35 tokens

azure-resource-manager-postgresql-dotnet

Azure PostgreSQL Flexible Server SDK for .NET. Database management for PostgreSQL Flexible Server deployments. Use for creating servers, databases, firewall rules, configurations, backups, and high availability. Triggers: "PostgreSQL", "PostgreSqlFlexibleServer", "PostgreSQL Flexible Server", "Azure Database for…

microsoft/skills · 97 tokens