Agent skill

Concept Explainer

by chmonitor in chmonitor/chmonitor

Explains core ClickHouse concepts with accurate mental models — MergeTree, indexes, replication, sharding, and special engines.

GPL-3.0Auto-check passedDatabases

Install Concept Explainer

skills CLI
$ npx skills add chmonitor/chmonitor --skill concept-explainer -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install chmonitor/chmonitor concept-explainer --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/chmonitor/chmonitor.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/concept-explainer .claude/skills/concept-explainer && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
concept-explainer
GitHub stars
298
Token cost
~2.1k tokens
SKILL.md length
1,006 words
Files
1
Skills in repo
53
Repo updated
First seen
Licence
GPL-3.0

At a glance

Explains core ClickHouse concepts with accurate mental models — MergeTree, indexes, replication, sharding, and special engines.

  • Works in 3 steps: One replica receives an insert, writes a… → Other replicas see the log entry and… → Each replica applies merges…
  • Tasks that involve Database administration
  • SKILL.md covers MergeTree Family & How Merges…, Sparse Primary Index / Primary…, ORDER BY vs PARTITION BY vs… and Columnar Storage & Compression, plus 5 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Concept Explainer is an agent skill from chmonitor/chmonitor. Explains core ClickHouse concepts with accurate mental models — MergeTree, indexes, replication, sharding, and special engines.

Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Databases, covering Database administration, Data warehousing and Tutoring and explanations. It works with ClickHouse. The repository describes itself as: Open-source operational advisor for ClickHouse — real-time monitoring plus AI-driven index/partition/materialized-view recommendations. The licence is GPL-3.0.

When your agent uses it

  • Tasks that involve Database administration
  • Tasks that involve Data warehousing
  • Tasks that involve Tutoring and explanations

Example prompts

  • “Use the concept-explainer skill to explain core ClickHouse concepts with accurate mental models — MergeTree, indexes, replication, sharding, and…”
  • “/concept-explainer”

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. One replica receives an insert, writes a part locally, and logs the operation to Keeper.
  2. Other replicas see the log entry and fetch the part (either from the leader or from each other).
  3. Each replica applies merges independently but uses Keeper to agree on which parts to merge so they converge to identical state.

What it can do on your machine

Read from SKILL.md and the folder at commit fc39ef0. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are sql).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Concept Explainer loads about 2.1k tokens when it runs. Until then it costs about 36 tokens; SKILL.md has 1,006 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~36
When it runs · the whole SKILL.md, loaded when a task matches
~2.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from chmonitor/chmonitor at commit fc39ef0, republished under its GPL-3.0 licence (© chmonitor). 1,006 words, ~2,107 tokens.

