clickhouse
Skill15 starsChanged 42 days agoMITView on GitHub
Expert ClickHouse columnar database assistance covering MergeTree engines, materialized views, vector search, and real-time ingestion. Use when querying analytical telemetry, logs, time-series data, or building analytics APIs.
7 other projects use a version of this.
Adopted by
Most recently taken up by
- MMACABRE/SKILLStheir own version, first seen Nov 8, 2026
- speakeasy-api/gramtheir own version, first seen Nov 6, 2026
- base58ed/claude_code_filestheir own version, first seen Oct 20, 2026
- nc9/skillstheir own version, first seen Sep 19, 2026
- muxammadmamajonov/dot-claudetheir own version, first seen Jul 6, 2026
- cline/skillstheir own version, first seen Jun 18, 2026
Other versions7 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 7
- speakeasy-api/gram★ 277same name
- cline/plugins★ 36same name
- cline/skills★ 35same name
- nc9/skills★ 4same name
- base58ed/claude_code_files★ 1same name
- MMACABRE/SKILLS★ 1same name
- muxammadmamajonov/dot-claude★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository350 other files it gives its agents.
- airflowSkill
- catboostSkill
- claudeSkill
- comfyuiSkill
- cursor-aiSkill
- dalleSkill
- daskSkill
- dbtSkill
- deepseekSkill
- fastaiSkill
- geminiSkill
- github-copilotSkill
- huggingfaceSkill
- jaxSkill
- jupyterSkill
- kerasSkill
- langchainSkill
- lightgbmSkill
- llamaindexSkill
- llamaSkill
- matplotlibSkill
- midjourneySkill
- mistralSkill
- mlflowSkill
- nltkSkill
- numpySkill
- ollamaSkill
- openai-gptSkill
- opencvSkill
- pandasSkill
- perplexitySkill
- plotlySkill
- polarsSkill
- pytorchSkill
- raySkill
- scikit-learnSkill
- seabornSkill
- spacySkill
- sparkSkill
- stable-diffusionSkill
- tensorflowSkill
- vaexSkill
- weights-biasesSkill
- whisperSkill
- xgboostSkill
- api-gatewaySkill
- clean-architectureSkill
- cqrsSkill
- domain-driven-designSkill
- event-drivenSkill
- event-sourcingSkill
- graphqlSkill
- grpcSkill
- hexagonalSkill
- microservicesSkill
- modular-monolithSkill
- monolithSkill
- rest-apiSkill
- sagaSkill
- serverlessSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 1 is distinctive, and 4 are very specific to this project.
0
Common
Most of the 7 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 101
Use ReplacingMergeTree with primary sorting key:
- Very specific: line 124
Use LowCardinality(String): Compress string columns with fewer than 10,000 unique values into indexed integer dictionaries.
- Very specific: line 126
Use ReplacingMergeTree for Deduplication: Deduplicate rows based on version numbers during background merges.
- Distinctive: line 131
Use ClickHouse for transactional OLTP: ClickHouse does not support ACID row locking, single-record updates, or foreign key cascades.
- Very specific: line 132
Create too many partitions: Keep partition counts under 1,000 per table.
“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
ClickHouse
ClickHouse is a columnar DBMS for Online Analytical Processing (OLAP). It is famous for allowing real-time generation of analytical reports using SQL queries on petabytes of data.
When to Use
- Real-Time OLAP Analytics: Aggregating billions of rows per second for real-time dashboards, security SIEMs, and web analytics.
- High-Compression Columnar Storage: Compressing raw event logs by 80-90% using LZ4 and ZSTD column-level codecs.
- Ad-Hoc Analytical Queries: Executing complex aggregations, window functions, and multi-billion-row vector queries in milliseconds.
- Observability Data Stores: Powering log and trace storage backends (e.g. replacing Elasticsearch for OpenTelemetry metrics and logs).
Quick Start
SELECT
toStartOfHour(EventTime) as Hour,
count(),
avg(Duration)
FROM events
GROUP BY Hour
ORDER BY HourCore Concepts
MergeTree Engine Family
The foundational storage engine for ClickHouse; writes data in immutable sorted parts and merges them asynchronously in the background:
CREATE TABLE analytics.page_views
(
event_time DateTime64(3, 'UTC'),
site_id UInt32,
user_id UUID,
url_path LowCardinality(String),
response_time_ms UInt16,
user_agent String CODEC(ZSTD(3))
)
ENGINE = MergeTree()
PARTITION BY toYYYYMM(event_time)
ORDER BY (site_id, event_time, user_id)
SETTINGS index_granularity = 8192;Materialized Views with AggregatingMergeTree
Precomputes rolling aggregations at insertion time with zero background batch job overhead:
-- Pre-aggregated Hourly Metrics
CREATE TABLE analytics.hourly_traffic
(
hour DateTime,
site_id UInt32,
total_views SimpleAggregateFunction(sum, UInt64),
unique_visitors AggregateFunction(uniq, UUID)
)
ENGINE = AggregatingMergeTree()
ORDER BY (site_id, hour);
CREATE MATERIALIZED VIEW analytics.hourly_traffic_mv TO analytics.hourly_traffic AS
SELECT
toStartOfHour(event_time) AS hour,
site_id,
count() AS total_views,
uniqState(user_id) AS unique_visitors
FROM analytics.page_views
GROUP BY hour, site_id;Vectorized SIMD Query Execution
ClickHouse processes data in vectorized arrays of column primitives, utilizing hardware CPU SIMD instructions to aggregate millions of values per cycle:
-- Sub-10ms aggregation over 50,000,000 rows
SELECT
url_path,
count() AS hits,
quantile(0.95)(response_time_ms) AS p95_latency
FROM analytics.page_views
WHERE event_time >= now() - INTERVAL 24 HOUR
GROUP BY url_path
ORDER BY hits DESC
LIMIT 10;Common Patterns
ReplacingMergeTree for Deduplicated Real-Time Analytics
Problem: High-speed real-time event streaming frequently delivers duplicate logs or updated state rows.
Solution:
Use ReplacingMergeTree with primary sorting key:
CREATE TABLE telemetry.sensor_metrics (
sensor_id UInt32,
recorded_at DateTime64(3),
reading Float64,
version UInt64
)
ENGINE = ReplacingMergeTree(version)
ORDER BY (sensor_id, recorded_at);
-- Query latest state across parts
SELECT sensor_id, recorded_at, reading
FROM telemetry.sensor_metrics FINAL
WHERE sensor_id = 101;Best Practices
Do:
- Insert in Large Batches: Stream data in batches of 10,000 to 100,000 rows (or at 1-second intervals) to prevent creating excessive small parts.
- Use
LowCardinality(String): Compress string columns with fewer than 10,000 unique values into indexed integer dictionaries. - Order by Most-Filtered Columns First: Arrange primary sort keys from lowest cardinality to highest cardinality (
site_id,event_time,user_id). - Use
ReplacingMergeTreefor Deduplication: Deduplicate rows based on version numbers during background merges.
Don't:
- Perform single-row
INSERTstatements: Inserting single rows overwhelms the MergeTree engine and exhausts filesystem inodes. - Use ClickHouse for transactional OLTP: ClickHouse does not support ACID row locking, single-record updates, or foreign key cascades.
- Create too many partitions: Keep partition counts under 1,000 per table; partition by month (
toYYYYMM) rather than day.
Troubleshooting
| Error | Cause | Solution |
Too many parts in all data in table | Ingesting too many tiny micro-batches instead of large batches. | Buffer writes into batches of 10,000+ rows or use an asynchronous insert buffer. |
Memory limit exceeded for query | Query scanning uncompressed memory without proper partition filter. | Add WHERE filter on the primary key sorting prefix, or increase max_memory_usage. |
DB::Exception: Cannot parse input | Schema type mismatch during CSV/JSON ingestion. | Verify data format and use input_format_skip_unknown_fields = 1. |
References
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

