Keeper Stress Analysis
ClickHouse/ClickHouse
Analyze ClickHouse Keeper stress-test results from play.clickhouse.com / keeperstresstests data warehouse.
Fix ClickHouse query errors when querying AggregatingMergeTree tables that use state functions.
$ npx skills add divinevideo/divine-mobile --skill clickhouse-aggregatingmergetree-state-merge -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install divinevideo/divine-mobile clickhouse-aggregatingmergetree-state-merge --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/divinevideo/divine-mobile.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/clickhouse-aggregatingmergetree-state-merge .claude/skills/clickhouse-aggregatingmergetree-state-merge && 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 "clickhouse-aggregatingmergetree-state-merge" agent skill from https://github.com/divinevideo/divine-mobile/tree/main/.agents/skills/clickhouse-aggregatingmergetree-state-merge into .claude/skills/clickhouse-aggregatingmergetree-state-merge/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "clickhouse-aggregatingmergetree-state-merge", 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/divinevideo/divine-mobile/tree/main/.agents/skills/clickhouse-aggregatingmergetree-state-mergeType 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 divinevideo/divine-mobile --skill clickhouse-aggregatingmergetree-state-merge -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install divinevideo/divine-mobile clickhouse-aggregatingmergetree-state-merge --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/divinevideo/divine-mobile.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/clickhouse-aggregatingmergetree-state-merge .agents/skills/clickhouse-aggregatingmergetree-state-merge && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "clickhouse-aggregatingmergetree-state-merge" agent skill from https://github.com/divinevideo/divine-mobile/tree/main/.agents/skills/clickhouse-aggregatingmergetree-state-merge into .agents/skills/clickhouse-aggregatingmergetree-state-merge/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "clickhouse-aggregatingmergetree-state-merge", 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 divinevideo/divine-mobile --skill clickhouse-aggregatingmergetree-state-merge -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install divinevideo/divine-mobile clickhouse-aggregatingmergetree-state-merge --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/divinevideo/divine-mobile.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/clickhouse-aggregatingmergetree-state-merge .cursor/skills/clickhouse-aggregatingmergetree-state-merge && 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 "clickhouse-aggregatingmergetree-state-merge" agent skill from https://github.com/divinevideo/divine-mobile/tree/main/.agents/skills/clickhouse-aggregatingmergetree-state-merge into .cursor/skills/clickhouse-aggregatingmergetree-state-merge/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "clickhouse-aggregatingmergetree-state-merge", 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/divinevideo/divine-mobile.git --path .agents/skills/clickhouse-aggregatingmergetree-state-merge--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 divinevideo/divine-mobile --skill clickhouse-aggregatingmergetree-state-merge -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install divinevideo/divine-mobile clickhouse-aggregatingmergetree-state-merge --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/divinevideo/divine-mobile.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/clickhouse-aggregatingmergetree-state-merge .gemini/skills/clickhouse-aggregatingmergetree-state-merge && 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 "clickhouse-aggregatingmergetree-state-merge" agent skill from https://github.com/divinevideo/divine-mobile/tree/main/.agents/skills/clickhouse-aggregatingmergetree-state-merge into .gemini/skills/clickhouse-aggregatingmergetree-state-merge/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "clickhouse-aggregatingmergetree-state-merge", 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 divinevideo/divine-mobile clickhouse-aggregatingmergetree-state-mergeInstalls 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 divinevideo/divine-mobile --skill clickhouse-aggregatingmergetree-state-merge -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/divinevideo/divine-mobile.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/clickhouse-aggregatingmergetree-state-merge .github/skills/clickhouse-aggregatingmergetree-state-merge && 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 "clickhouse-aggregatingmergetree-state-merge" agent skill from https://github.com/divinevideo/divine-mobile/tree/main/.agents/skills/clickhouse-aggregatingmergetree-state-merge into .github/skills/clickhouse-aggregatingmergetree-state-merge/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "clickhouse-aggregatingmergetree-state-merge", 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 divinevideo/divine-mobile --skill clickhouse-aggregatingmergetree-state-merge -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install divinevideo/divine-mobile clickhouse-aggregatingmergetree-state-merge --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/divinevideo/divine-mobile.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/clickhouse-aggregatingmergetree-state-merge .opencode/skills/clickhouse-aggregatingmergetree-state-merge && 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 "clickhouse-aggregatingmergetree-state-merge" agent skill from https://github.com/divinevideo/divine-mobile/tree/main/.agents/skills/clickhouse-aggregatingmergetree-state-merge into .opencode/skills/clickhouse-aggregatingmergetree-state-merge/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "clickhouse-aggregatingmergetree-state-merge", 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.
clickhouse-aggregatingmergetree-state-mergeFix ClickHouse query errors when querying AggregatingMergeTree tables that use state functions.
Clickhouse Aggregatingmergetree State Merge is an agent skill from divinevideo/divine-mobile. Fix ClickHouse query errors when querying AggregatingMergeTree tables that use state functions. Use when: (1) Query fails with type mismatch on AggregateFunction columns, (2) Using sum/count on columns created with sumState/countState/uniqState, (3) Creating views that JOIN with materialized views using AggregatingMergeTree, (4) Getting unexpected results from aggregate columns that show as AggregateFunction(sum, ...) type. The State() functions store intermediate aggregate states, not final values - you must use…
Its SKILL.md is about 1.7k 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 Data warehousing. It works with ClickHouse. The licence is MPL-2.0.
3 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit c3d6f7e. 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.
Links to these hosts (documentation or services it may open):
clickhouse.comFrom 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.
Clickhouse Aggregatingmergetree State Merge loads about 1.7k tokens when it runs. Until then it costs about 150 tokens; SKILL.md has 355 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 divinevideo/divine-mobile at commit c3d6f7e, republished under its MPL-2.0 licence (© divinevideo). 355 words, ~1,700 tokens.
.claude/skills/clickhouse-aggregatingmergetree-state-merge/SKILL.md (or your agent's skills folder).When querying tables or materialized views that use AggregatingMergeTree with state functions
(sumState, uniqState, countState), queries fail or return wrong results because the
columns contain aggregate state objects, not regular numeric values.
sum() on AggregateFunction columnsAggregateFunction(sum, UInt64) instead of UInt64AggregatingMergeTree stores intermediate aggregate states, not final values. When you define:
CREATE MATERIALIZED VIEW stats
ENGINE = AggregatingMergeTree()
ORDER BY (user_id)
AS SELECT
user_id,
sumState(amount) as total_amount, -- AggregateFunction(sum, UInt64)
uniqState(session_id) as unique_sessions, -- AggregateFunction(uniq, String)
countState() as event_count -- AggregateFunction(count)
FROM events
GROUP BY user_id;The columns total_amount, unique_sessions, and event_count are NOT regular numbers.
They're binary blobs representing the intermediate state of the aggregation.
Wrong:
SELECT user_id, sum(total_amount) FROM stats GROUP BY user_id;
-- Error: cannot use sum() on AggregateFunction typeCorrect:
SELECT user_id, sumMerge(total_amount) FROM stats GROUP BY user_id;
-- Returns the finalized numeric value| State Function | Merge Function | Purpose |
|---|---|---|
sumState(x) | sumMerge(x) | Sum aggregation |
countState() | countMerge(x) | Count aggregation |
uniqState(x) | uniqMerge(x) | Unique count (HyperLogLog) |
avgState(x) | avgMerge(x) | Average |
minState(x) | minMerge(x) | Minimum |
maxState(x) | maxMerge(x) | Maximum |
anyState(x) | anyMerge(x) | Any value |
groupArrayState(x) | groupArrayMerge(x) | Array aggregation |
Before (broken):
CREATE VIEW leaderboard AS
SELECT
stats.user_id,
sum(stats.daily_views) AS views, -- WRONG
sum(stats.daily_unique) AS uniques, -- WRONG
sum(stats.videos_watched) AS videos -- WRONG
FROM daily_stats stats
GROUP BY stats.user_id;After (fixed):
CREATE VIEW leaderboard AS
SELECT
stats.user_id,
sumMerge(stats.daily_views) AS views, -- Correct
uniqMerge(stats.daily_unique) AS uniques, -- Correct
countMerge(stats.videos_watched) AS videos -- Correct
FROM daily_stats stats
GROUP BY stats.user_id;Check the table schema to see which columns are aggregate states:
DESCRIBE TABLE your_table;Output shows column types like:
daily_views AggregateFunction(sum, UInt64)
daily_unique AggregateFunction(uniq, String)
videos_watched AggregateFunction(count)Any column with AggregateFunction(...) type requires the corresponding *Merge() function.
*State() functions*Merge() functions-- Should return actual numbers
SELECT sumMerge(total_views), uniqMerge(unique_visitors)
FROM aggregated_stats
WHERE stat_date >= today() - 7;Migration 020 (creates the aggregating table):
CREATE MATERIALIZED VIEW creator_daily_stats
ENGINE = AggregatingMergeTree()
ORDER BY (video_author_pubkey, stat_date)
AS SELECT
video_author_pubkey,
toDate(created_at) as stat_date,
sumState(view_count) as daily_views, -- State function
uniqState(viewer_hash) as daily_unique_viewers, -- State function
sumState(toFloat64(total_loops)) as daily_loops,-- State function
countState() as videos_watched -- State function
FROM view_counts
GROUP BY video_author_pubkey, toDate(created_at);Migration 033 (queries the aggregating table - FIXED):
CREATE VIEW leaderboard_creators_day AS
SELECT
cds.video_author_pubkey AS pubkey,
p.name,
sumMerge(cds.daily_views) AS views, -- Merge function
uniqMerge(cds.daily_unique_viewers) AS unique_viewers, -- Merge function
sumMerge(cds.daily_loops) AS loops, -- Merge function
countMerge(cds.videos_watched) AS videos_with_views -- Merge function
FROM creator_daily_stats cds
LEFT JOIN user_profiles p ON cds.video_author_pubkey = p.pubkey
WHERE cds.stat_date >= today() - 1
GROUP BY cds.video_author_pubkey, p.name
ORDER BY views DESC;SummingMergeTree is different: It stores regular values and sums them during merges.
With SummingMergeTree, you use regular sum() in queries. Only AggregatingMergeTree uses
the State/Merge pattern.
Why use AggregatingMergeTree?: For unique counts (uniq), you can't simply sum the
counts from different parts—that would overcount. AggregatingMergeTree preserves the
HyperLogLog state so merging gives correct unique counts across partitions.
Performance: The *Merge() functions are efficient—they're designed to combine
pre-computed aggregate states, not reprocess raw data.
Migration ordering matters: If migration A creates an AggregatingMergeTree view, and
migration B creates a view that queries it, migration B must use *Merge() functions.
© divinevideo, MPL-2.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/clickhouse-aggregatingmergetree-state-merge of divinevideo/divine-mobile.
Open the folder on GitHubat commit c3d6f7e
Clickhouse Aggregatingmergetree State Merge 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 |
|---|---|---|---|---|---|---|
| Clickhouse Aggregatingmergetree State Merge this skilldivinevideo/divine-mobile | 266 | — | ~1.7k | Automated safety check: Pass | MPL-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 | |
| Clickhouse Architecture Advisorvemetric/vemetric | 395 | 2 repos | ~791 | Automated safety check: Pass | Apache-2.0 | |
| Decompress BinaryClickHouse/ClickHouse | 50k | — | ~1.1k | Automated safety check: Pass | Apache-2.0 |
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.
ClickHouse/ClickHouse
Extract the inner ELF from a ClickHouse self-extracting clickhouse binary, including when its architecture differs from the host (e.g.
ClickHouse/ClickHouse
Show a report of open ClickHouse PRs whose only non-green CI check is "CH Inc sync" (or that are fully green) — i.e.
divinevideo/divine-mobile
Fix ArgoCD ExternalSecret deployment failing with "namespace X is not permitted in project Y".
divinevideo/divine-mobile
Art direction for any content — reads text, PDF, Word, HTML, PPT, then proposes 2-3 creative directions with photography style, mood, and visual language.
divinevideo/divine-mobile
Fix "Null check operator used on a null value" errors when an object is set to null during an async await.
divinevideo/divine-mobile
Add custom metadata headers (x-amz-meta-) to AWS v4 signed requests for GCS S3-compatible API.
divinevideo/divine-mobile
Fix password/secret authentication failures caused by trailing newlines when creating Google Cloud secrets (or similar) with bash here-strings.
divinevideo/divine-mobile
Fix silent video/media processing failures caused by URL extraction code that filters on file extensions (.mp4, .webm, .webp).
Works with
Categories
Fix ClickHouse query errors when querying AggregatingMergeTree tables that use state functions. Clickhouse Aggregatingmergetree State Merge is an agent skill from divinevideo/divine-mobile. Fix ClickHouse query errors when querying AggregatingMergeTree tables that use state functions.
Clickhouse Aggregatingmergetree State Merge fits situations like: query fails with type mismatch on AggregateFunction columns; using sum/count on columns created with sumState/countState/uniqState; creating views that JOIN with materialized views using AggregatingMergeTree; getting unexpected results from aggregate columns that show as AggregateFunction(sum.
Run `npx skills add divinevideo/divine-mobile --skill clickhouse-aggregatingmergetree-state-merge -a claude-code`. Or copy the skill folder (.agents/skills/clickhouse-aggregatingmergetree-state-merge in divinevideo/divine-mobile) into .claude/skills/clickhouse-aggregatingmergetree-state-merge in your project. Claude Code loads it when a task matches its description.
Run `npx skills add divinevideo/divine-mobile --skill clickhouse-aggregatingmergetree-state-merge -a codex`. Or copy the skill folder (.agents/skills/clickhouse-aggregatingmergetree-state-merge in divinevideo/divine-mobile) into .agents/skills/clickhouse-aggregatingmergetree-state-merge 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 divinevideo/divine-mobile --skill clickhouse-aggregatingmergetree-state-merge -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/clickhouse-aggregatingmergetree-state-merge, .gemini/skills/clickhouse-aggregatingmergetree-state-merge, .github/skills/clickhouse-aggregatingmergetree-state-merge and .opencode/skills/clickhouse-aggregatingmergetree-state-merge in your project.
SKILL.md names no scripts, command-line tools or credentials: Clickhouse Aggregatingmergetree State Merge is instructions for the agent only.
SKILL.md names 1 domain. As links in the text: clickhouse.com. 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.
Clickhouse Aggregatingmergetree State Merge is published under the MPL-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.7k tokens (SKILL.md is roughly 6.8k 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 Clickhouse Aggregatingmergetree State Merge: Keeper Stress Analysis (ClickHouse/ClickHouse, 50k stars), Perf Comparison (ClickHouse/ClickHouse, 50k stars), Patch Release Check (ClickHouse/ClickHouse, 50k stars) and Clickhouse Architecture Advisor (vemetric/vemetric, 395 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
divinevideo (a GitHub organization) maintains it in divinevideo/divine-mobile, which has 266 GitHub stars. The repository holds 103 skills in this directory. The repository was last updated on October 10, 2026.
Source: divinevideo/divine-mobile on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.