Agent skill · software engineering · jeremylongshore

clickhouse-deploy-integration

Deploy ClickHouse-backed applications to Vercel, Fly.io, and Cloud Run with connection pooling, secrets, and health checks. Use when deploying applications that connect to ClickHouse Cloud, configuring platform secrets, or setting up deployment pipelines to serverless or container hosts. Trigger with "deploy clickhouse app", "clickhouse Vercel", "clickhouse Cloud Run", "clickhouse production deploy", "clickhouse Fly.io".

Why this skill is useful

Adds specific deployment patterns and connection management techniques for ClickHouse applications on multiple platforms that the AI wouldn't reliably generate on its own.

What it needs

Requires fly, gcloud, vercel installed locally. Requires clickhouse account access. About 3k tokens when loaded. Last updated 2026-08-07. 2,604 stars on the source repository.

What this skill does

ClickHouse Deploy Integration Overview Deploy applications that connect to ClickHouse Cloud from serverless and container platforms with proper connection management and secrets handling. The same platform-agnostic connection module drives all three targets — Vercel, Fly.io, and Cloud Run — so only the secrets mechanism and runtime model change per platform. Prerequisites ClickHouse Cloud instance (or self-hosted with public endpoint) Platform CLI installed (vercel, fly, or gcloud) Application tested locally against ClickHouse Instructions Step 1: ClickHouse Connection Module (Platform-Agnostic) Write a singleton client so a serverless cold start reuses one connection instead of opening a new pool per invocation. Keep maxopenconnections low for serverless and enable compression to cut egress. Step 2: Pick a platform and deploy Choose the target that matches your runtime model, then set secrets and deploy. All three import the getClickHouse() module above unchanged. Vercel (serverless functions) — vercel env add per secret; best for API endpoints. Keep maxopenconnections at 1-3. Fly.io (containers) — fly secrets set + a fly.toml health check; best for long-running apps with persistent connections. Cloud Run (containers) — secrets via Secret Manager (--set-secrets); best for event-driven workloads. Set --min-instances=1 to avoid cold-start connection churn. Full per-platform commands, the Next.js App Router query example, fly.toml, the Cloud Run deploy script, and a platform comparison table: Platform deployment walkthrough. Step 3: Add health check and graceful shutdown Expose a /health endpoint that pings ClickHouse (drives Fly.io / Cloud Run readiness probes) and close the client on SIGTERM/SIGINT so pending inserts flush before the container is recycled. Full code: Production patterns. Output Running this skill produces a deployable ClickHouse-connected application: src/db.ts — a singleton ClickHouse client, serverless-safe and compressed. …

How to use it

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

@skills jeremylongshore/clickhouse-deploy-integration

View the source on GitHub

Browse the @skills marketplace