infra-clickhouse

作者: clickhouse

Sets up and manages ClickHouse using the clickhousectl CLI — installs and runs a local ClickHouse server for development, and creates managed ClickHouse Cloud…

npx skills add https://github.com/clickhouse/agent-skills --skill infra-clickhouse

ClickHouse with clickhousectl

clickhousectl manages ClickHouse in two environments:

  • Local — ClickHouse installed and running on the user's machine, for development.
  • Cloud — managed ClickHouse Cloud services, for production: fully managed, automatic scaling, backups, and upgrades.

This file routes to the right reference. The step-by-step workflows live in ref/local.md and ref/cloud.md — read the one that matches the user's situation before running commands.

Which reference to use

The user wants to...Read
Build an app with ClickHouse, develop or prototype locally, no cloud account neededref/local.md
Go to production, host a managed ClickHouse, or use ClickHouse Cloud explicitlyref/cloud.md
Operate an existing cloud service (schemas, users, queries against it)ref/cloud.md
Develop locally now, ship to production laterStart with ref/local.md; it points to ref/cloud.md when it's time to go to prod

If it's genuinely ambiguous (e.g. "set up ClickHouse for my app"), default to local for development tasks and ask before creating anything in the cloud — cloud services cost money.

Prerequisites (both workflows)

Check that clickhousectl is installed:

which clickhousectl

If not found, install it:

curl -fsSL https://clickhouse.com/cli | sh

This installs to ~/.local/bin/clickhousectl (with a chctl alias). If the command is still not found, suggest export PATH="$HOME/.local/bin:$PATH" or a new terminal.

All commands accept --json for machine-readable output. Exit codes follow gh conventions: 0 success, 1 error, 2 cancelled, 4 auth required.

Related

  • When designing schemas, consult the clickhouse-best-practices skill for ORDER BY selection, data types, and partitioning.
  • For Postgres (local development or managed ClickHouse Cloud Postgres), use the infra-postgres skill.

来自 clickhouse 的更多技能

clickhouse-best-practices
clickhouse
28条ClickHouse最佳实践规则,按模式设计、查询优化和数据摄入策略组织。涵盖三个关键领域:主键与数据类型选择(不可变设计决策)、JOIN与查询优化、批量插入与避免突变。包含28条按影响程度排序的规则,其中模式设计和查询优化规则因ClickHouse的列式存储和稀疏索引机制被标记为关键。提供结构化审查流程用于...
official
clickhouse-js-node-coding
clickhouse
Write idiomatic application code with the ClickHouse Node.js client (`@clickhouse/client`). Use this skill whenever a user is *building* against the Node.js…
official
clickhousectl-cloud-deploy
clickhouse
当用户希望将ClickHouse部署到云端、投入生产环境、使用ClickHouse Cloud、托管托管式ClickHouse服务,或从本地迁移时使用…
official
clickstack-otel-collector
clickhouse
Use when a user wants to wire an OpenTelemetry collector into a Managed ClickStack service on ClickHouse Cloud, either by deploying a new local collector…
official
infra-postgres
clickhouse
Sets up and manages Postgres using the clickhousectl CLI — runs a local Docker-backed Postgres for development, and creates and operates managed ClickHouse…
official
clickhouse-best-practices
clickhouse
在审查ClickHouse模式、查询或配置时必须使用。包含31条在提供建议前必须检查的规则。始终阅读…
official
setup
clickhouse
引导用户完成此插件附带的ClickHouse MCP服务器连接的设置。在用户首次安装插件或遇到问题时使用…
official
triage-issues
clickhouse
Analyzes a single GitHub issue at a time. Reads the description, defines labels and priority, researches additional information, and provides a short but…
official