Agent skill · software engineering · jeremylongshore

clickhouse-local-dev-loop

Run ClickHouse locally with Docker, configure test fixtures, and iterate fast. Use when setting up a local ClickHouse dev environment, writing integration tests against ClickHouse, or running ClickHouse in Docker Compose for local work. Trigger with "clickhouse local dev", "clickhouse docker", "clickhouse dev environment", "run clickhouse locally", "clickhouse docker compose".

Why this skill is useful

Adds a complete Docker-Compose setup with scripts for schema migration, data seeding, and integration testing that aren't in public docs.

What it needs

Requires docker, docker-compose, node installed locally. About 3k tokens when loaded. Last updated 2026-08-07. 2,604 stars on the source repository.

What this skill does

ClickHouse Local Dev Loop Overview Run ClickHouse in Docker for local development with fast schema iteration, seed data, and integration testing using vitest. This skill scaffolds a Docker-Compose-based dev loop: an auto-migrating init script, a seed generator, a reusable client singleton, and a truncate-between-tests integration harness — so schema changes and query work stay a docker compose up away. Prerequisites Docker or Docker Compose installed and running (docker info succeeds). Node.js 18+ with the @clickhouse/client package for the seed/test scripts. A local project directory you can Write files into. No cloud account or network access is required — everything runs on localhost. Authentication This is a local dev setup with no external ClickHouse Cloud service. The container's credentials are declared inline in docker-compose.yml (CLICKHOUSEUSER: default, CLICKHOUSEPASSWORD: devpassword) and consumed by the client via env vars (CLICKHOUSEUSER, CLICKHOUSEPASSWORD, CLICKHOUSEHOST, CLICKHOUSEDATABASE). Keep real per-developer overrides in a git-ignored .env.local; commit only a .env.example. Never reuse devpassword outside local development. Instructions Follow the seven-step build. The lean skeleton is below; the full walkthrough carries the complete file contents for every step. 1. Docker Compose setup — Write a docker-compose.yml exposing 8123 (HTTP) and 9000 (native TCP), mounting ./init-db for auto-migration and a named volume for persistence: Then docker compose up -d and verify with curl http://localhost:8123/ping → Ok. 2. Init script — Write init-db/001-schema.sql with your CREATE DATABASE / CREATE TABLE ... ENGINE = MergeTree() DDL. ClickHouse auto-runs it on the container's first start. 3. Seed data — Write scripts/seed.ts that batch-inserts synthetic rows via client.insert({ format: 'JSONEachRow' }). 4. Project structure — lay out init-db/, scripts/, src/, tests/, and the .env.local / .env.example pair. 5. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills jeremylongshore/clickhouse-local-dev-loop

View the source on GitHub

Browse the @skills marketplace