Agent skill · data analytics · jeremylongshore
clickhouse-hello-world
Create your first ClickHouse table, insert data, and run analytical queries. Use when starting a new ClickHouse project, learning MergeTree basics, or testing your ClickHouse connection with real operations. Trigger with "clickhouse hello world", "first clickhouse table", "clickhouse quick start", "create clickhouse table", "clickhouse example".
Why this skill is useful
Provides specific commands and patterns for using ClickHouse's MergeTree engine that the AI wouldn't reliably generate on its own.
What it needs
Requires @clickhouse/client installed locally. About 3k tokens when loaded. Last updated 2026-08-07. 2,604 stars on the source repository.
What this skill does
ClickHouse Hello World Overview Create a MergeTree table, insert rows with JSONEachRow, and run your first analytical query -- all using the official @clickhouse/client. This is the smoke test that proves your connection works and teaches the four MergeTree concepts (ORDER BY, PARTITION BY, TTL, LowCardinality) reused in every real schema. Prerequisites @clickhouse/client installed and connected (see the clickhouse-install-auth skill for connection setup). A reachable ClickHouse server (local Docker, ClickHouse Cloud, or self-hosted) with CLICKHOUSEHOST / CLICKHOUSEUSER / CLICKHOUSEPASSWORD set as environment variables. Instructions Step 1: Create a MergeTree Table Key concepts: MergeTree() -- the foundational ClickHouse engine for analytics ORDER BY -- defines the primary index (sort key); pick columns you filter/group on PARTITION BY -- splits data into parts by month for efficient pruning TTL -- automatic data expiration LowCardinality(String) -- dictionary-encoded string, ideal for columns with < 10K distinct values For the full engine menu (ReplacingMergeTree, SummingMergeTree, etc.) and the column-type table, see MergeTree engines & data types. Step 2: Insert Data with JSONEachRow Step 3: Query the Data Step 4: Explore System Tables (optional) Once data lands, inspect on-disk size and part counts via system.parts to confirm your partitioning is healthy. Full query and column reference: exploring system tables. Output Running the three core steps against a fresh table produces: Step 1 -- Table "events" created. (idempotent via IF NOT EXISTS). Step 2 -- Inserted 5 events. Step 3 -- one aggregated row per eventtype, sorted by count descending: ClickHouse returns numeric aggregates as JSON strings, so cast total / uniqueusers before doing arithmetic in TypeScript. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills jeremylongshore/clickhouse-hello-world