# Clickhouse io

> Clickhouse io is an open-source agent skill for databases. Guides an agent on ClickHouse table design, analytical queries and bulk ingestion. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/smartworldarafath/REA_Skill/tree/main/.agents/skills/clickhouse-io
- **Repository:** https://github.com/smartworldarafath/rea_skill
- **GitHub stars:** 76
- **License:** MIT
- **Skill name:** clickhouse-io
- **Collection:** https://github.com/smartworldarafath/REA_Skill
- **Categories:** [databases](https://ai-powered.com/categories/databases)
- **Listing updated:** 2026-12-01

## About

This skill gives an agent a reference of ClickHouse patterns for analytical workloads. It covers choosing a MergeTree-family engine for a table, writing aggregation and window queries, and speeding up slow queries with partition pruning, pre-aggregated tables and materialized views. It also includes examples of batching inserts through a Node.js client and streaming data into tables.

The material is organized as code samples in SQL and TypeScript, along with queries against system tables such as query_log and parts that help find slow queries and check table sizes. It also includes typical analytics patterns like daily active users, retention, funnels and cohorts, plus a simple ETL loop and a PostgreSQL LISTEN-based change capture example.

Using the examples requires a ClickHouse server and, for the TypeScript samples, the @clickhouse/client package with connection settings supplied through environment variables. The skill contains no scripts; it only supplies guidance and snippets for the agent to adapt.

## When your agent uses it

> ClickHouse database patterns, query optimization, analytics, and data engineering best practices for high-performance analytical workloads. Use when writing ClickHouse schemas or queries, or when an analytical query is too slow.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/smartworldarafath/REA_Skill/tree/HEAD/.agents/skills/clickhouse-io)
- [License: MIT](https://github.com/smartworldarafath/REA_Skill/tree/HEAD/.agents/skills/clickhouse-io)

## Features

- **MergeTree engine selection:** Examples for choosing between MergeTree, ReplacingMergeTree and AggregatingMergeTree tables.
- **Analytical query patterns:** Aggregations, quantiles, window functions and filter ordering for fast reads.
- **Materialized view aggregation:** Hourly rollups built with state functions and merged at query time.
- **Batch insert guidance:** Bulk and streaming insert examples with a Node.js client, plus what to avoid.
- **Query performance monitoring:** Queries against system.query_log and system.parts to find slow queries and large tables.
- **Common analytics recipes:** Templates for daily active users, retention, conversion funnels and cohort analysis.
- **Pipeline sync examples:** ETL loop and PostgreSQL change capture examples feeding ClickHouse.

## Good for

- Design a MergeTree table partitioned by month for event data
- Rewrite a slow dashboard query to use a materialized view
- Compute retention and cohort tables from raw user events
- Set up batched inserts from a Node.js service into ClickHouse
- Find the slowest queries and largest tables on a ClickHouse server

## Install

### Claude Code

This skill ships in the `rea-skills` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add smartworldarafath/REA_Skill
/plugin install rea-skills@smartworldarafath
```

Or copy only this skill to `~/.claude/skills/clickhouse-io`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/clickhouse-io &&
cp -R "$tmp/.agents/skills/clickhouse-io" ~/.claude/skills/clickhouse-io &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/clickhouse-io` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/clickhouse-io` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/clickhouse-io &&
cp -R "$tmp/.agents/skills/clickhouse-io" ~/.agents/skills/clickhouse-io &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/clickhouse-io` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/clickhouse-io` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/clickhouse-io &&
cp -R "$tmp/.agents/skills/clickhouse-io" ~/.cursor/skills/clickhouse-io &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/clickhouse-io` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/smartworldarafath/REA_Skill.git --path .agents/skills/clickhouse-io
```

Or copy the folder to `~/.gemini/skills/clickhouse-io` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/clickhouse-io`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/clickhouse-io &&
cp -R "$tmp/.agents/skills/clickhouse-io" ~/.copilot/skills/clickhouse-io &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/clickhouse-io` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.git
```

Then copy `REA_Skill/.agents/skills/clickhouse-io` into your agent's skills folder as `clickhouse-io`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does Clickhouse io need to run?

The SQL examples need a ClickHouse server. The TypeScript examples use the @clickhouse/client package and read the connection URL, user and password from environment variables.

### Does Clickhouse io change files or run scripts?

No scripts are included. It only provides patterns and code samples the agent can adapt to the task.

### When does the skill activate?

It is meant for tasks involving writing ClickHouse schemas or queries, or when an analytical query is too slow.

### How do I install Clickhouse io in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/clickhouse-io to use it in all your projects, or to .claude/skills/clickhouse-io in one project. Or install the rea-skills plugin, which includes it: /plugin marketplace add smartworldarafath/REA_Skill, then /plugin install rea-skills@smartworldarafath.

### Does Clickhouse io run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Clickhouse io?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Clickhouse io?

The closest alternatives to Clickhouse io are SQL optimization, PostgreSQL optimization, Fabric lakehouse, Bigquery basics and Data layer patterns edho ferdian.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [SQL optimization](https://ai-powered.com/skills/sql-optimization): SQL optimization is an open-source agent skill for databases.
- [PostgreSQL optimization](https://ai-powered.com/skills/postgresql-optimization): PostgreSQL optimization is an open-source agent skill for databases.
- [Fabric lakehouse](https://ai-powered.com/skills/fabric-lakehouse): Fabric lakehouse is an open-source agent skill for cloud and infrastructure.
- [Bigquery basics](https://ai-powered.com/skills/bigquery-basics): Bigquery basics is an open-source agent skill for databases.
- [Data layer patterns edho ferdian](https://ai-powered.com/skills/data-layer-patterns-edho-ferdian): Data layer patterns edho ferdian is an open-source agent skill for databases.
- [Bigquery optimization](https://ai-powered.com/skills/bigquery-optimization): Bigquery optimization is an open-source agent skill for databases.
- [Bigtable basics](https://ai-powered.com/skills/bigtable-basics): Bigtable basics is an open-source agent skill for databases.
- [Go database](https://ai-powered.com/skills/go-database): Go database is an open-source agent skill for databases.

---
Source: https://ai-powered.com/skills/clickhouse-io
