Clickhouse Core Workflow A
jeremylongshore/tons-of-skills-marketplace
Design ClickHouse schemas with MergeTree engines, ORDER BY keys, and partitioning.
Recommend table ORDER BY keys, partition strategies, column data-type right-sizing, codecs, skip indexes, and projections for ClickHouse tables.
$ npx skills add chmonitor/chmonitor --skill schema-design-advisor -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install chmonitor/chmonitor schema-design-advisor --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/chmonitor/chmonitor.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/schema-design-advisor .claude/skills/schema-design-advisor && rm -rf skills-srcUse ~/.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/
Install the "schema-design-advisor" agent skill from https://github.com/chmonitor/chmonitor/tree/main/.agents/skills/schema-design-advisor into .claude/skills/schema-design-advisor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "schema-design-advisor", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/chmonitor/chmonitor/tree/main/.agents/skills/schema-design-advisorType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add chmonitor/chmonitor --skill schema-design-advisor -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install chmonitor/chmonitor schema-design-advisor --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/chmonitor/chmonitor.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/schema-design-advisor .agents/skills/schema-design-advisor && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "schema-design-advisor" agent skill from https://github.com/chmonitor/chmonitor/tree/main/.agents/skills/schema-design-advisor into .agents/skills/schema-design-advisor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "schema-design-advisor", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add chmonitor/chmonitor --skill schema-design-advisor -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install chmonitor/chmonitor schema-design-advisor --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/chmonitor/chmonitor.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/schema-design-advisor .cursor/skills/schema-design-advisor && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "schema-design-advisor" agent skill from https://github.com/chmonitor/chmonitor/tree/main/.agents/skills/schema-design-advisor into .cursor/skills/schema-design-advisor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "schema-design-advisor", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/chmonitor/chmonitor.git --path .agents/skills/schema-design-advisor--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add chmonitor/chmonitor --skill schema-design-advisor -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install chmonitor/chmonitor schema-design-advisor --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/chmonitor/chmonitor.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/schema-design-advisor .gemini/skills/schema-design-advisor && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "schema-design-advisor" agent skill from https://github.com/chmonitor/chmonitor/tree/main/.agents/skills/schema-design-advisor into .gemini/skills/schema-design-advisor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "schema-design-advisor", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install chmonitor/chmonitor schema-design-advisorInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add chmonitor/chmonitor --skill schema-design-advisor -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/chmonitor/chmonitor.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/schema-design-advisor .github/skills/schema-design-advisor && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "schema-design-advisor" agent skill from https://github.com/chmonitor/chmonitor/tree/main/.agents/skills/schema-design-advisor into .github/skills/schema-design-advisor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "schema-design-advisor", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add chmonitor/chmonitor --skill schema-design-advisor -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install chmonitor/chmonitor schema-design-advisor --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/chmonitor/chmonitor.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/schema-design-advisor .opencode/skills/schema-design-advisor && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "schema-design-advisor" agent skill from https://github.com/chmonitor/chmonitor/tree/main/.agents/skills/schema-design-advisor into .opencode/skills/schema-design-advisor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "schema-design-advisor", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
schema-design-advisorRecommend table ORDER BY keys, partition strategies, column data-type right-sizing, codecs, skip indexes, and projections for ClickHouse tables.
Schema Design Advisor is an agent skill from chmonitor/chmonitor. Recommend table ORDER BY keys, partition strategies, column data-type right-sizing, codecs, skip indexes, and projections for ClickHouse tables.
Its SKILL.md is about 2.2k 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 schema design and Data warehousing. 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.
4 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit fc39ef0. It shows what the files ask for, not the result of running them.
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.
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.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Schema Design Advisor loads about 2.2k tokens when it runs. Until then it costs about 42 tokens; SKILL.md has 852 words of instructions outside code blocks.
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.
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.
The full file from chmonitor/chmonitor at commit fc39ef0, republished under its GPL-3.0 licence (© chmonitor). 852 words, ~2,236 tokens.
.claude/skills/schema-design-advisor/SKILL.md (or your agent's skills folder).Replaces the removed table-design advisor tool. Follow the sections below in order: inspect first, then recommend.
Gather evidence before making any recommendation. Run all three in parallel.
1. Schema — call get_table_schema for the target table.
2. Parts summary — call get_table_parts, or:
SELECT
partition,
count() AS part_count,
sum(rows) AS total_rows,
formatReadableSize(sum(data_compressed_bytes)) AS compressed,
formatReadableSize(sum(data_uncompressed_bytes)) AS uncompressed,
round(sum(data_uncompressed_bytes) /
nullIf(sum(data_compressed_bytes), 0), 2) AS ratio
FROM system.parts
WHERE active AND database = 'db' AND table = 't'
GROUP BY partition
ORDER BY partition DESC
LIMIT 203. Per-column compression + cardinality — run via query:
SELECT
name,
type,
formatReadableSize(data_compressed_bytes) AS compressed,
formatReadableSize(data_uncompressed_bytes) AS uncompressed,
round(data_uncompressed_bytes /
nullIf(data_compressed_bytes, 0), 2) AS ratio,
compression_codec
FROM system.columns
WHERE database = 'db' AND table = 't'
ORDER BY data_uncompressed_bytes DESC4. Cardinality probe (spot-check suspicious columns):
SELECT
uniq(col_a) AS card_a,
uniq(col_b) AS card_b,
count() AS total
FROM db.tA ratio < 2× on per-column compression usually means the wrong codec or wrong type. Cardinality drives type and codec choices below.
ORDER BY clause.(tenant_id, date, entity_id, event_id).ORDER BY form the sparse index (granule size 8192 rows by default). Columns later in the key still sort data but don't speed up point lookups.ORDER BY every column that appears in WHERE clauses of your most frequent queries — leftmost first.PRIMARY KEY can be a prefix of ORDER BY if you want to deduplicate on a broader key (ReplacingMergeTree / CollapsingMergeTree).= before the one queried with BETWEEN/range.| Granularity | DDL | When to use |
|---|---|---|
| Monthly | PARTITION BY toYYYYMM(event_date) | Most time-series tables; 1–12 partitions/year |
| Daily | PARTITION BY toYYYYMMDD(event_date) | Only when you routinely DROP whole days and have < 1000 partitions total |
| By tenant | PARTITION BY (tenant_id, toYYYYMM(event_date)) | Multi-tenant with per-tenant data lifecycle |
Too-many-partitions warning: ClickHouse merges within a partition, not across. More than ~1000 active partitions per table degrades insert and merge performance (each insert touches one partition; too many partitions = many small parts). Daily partitioning on a high-volume table quickly exceeds safe limits.
Check current partition count:
SELECT count(DISTINCT partition) FROM system.parts
WHERE active AND database = 'db' AND table = 't'If > 500, recommend coarser partitioning.
| Value range | Type |
|---|---|
| 0–255 | UInt8 |
| 0–65535 | UInt16 |
| 0–4 billion | UInt32 |
| > 4 billion or unknown | UInt64 |
| Negative small | Int8/Int16/Int32 |
Use the narrowest type that fits the actual data range (query max(col), min(col)). Narrower types compress better and fit more values per granule.
| Situation | Type |
|---|---|
| cardinality < ~10 000 distinct values | LowCardinality(String) |
| cardinality > ~100 000 | plain String — LC overhead outweighs benefit |
| fixed-width binary/hash (e.g. MD5) | FixedString(16) (store raw bytes, not hex) |
| small, known set of values | Enum8 or Enum16 (saves space + enforces valid values) |
LowCardinality stores a dictionary per column chunk; high-cardinality columns with LC can use more memory than String.
| Need | Type |
|---|---|
| Date only (day precision) | Date (2 bytes) |
| Second precision, 1970–2105 | DateTime (4 bytes) |
| Sub-second or timezone | DateTime64(3) / DateTime64(6) (8 bytes) |
Avoid String for timestamps — they block time-based pruning and sort incorrectly.
Avoid Nullable(T) unless the column genuinely contains NULLs that have semantic meaning. Nullable adds a hidden bitmask column and disables some optimizations (skip indexes, certain codecs). Use a sentinel value (0, empty string, epoch) and document the convention instead.
max(col), min(col), uniq(col), countIf(col IS NULL) to measure range, cardinality, and null rate.String column to integer literal).ALTER TABLE db.t MODIFY COLUMN col_name NewType;For large tables this is a background mutation — monitor via system.mutations.
| Data shape | Recommended codec |
|---|---|
| Monotonically increasing integers (timestamps, IDs) | Delta, ZSTD(3) |
| Slow-changing counters | DoubleDelta, ZSTD(3) |
| Floating-point gauge metrics | Gorilla, ZSTD(3) |
| Integer columns with small value range | T64, ZSTD(3) |
| Random strings / UUIDs | ZSTD(3) or LZ4 |
| Already-compressed blobs | NONE |
Apply per column:
ALTER TABLE db.t MODIFY COLUMN ts DateTime CODEC(DoubleDelta, ZSTD(3));
ALTER TABLE db.t MODIFY COLUMN value Float64 CODEC(Gorilla, ZSTD(3));
ALTER TABLE db.t MODIFY COLUMN status LowCardinality(String) CODEC(ZSTD(3));ZSTD(3) is a safe default when unsure. LZ4 is faster to decompress at the cost of compression ratio. Benchmark with SELECT formatReadableSize(data_compressed_bytes), formatReadableSize(data_uncompressed_bytes) FROM system.columns WHERE ... before and after.
Add skip indexes to columns that appear in WHERE but are not in the ORDER BY prefix.
| Index type | Best for | Example |
|---|---|---|
minmax | Numeric ranges, dates | error_code, response_time |
set(N) | Low-cardinality columns (≤ N distinct values per granule) | status, region |
bloom_filter | String equality / IN on medium-cardinality | user_agent, trace_id |
ngrambf_v1(n, size, hashes, seed) | LIKE / substring search on strings | query_text, url_path |
-- minmax on a numeric column
ALTER TABLE db.t ADD INDEX idx_code error_code TYPE minmax GRANULARITY 4;
-- bloom filter for string equality
ALTER TABLE db.t ADD INDEX idx_trace trace_id TYPE bloom_filter(0.01) GRANULARITY 1;
MATERIALIZE INDEX idx_trace IN PARTITION ID 'all';Skip indexes only help when they skip whole granules (8192 rows). They are useless on columns with near-random values per granule. Verify with EXPLAIN indexes = 1 SELECT ....
Projections — embedded alternative sort orders stored inside the table. Use when you have a second common query shape with a different leading ORDER BY column:
ALTER TABLE db.t ADD PROJECTION proj_by_user (
SELECT * ORDER BY user_id, event_date
);
ALTER TABLE db.t MATERIALIZE PROJECTION proj_by_user;Projections double storage for covered columns. Only add if the query pattern is frequent enough to justify the write amplification.
Materialized views — pre-aggregate or transform data into a separate table at insert time. Use for:
Prefer projections over MVs when the source schema and the query shape are stable. Prefer MVs when you need a different engine (AggregatingMergeTree), different TTL, or cross-table joins at insert time.
storage-optimization — TTL policies, tiered storage, part management, codec benchmarking workflowquery-tuning-advisor — EXPLAIN output, PREWHERE, JOIN ordering, index effectivenessmigration-patterns — ALTER TABLE procedures, mutation monitoring, zero-downtime schema changeshardware-tuning — memory limits, merge thread tuning, MergeTree settings that affect schema trade-offs© 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
Just SKILL.md in .agents/skills/schema-design-advisor of chmonitor/chmonitor.
Open the folder on GitHubat commit fc39ef0
Schema Design Advisor 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Schema Design Advisor this skillchmonitor/chmonitor | 299 | — | ~2.2k | Automated safety check: Pass | GPL-3.0 | |
| Clickhouse Core Workflow Ajeremylongshore/tons-of-skills-marketplace | 2.8k | — | ~1.6k | Automated safety check: Pass | MIT | |
| Modelersidequery/sidemantic | 129 | — | ~4.2k | Automated safety check: Pass | Apache-2.0 | |
| Keeper Stress AnalysisClickHouse/ClickHouse | 50k | — | ~4.7k | Automated safety check: Pass | Apache-2.0 | |
| Perf ComparisonClickHouse/ClickHouse | 50k | — | ~3.9k | Automated safety check: Notes | Apache-2.0 | |
| Patch Release CheckClickHouse/ClickHouse | 50k | — | ~4k | Automated safety check: Notes | Apache-2.0 |
jeremylongshore/tons-of-skills-marketplace
Design ClickHouse schemas with MergeTree engines, ORDER BY keys, and partitioning.
sidequery/sidemantic
Build, validate, and manage semantic models using Sidemantic.
ClickHouse/ClickHouse
Analyze ClickHouse Keeper stress-test results from play.clickhouse.com / keeperstresstests data warehouse.
ClickHouse/ClickHouse
Evaluate ClickHouse performance test results from existing CI/dashboard data or local perf.py runs.
ClickHouse/ClickHouse
Check whether ClickHouse's supported versions (last 3 majors + latest LTS) have recent stable patch releases, diagnose why the scheduled AutoReleases pipeline failed, and identify which releases…
vemetric/vemetric
MUST USE when designing ClickHouse architectures, selecting between ingestion or modeling patterns, or translating best practices into workload-specific system designs.
chmonitor/chmonitor
Non-animation creative direction for HyperFrames videos. An agent skill from chmonitor/chmonitor.
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…
chmonitor/chmonitor
Port an existing Remotion (React) composition to HyperFrames HTML.
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.
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…
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…
Works with
Categories
Recommend table ORDER BY keys, partition strategies, column data-type right-sizing, codecs, skip indexes, and projections for ClickHouse tables. Schema Design Advisor is an agent skill from chmonitor/chmonitor. Recommend table ORDER BY keys, partition strategies, column data-type right-sizing, codecs, skip indexes, and projections for ClickHouse tables.
Schema Design Advisor fits situations like: tasks that involve Database schema design; tasks that involve Data warehousing.
Run `npx skills add chmonitor/chmonitor --skill schema-design-advisor -a claude-code`. Or copy the skill folder (.agents/skills/schema-design-advisor in chmonitor/chmonitor) into .claude/skills/schema-design-advisor in your project. Claude Code loads it when a task matches its description.
Run `npx skills add chmonitor/chmonitor --skill schema-design-advisor -a codex`. Or copy the skill folder (.agents/skills/schema-design-advisor in chmonitor/chmonitor) into .agents/skills/schema-design-advisor in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add chmonitor/chmonitor --skill schema-design-advisor -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/schema-design-advisor, .gemini/skills/schema-design-advisor, .github/skills/schema-design-advisor and .opencode/skills/schema-design-advisor in your project.
SKILL.md names no scripts, command-line tools or credentials: Schema Design Advisor is instructions for the agent only.
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.
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.
Schema Design Advisor 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.
About 2.2k tokens (SKILL.md is roughly 8.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Schema Design Advisor: Clickhouse Core Workflow A (jeremylongshore/tons-of-skills-marketplace, 2.8k stars), Modeler (sidequery/sidemantic, 129 stars), Keeper Stress Analysis (ClickHouse/ClickHouse, 50k stars) and Perf Comparison (ClickHouse/ClickHouse, 50k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
chmonitor (a GitHub organization) maintains it in chmonitor/chmonitor, which has 299 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.