Download SKILL.mdSave it as .claude/skills/concept-explainer/SKILL.md (or your agent's skills folder).
name
concept-explainer
description
Explains core ClickHouse concepts with accurate mental models — MergeTree, indexes, replication, sharding, and special engines.

ClickHouse Concept Explainer

Use this skill when a user asks "what is X", "explain Y", or "how does Z work". Give the right mental model first, add a concrete example, then offer to go deeper. Tailor detail to the user's apparent experience level.

MergeTree Family & How Merges Work

Every insert creates one or more immutable parts on disk (a directory of column files + index). ClickHouse merges these parts in the background — combining small parts into larger ones, re-sorting data, applying deduplication or aggregation depending on the engine variant. Until a merge happens, the same logical row may exist across multiple parts.

Why small inserts are bad: each INSERT of 10 rows creates a tiny part. Parts accumulate faster than the background merger can keep up, hitting the too many parts error (default threshold: 300 parts per partition). Always batch at least 1 000–10 000 rows per insert; use async inserts for high-frequency small writes.

sql
-- Check live part counts per table
SELECT table, count() AS parts, sum(rows) AS total_rows
FROM system.parts
WHERE active AND database = currentDatabase()
GROUP BY table ORDER BY parts DESC;

Cross-reference: clickhouse-best-practices for insert batching settings.

Sparse Primary Index / Primary Key

ClickHouse does not build a per-row B-tree index. Instead it stores one index entry per granule (default 8 192 rows, set by index_granularity). Each entry records the primary key value at the start of that granule.

At query time ClickHouse binary-searches these sparse marks, selects the minimal set of granules that could match, and reads only those blocks from disk. The primary key is not unique — duplicates are allowed and common. Its sole purpose is to sort data on disk so range scans skip irrelevant granules.

sql
-- Effective only when filtering on leading primary-key columns:
SELECT count() FROM events WHERE user_id = 42 AND event_date >= today() - 7;
-- user_id must be the first or second ORDER BY column to benefit from the index.

Cross-reference: query-optimization for EXPLAIN INDEXES and skip indexes.

ORDER BY vs PARTITION BY vs PRIMARY KEY

These three clauses look similar but serve different purposes:

ClauseRole
ORDER BY (a, b)Physical sort order within each part; defines the primary key by default
PARTITION BY exprSplits data into independent sub-trees; each partition has its own parts
PRIMARY KEY (a)Override the index prefix (rarely needed; defaults to full ORDER BY)

Partitioning rule of thumb: partition on a low-cardinality column (e.g., toYYYYMM(date)). Each partition is merged independently; over-partitioning (millions of partitions) slows queries and maintenance. Most tables need no explicit PARTITION BY or just a monthly/daily date partition.

Cross-reference: schema-design-advisor for partition sizing guidance.

Columnar Storage & Compression

ClickHouse stores each column in its own file. A query reading only 3 out of 100 columns touches ~3% of the data. Within a column file, values are stored consecutively, so they compress extremely well — identical or slowly-changing values in sorted data often achieve 5–20× compression with LZ4 (default) or ZSTD.

Per-column codecs let you tune further:

sql
CREATE TABLE metrics (
    ts    DateTime CODEC(DoubleDelta, ZSTD),  -- timestamps: delta + entropy coding
    value Float64  CODEC(Gorilla, ZSTD)       -- float series: XOR delta
) ENGINE = MergeTree ORDER BY ts;

This is why ClickHouse wins on analytical queries: it reads far less data off disk than row-oriented databases, and what it does read is compact.

Replication

ReplicatedMergeTree keeps two or more replicas in sync through ClickHouse Keeper (or ZooKeeper). The coordination protocol works like this:

  1. One replica receives an insert, writes a part locally, and logs the operation to Keeper.
  2. Other replicas see the log entry and fetch the part (either from the leader or from each other).
  3. Each replica applies merges independently but uses Keeper to agree on which parts to merge so they converge to identical state.

Replication is eventually consistent: a fresh replica may not yet have a just-inserted row. Use SYSTEM SYNC REPLICA to wait for a replica to catch up, or enable insert_quorum to make inserts wait for N replicas before acknowledging.

Cross-reference: replication-guide for quorum settings and Keeper health checks.

Show full SKILL.md (432 more words)Show less

Sharding & Distributed Tables

Shard: an independent subset of data, typically one ReplicatedMergeTree table (with its own replicas). Sharding is horizontal scaling — more shards = more total data capacity and parallelism.

Distributed engine: a virtual table that fans out queries to all shards and merges results. It stores no data itself.

sql
CREATE TABLE events_dist AS events
ENGINE = Distributed('my_cluster', currentDatabase(), 'events', rand());
-- rand() = random shard key; replace with cityHash64(user_id) for colocation

A write to the Distributed table is routed to one shard (per the shard key). A SELECT is broadcast to all shards and results are merged on the query initiator. Use GLOBAL JOIN when joining a Distributed table against another, to avoid N×M fan-out.

Cross-reference: cluster-operations for cluster topology and query-optimization for GLOBAL JOIN.

Materialized Views & Projections

Both compute derived data automatically on insert, but they serve different purposes:

Materialized view: an independent table populated by a trigger query that runs on every insert into the source table. Use for pre-aggregating into a separate table, routing subsets to different engines, or transforming schemas.

sql
CREATE MATERIALIZED VIEW hourly_counts
ENGINE = SummingMergeTree ORDER BY (hour, event)
AS SELECT toStartOfHour(ts) AS hour, event, count() AS cnt
FROM events GROUP BY hour, event;

Projection: an alternative sort order or pre-aggregation stored inside the same table. ClickHouse automatically picks the best projection at query time. Projections update atomically with the parent table and stay consistent across replicas.

Use projections when you want a secondary sort key without managing a separate table. Use materialized views when you need a different engine, schema, or destination cluster.

Special MergeTree Engine Variants

EngineProblem it solves
ReplacingMergeTree(ver)Keeps only the latest version of a row with the same primary key (deduplication). Final dedup happens at merge time or with FINAL; duplicates may be visible until then.
AggregatingMergeTreeStores partial aggregation states (e.g., AggregateFunction(sum, UInt64)) so that merges combine states rather than raw rows. Typically used as the target of a materialized view.
SummingMergeTree(cols)Sums specified numeric columns during merges for rows with identical primary key. Simple pre-aggregation without partial states.
CollapsingMergeTree(sign)Cancels rows by pairing a sign=1 (insert) row with a sign=-1 (delete/update) row sharing the same primary key. Merges collapse the pair to nothing. Used for update-heavy fact tables.

All variants still inherit the full MergeTree behaviour (parts, background merges, sparse index). They differ only in what happens during a merge.

PREWHERE vs WHERE

PREWHERE is read first, on only the columns it references, before the rest of the row is decoded. WHERE is evaluated after all selected columns are read. Use PREWHERE for highly selective conditions on narrow columns to skip reading wide columns for most rows. ClickHouse applies this optimization automatically for simple conditions when optimize_move_to_prewhere = 1 (default on).

sql
-- Manual hint: filter on the cheap column first, avoid reading `payload` for 99% of rows
SELECT payload FROM events PREWHERE event = 'purchase' WHERE amount > 1000;

Ask follow-up questions to go deeper on any concept. For query tuning see query-optimization; for schema choices see schema-design-advisor; for cluster topology see cluster-operations and replication-guide.

© chmonitor, GPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/concept-explainer of chmonitor/chmonitor.

Open the folder on GitHubat commit fc39ef0

Compare with similar skills

Concept Explainer next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Concept Explainer compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Concept Explainer this skillchmonitor/chmonitor298—~2.1kAutomated safety check: PassGPL-3.0
Clickhouse AnalystFerroxLabs/wayland608—~4.4kAutomated safety check: PassApache-2.0
Whodbxiaoyuge886/aigc198—~894Automated safety check: PassMIT
Clickhouse Architecture Advisorvemetric/vemetric3942 repos~791Automated safety check: PassApache-2.0
Ddia Principlesluoling8192/ai-coding-principles173—~4.7kAutomated safety check: PassMIT
Clickhouse Ioaffaan-m/ECC274k3 repos~2.3kAutomated safety check: PassMIT

Similar skills

  • Clickhouse Analyst

    FerroxLabs/wayland

    ClickHouse columnar OLAP expert covering table engine selection (MergeTree family), materialized views, aggregating merge trees, data sharding and replication, query optimization for analytical…

    608 GitHub stars~4.4k tokensUpdated yesterday
    DatabasesAuto-check passed
  • Whodb

    xiaoyuge886/aigc

    Database operations including querying, schema exploration, and data analysis.

    198 GitHub stars~894 tokensUpdated 2 mo ago
    DatabasesAuto-check passed
  • MUST USE when designing ClickHouse architectures, selecting between ingestion or modeling patterns, or translating best practices into workload-specific system designs.

    394 GitHub starsUsed in 2 repos~791 tokens
    DatabasesAuto-check passed
  • Ddia Principles

    luoling8192/ai-coding-principles

    Designing Data-Intensive Applications (DDIA) distilled reference guide by Martin Kleppmann.

    173 GitHub stars~4.7k tokensUpdated 6 mo ago
    DatabasesAuto-check passed
  • Clickhouse Io

    affaan-m/ECC

    ClickHouse数据库模式、查询优化、分析以及高性能分析工作负载的数据工程最佳实践. An agent skill from affaan-m/ECC.

    274k GitHub starsUsed in 3 repos~2.3k tokens
    DatabasesAuto-check passed
  • Clickhouse Io

    affaan-m/ECC

    고성능 분석 워크로드를 위한 ClickHouse 데이터베이스 패턴, 쿼리 최적화, 분석 및 데이터 엔지니어링 모범 사례.

    274k GitHub starsUsed in 2 repos~2.3k tokens
    DatabasesAuto-check passed

More from chmonitor/chmonitor

All 53 skills in this repo
  • Hyperframes Creative

    chmonitor/chmonitor

    Non-animation creative direction for HyperFrames videos. An agent skill from chmonitor/chmonitor.

    298 GitHub starsUsed in 5 repos~1.3k tokens
    Auto-check passed
  • Hyperframes Media

    chmonitor/chmonitor

    Audio and media assets for HyperFrames compositions, produced by one shared audio engine (scripts/audio.mjs) — multi-provider TTS (HeyGen / ElevenLabs / Kokoro local), background music + sound…

    298 GitHub starsUsed in 1 repo~2.8k tokens
    Auto-check: notes
  • Remotion To Hyperframes

    chmonitor/chmonitor

    Port an existing Remotion (React) composition to HyperFrames HTML.

    298 GitHub starsUsed in 1 repo~2.5k tokens
    Auto-check passed
  • Music To Video

    chmonitor/chmonitor

    A skill your agent uses when the user has a music track (an audio file, or a video to pull audio from) and wants a beat-synced HyperFrames video, calm to hard-hitting.

    298 GitHub starsUsed in 1 repo~4k tokens
    Auto-check: notes
  • Hyperframes Animation

    chmonitor/chmonitor

    All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus…

    298 GitHub starsUsed in 2 repos~1.8k tokens
    Auto-check passed
  • Faceless Explainer

    chmonitor/chmonitor

    turn arbitrary text — an article, notes, a topic, a brief — into a faceless explainer video, up to ~3 min (sweet spot 30-90s), where every visual is invented (typography, abstract graphics…

    298 GitHub stars~4.5k tokensUpdated yesterday
    Auto-check: notes

Works with

Categories

Questions about Concept Explainer

What does Concept Explainer do?

Explains core ClickHouse concepts with accurate mental models — MergeTree, indexes, replication, sharding, and special engines. Concept Explainer is an agent skill from chmonitor/chmonitor. Explains core ClickHouse concepts with accurate mental models — MergeTree, indexes, replication, sharding, and special engines.

When should I use Concept Explainer?

Concept Explainer fits situations like: tasks that involve Database administration; tasks that involve Data warehousing; tasks that involve Tutoring and explanations.

How do I install Concept Explainer in Claude Code?

Run `npx skills add chmonitor/chmonitor --skill concept-explainer -a claude-code`. Or copy the skill folder (.agents/skills/concept-explainer in chmonitor/chmonitor) into .claude/skills/concept-explainer in your project. Claude Code loads it when a task matches its description.

How do I install Concept Explainer in Codex?

Run `npx skills add chmonitor/chmonitor --skill concept-explainer -a codex`. Or copy the skill folder (.agents/skills/concept-explainer in chmonitor/chmonitor) into .agents/skills/concept-explainer in your project. Codex loads it when a task matches its description.

Can I use Concept Explainer in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add chmonitor/chmonitor --skill concept-explainer -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/concept-explainer, .gemini/skills/concept-explainer, .github/skills/concept-explainer and .opencode/skills/concept-explainer in your project.

What does Concept Explainer need to run?

SKILL.md names no scripts, command-line tools or credentials: Concept Explainer is instructions for the agent only.

Does Concept Explainer access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Concept Explainer safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Concept Explainer use?

Concept Explainer is published under the GPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Concept Explainer use?

About 2.1k tokens (SKILL.md is roughly 8.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Concept Explainer?

Skills that share tags, products or a category with Concept Explainer: Clickhouse Analyst (FerroxLabs/wayland, 608 stars), Whodb (xiaoyuge886/aigc, 198 stars), Clickhouse Architecture Advisor (vemetric/vemetric, 394 stars) and Ddia Principles (luoling8192/ai-coding-principles, 173 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Concept Explainer?

chmonitor (a GitHub organization) maintains it in chmonitor/chmonitor, which has 298 GitHub stars. The repository holds 53 skills in this directory. The repository was last updated on October 5, 2026.

Source: chmonitor/chmonitor on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.