Use 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.
80
100%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Low
Low-risk findings worth noting
This skill walks through setting up a complete local ClickHouse development environment using clickhousectl. Follow these steps in order.
Use this skill when the user wants to:
Check if clickhousectl is already available:
which clickhousectlIf not found, install it:
curl -fsSL https://clickhouse.com/cli | shThis installs clickhousectl to ~/.local/bin/clickhousectl and creates a chctl alias.
If the command is still not found after install: The user may need to add ~/.local/bin to their PATH or open a new terminal session. Suggest:
export PATH="$HOME/.local/bin:$PATH"Install the latest stable ClickHouse version:
clickhousectl local install stableThis downloads the ClickHouse binary to ~/.clickhouse/versions/. The binary is shared across projects so it only needs to be downloaded once.
Alternative version specifiers (use if the user has a specific need):
lts — latest long-term support release25.12 — latest patch of a specific minor version25.12.5.44 — exact versionSet the installed version as the default:
clickhousectl local use stableFrom the user's project root directory:
clickhousectl local initThis creates a standard folder structure:
clickhouse/
tables/ # CREATE TABLE statements
materialized_views/ # Materialized view definitions
queries/ # Saved queries
seed/ # Seed data / INSERT statementsNote: This step is optional. If the user already has their own folder structure for SQL files, skip this and adapt the later steps to use their paths.
clickhousectl local server start --name <name>This starts a ClickHouse server in the background. Server data is stored in .clickhouse/servers/<anem>/data/ within the project directory.
To check running servers and see their exposed ports:
clickhousectl local server listBased on the user's application requirements, write CREATE TABLE SQL files.
Write each table definition to its own file in clickhouse/tables/:
# Example: clickhouse/tables/events.sqlCREATE TABLE IF NOT EXISTS events (
timestamp DateTime,
user_id UInt32,
event_type LowCardinality(String),
properties String
)
ENGINE = MergeTree()
ORDER BY (event_type, timestamp)When designing schemas, if the clickhouse-best-practices skill is available, consult it for guidance on ORDER BY column selection, data types, and partitioning.
Apply the schema to the running server:
clickhousectl local client --name <name> --queries-file clickhouse/tables/events.sqlIf the user needs sample data for development, write INSERT statements to clickhouse/seed/:
# Example: clickhouse/seed/events.sqlINSERT INTO events (timestamp, user_id, event_type, properties) VALUES
('2024-01-01 00:00:00', 1, 'page_view', '{"page": "/home"}'),
('2024-01-01 00:01:00', 2, 'click', '{"button": "signup"}');Apply seed data:
clickhousectl local client --name <name> --queries-file clickhouse/seed/events.sqlConfirm tables were created:
clickhousectl local client --name <name> --query "SHOW TABLES"Run a test query:
clickhousectl local client --name <name> --query "SELECT count() FROM events"If the user wants to use a managed ClickHouse service, use the clickhousectl-cloud-deploy skill to help the user deploy to ClickHouse Cloud.
8d347f8
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.