clickhouse

clickhouse is a skill for Claude Code, Codex from alivirgo/Major-AI-Skills. It costs 23 tokens per session (798 once invoked), scanned A, original, MIT.

A guide to ClickHouse, a database built for fast analysis of large, append-heavy datasets. It explains tables, time partitions, data ingestion, and analytical SQL queries.

In plain words
What is it for?
Use it to design ClickHouse tables, load data in batches, tune queries and indexes, and build dashboards over high-volume records.
Why use it?
It helps avoid slow scans, inefficient small writes, and poor table layouts when working with event or metrics data.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Codex.

Part of the major-ai-skills plugin — 147 skills, 7 plugins shipped together

Good fit Use it to design ClickHouse tables, load data in batches, tune queries and indexes, and build dashboards over high-volume records.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/alivirgo/major-ai-skills/clickhouse
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add alivirgo/Major-AI-Skills --skill clickhouse
Clone the repo
git clone --depth 1 https://github.com/alivirgo/Major-AI-Skills

Made for: Claude Code, Codex.

Or install major-ai-skills, the plugin that ships this one along with the rest of its 147 skills, 7 plugins.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for clickhouse

README.md
[![agentmods](https://agentmods.dev/badge/skills/alivirgo/major-ai-skills/clickhouse/github.svg)](https://agentmods.dev/skills/alivirgo/major-ai-skills/clickhouse)
Your own site
<a href="https://agentmods.dev/skills/alivirgo/major-ai-skills/clickhouse"><img src="https://agentmods.dev/badge/skills/alivirgo/major-ai-skills/clickhouse/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for clickhouse

Your own site · 80×15
<a href="https://agentmods.dev/skills/alivirgo/major-ai-skills/clickhouse"><img src="https://agentmods.dev/badge/skills/alivirgo/major-ai-skills/clickhouse.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 23 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 798 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00023 $0.00798
Opus 5 $0.00012 $0.00399
Sonnet 5 $0.00005 $0.00160
Haiku 4.5 $0.00002 $0.00080

Measured yesterday against content hash 6121bc45f4ca, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

clickhouse scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/clickhouse/SKILL.md · 101 lines

How it starts

The opening of the file, as written. The whole thing — 101 lines — stays where its author put it; the contents beside it link to each section on GitHub.

ClickHouse OLAP AI Skill Guide

Overview & Engine Architecture

ClickHouse is a columnar OLAP DBMS optimized for high-ingest analytics. MergeTree-family engines store data sorted by primary key; partitions prune scans; background merges compact parts. Agents design ORDER BY for filter/range patterns, avoid finalizing huge SELECT *, and prefer batch inserts over tiny single-row writes.

Insert batches -> parts on disk
      -> MergeTree merges
      -> SELECT with partition + primary-key pruning

When to use this skill

  • Event/metrics analytics at high cardinality and volume
  • Real-time-ish dashboards over wide denormalized facts
  • Replacing slower row-store aggregations for append-heavy data

Operational directives

  1. Choose ORDER BY for the most selective filters and ranges you actually query.
  2. Partition by time (e.g. month) - not by high-cardinality ids.
  3. Insert in large batches; tiny inserts create part storms.
  4. Use FINAL sparingly (ReplacingMergeTree) - prefer dedupe in ETL or argMax.
  5. Set quotas/timeouts for ad-hoc users on shared clusters.

Table + query example

CREATE TABLE events.page_views
(
  event_date Date,
  event_time DateTime,
  user_id UInt64,
  path LowCardinality(String),
  duration_ms UInt32
)
ENGINE = MergeTree
PARTITION BY toYYYYMM(event_date)
ORDER BY (path, user_id, event_time)
TTL event_date + INTERVAL 180 DAY;

INSERT INTO events.page_views
SELECT * FROM input('event_date Date, event_time DateTime, user_id UInt64, path String, duration_ms UInt32')
FORMAT Parquet;

SELECT path, count() AS views, avg(duration_ms)
FROM events.page_views
WHERE event_date >= today() - 7 AND path = '/pricing'
GROUP BY path;

Useful introspection

SHOW CREATE TABLE events.page_views;
SELECT * FROM system.query_log ORDER BY event_time DESC LIMIT 20;
EXPLAIN indexes = 1
SELECT count() FROM events.page_views WHERE path = '/pricing';

Common failures

Symptom Cause Fix
Too many parts small inserts / bad partitions batch; fix PARTITION BY
Full scan ORDER BY mismatch rewrite order; projections
Memory limit huge GROUP BY approx functions; limit cardinality
Mutation lag heavy ALTER UPDATE/DELETE redesign for append; lightweight deletes carefully

Read the full file on GitHub · 101 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday Changed · -1 tokens per session 6121bc45f4ca
  2. 6d ago First seen · 101 lines · 24 tokens per session scan A 226a4e6eb7bf

Subscribe to this mod's changes

clickhouse is a skill published in the GitHub repository alivirgo/Major-AI-Skills (1 stars, last pushed today), licensed MIT. It adds 23 tokens to every session and 798 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-05.

Related

Other skills, from other repositories

clickhouse-analytics

Use when running a ClickHouse server for high-volume OLAP: choosing a MergeTree engine and ORDER BY/PARTITION BY keys, ingesting billions of event/log/metric rows, pre-aggregating with materialized views, or fixing a query that scans instead of pruning. NOT in-process file analytics (that is duckdb), NOT OLTP CRUD…

ericrisco/rsc-harness · 86 tokens

duckdb

Use when analytical SQL must run in-process with no server: Parquet/CSV/JSON/Arrow queried in place, OLAP embedded in an app or notebook, a slow pandas groupby on multi-GB data, or S3/lakehouse data read without downloading. NOT a multi-user analytics server (that is clickhouse-analytics), NOT an app's transactional…

ericrisco/rsc-harness · 85 tokens

mysql-expert

Design, optimize, and maintain MySQL databases. Covers schema design, indexing strategies, query optimization, replication, and performance tuning.

AtulPurohit/Antigravity-Awesome-Skills · 30 tokens

postgresql-expert

Design, optimize, and administer PostgreSQL databases. Covers advanced indexing, partitioning, full-text search, JSON operations, replication, and performance tuning.

AtulPurohit/Antigravity-Awesome-Skills · 35 tokens

chdb-datastore

Use when the user has tabular data (pandas DataFrame, parquet, csv, Arrow, json) and wants to filter, group, aggregate, join, or speed up slow pandas. Provides chDB DataStore — same pandas API, ClickHouse engine underneath. Also handles reading from S3, MySQL, PostgreSQL, MongoDB, ClickHouse Cloud, Iceberg, Delta Lake…

chdb-io/chdb · 168 tokens

chdb-sql

Use when the user wants to run SQL — especially analytical SQL — on local files (parquet/csv/json), URLs, S3 paths, or remote databases (Postgres, MySQL, MongoDB, ClickHouse Cloud, Iceberg, Delta Lake) without setting up a server. Provides chDB — embedded ClickHouse SQL in Python with 1000+ functions, Session for…

chdb-io/chdb · 214 tokens