Pytorch Clickhouse
pytorch/test-infra
Load this FIRST whenever working with PyTorch CI data (any pytorch/ org repo), the torchci/HUD codebase, or the PyTorch HUD ClickHouse database.
Measures what a ClickHouse query change actually costs, turning a suspicion that a query is slow into numbers a reviewer can act on before it merges.
$ npx skills add comet-ml/opik --skill query-performance -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install comet-ml/opik query-performance --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/comet-ml/opik.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/query-performance .claude/skills/query-performance && 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 "query-performance" agent skill from https://github.com/comet-ml/opik/tree/main/.agents/skills/query-performance into .claude/skills/query-performance/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "query-performance", 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/comet-ml/opik/tree/main/.agents/skills/query-performanceType 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 comet-ml/opik --skill query-performance -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install comet-ml/opik query-performance --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/comet-ml/opik.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/query-performance .agents/skills/query-performance && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "query-performance" agent skill from https://github.com/comet-ml/opik/tree/main/.agents/skills/query-performance into .agents/skills/query-performance/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "query-performance", 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 comet-ml/opik --skill query-performance -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install comet-ml/opik query-performance --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/comet-ml/opik.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/query-performance .cursor/skills/query-performance && 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 "query-performance" agent skill from https://github.com/comet-ml/opik/tree/main/.agents/skills/query-performance into .cursor/skills/query-performance/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "query-performance", 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/comet-ml/opik.git --path .agents/skills/query-performance--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 comet-ml/opik --skill query-performance -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install comet-ml/opik query-performance --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/comet-ml/opik.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/query-performance .gemini/skills/query-performance && 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 "query-performance" agent skill from https://github.com/comet-ml/opik/tree/main/.agents/skills/query-performance into .gemini/skills/query-performance/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "query-performance", 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 comet-ml/opik query-performanceInstalls 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 comet-ml/opik --skill query-performance -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/comet-ml/opik.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/query-performance .github/skills/query-performance && 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 "query-performance" agent skill from https://github.com/comet-ml/opik/tree/main/.agents/skills/query-performance into .github/skills/query-performance/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "query-performance", 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 comet-ml/opik --skill query-performance -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install comet-ml/opik query-performance --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/comet-ml/opik.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/query-performance .opencode/skills/query-performance && 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 "query-performance" agent skill from https://github.com/comet-ml/opik/tree/main/.agents/skills/query-performance into .opencode/skills/query-performance/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "query-performance", 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.
query-performanceMeasures what a ClickHouse query change actually costs, turning a suspicion that a query is slow into numbers a reviewer can act on before it merges.
This skill sets rules for proving a ClickHouse query's cost rather than guessing at it. Every claim needs a measurement that would come out differently if the claim were false, and an equivalence check comes first: a variant is not comparable until it is shown to return the same rows, in the same order when the query defines one, as the query it varies. The main branch is treated as the cost reference, not a result reference, since a candidate is often meant to change what comes back.
Each run collects latency, peak memory, CPU time and what was scanned, because a variant can read fewer rows while costing more memory or CPU. At least two data shapes are measured, since rankings flip with density and skew, and each variant changes one variable at a time, including removing a clause outright to see if it earns its place. Five or more runs are required, reported as p50, p90, p95 and minimum, with more runs when a tail quantile is the deciding number.
A section of assumptions to verify rather than trust warns that a CTE referenced multiple times may be evaluated multiple times since named CTEs are not materialized, and that plan node count is not the same as evaluation count. The output is a verdict per clause, change, keep, or caller's call, each attached to a measurement, along with the negative results so nobody retries them. What could not be measured, such as quotas or cache state, is written down as a caveat.
7 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit f217a86. 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.
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.
ClickHouse Query Performance Validation loads about 2.1k tokens when it runs. Until then it costs about 83 tokens; SKILL.md has 1,258 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 comet-ml/opik at commit f217a86, republished under its Apache-2.0 licence (© comet-ml). 1,258 words, ~2,095 tokens.
.claude/skills/query-performance/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.Turn "this query looks expensive" into numbers a reviewer can act on. The output is a verdict per clause — change, keep, or caller's call — each attached to a measurement, plus the negative results so nobody retries them.
ORDER BY, and anything paginated, where order decides which rows land on the page —
the comparison must include that order; compare order-independently only when the result genuinely
has no defined order. A faster query that answers a different question is not an optimization.
(Equivalence holds between the candidate and its variants. A candidate is often meant to change
results versus main; main is the cost reference, not a result reference.)The failure mode of this work is a confident mechanism the engine does not implement.
IN (SELECT …) are often built eagerly and
appear only as a literal (x in 35297-element set) with no read node — so counting
ReadFromMergeTree nodes undercounts work, and a dominant subquery can be invisible.EXPLAIN executes scalar and set subqueries to resolve index conditions: it is neither free nor
a timing proxy.main — see rendering.md.environments.md.main, ≥5 runs each, plan captured per call site, shape
recorded alongside. The delta between them is the cost of the change, and it is a finding in its
own right — often the one that matters most.instrumentation.md. Isolate the suspect subquery and measure
end-to-end; a gap between them is itself a finding.Put the four measured dimensions side by side — latency (p50, p90, p95, min), peak memory, CPU time, scanned/read (parts, granules, marks, rows) — for every shape and every call site, and decide from the whole set:
Make the scan numbers do their job: they should explain the latency, CPU and memory you measured. If they do not — scan is flat but memory doubled, or rows fell but CPU rose — you have not found the mechanism yet, and the verdict is not ready.
Whether you are reviewing a PR or opening one, justify every claim with a before/after table — one row per variant (or per revision), one column per measured dimension:
| variant | p50 ms | p90 ms | p95 ms | CPU ms | peak MiB | parts | granules (marks) | rows read |
|---|---|---|---|---|---|---|---|---|
main | … | … | … | … | … | … | … | … |
| candidate (before) | … | … | … | … | … | … | … | … |
| with the change (after) | … | … | … | … | … | … | … | … |
The scan columns are not optional: they are what makes the other three explainable, so carry the pruning evidence into the table rather than only the totals.
One table per call site and per shape, with the shape named (entity counts, run count). A verdict without its table is an opinion, and prose alone hides exactly the trade a reviewer needs to see.
Lead with what the change itself costs against main, per call site — a tuning delta of a few percent
does not outrank the endpoint getting materially more expensive, and if that cost is not acceptable,
say so and name the lever that would actually move it.
Then per clause: change (the replacement, why, before → after table), keep (what you tried and the number that killed it), or caller's call (both options, trade named). Then the equivalence evidence and the caveats. Do not include optimizations you did not measure, or a mechanism you did not verify.
opik-backend (clickhouse.md, testing.md) — DAO and ClickHouse conventions, plus the
Testcontainers rules including "one ClickHouse-migrating test class per mvn invocation".
© comet-ml, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 3 other files in .agents/skills/query-performance of comet-ml/opik.
Open the folder on GitHubat commit f217a86
ClickHouse Query Performance Validation 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 Query Performance Validation this skillcomet-ml/opik | 22k | — | ~2.1k | Automated safety check: Pass | Apache-2.0 | |
| Pytorch Clickhousepytorch/test-infra | 113 | — | ~2.8k | Automated safety check: Pass | Custom licence | |
| Clickhouse Ioaffaan-m/ECC | 274k | 1 repos | ~2.7k | Automated safety check: Pass | MIT | |
| Generating Clickhouse Query Performance ReportsPostHog/posthog-foss | 721 | — | ~5.1k | Automated safety check: Pass | MIT | |
| Performancekid-sid/claude-spellbook | 189 | — | ~3.8k | Automated safety check: Pass | MIT | |
| Django Filter Benchmarksaleor/saleor | 23k | — | ~2.3k | Automated safety check: Pass | BSD-3-Clause |
pytorch/test-infra
Load this FIRST whenever working with PyTorch CI data (any pytorch/ org repo), the torchci/HUD codebase, or the PyTorch HUD ClickHouse database.
affaan-m/ECC
ClickHouse database patterns, query optimization, analytics, and data engineering best practices for high-performance analytical workloads.
PostHog/posthog-foss
Produce and structure slow-query performance reports for PostHog's production ClickHouse (US and EU).
kid-sid/claude-spellbook
A skill your agent uses when diagnosing a slow HTTP endpoint or high-latency service — profiling, adding an application-level cache, offloading CPU-bound work to threads or workers, or defining a…
saleor/saleor
Benchmarks Django ORM filters in Saleor by generating bulk data, extracting the SQL and running EXPLAIN ANALYZE to check index usage.
hellangleZ/burn-in-cceverywhere-ralph
ClickHouse database patterns, query optimization, analytics, and data engineering best practices for high-performance analytical workloads.
comet-ml/opik
Checklist for wiring a new linter into Opik's Code Quality pipeline: the four files to edit, the silent-failure gotchas and the pass/fail verification loop.
comet-ml/opik
Shows how to add product analytics events to Opik's frontend, Java backend and Python SDK, all reporting through Segment to PostHog with an opik_ name prefix.
comet-ml/opik
Investigates a failed Opik end-to-end test from CI, TestOps or a local run, decides regression versus flake, and proposes a fix without editing tests.
comet-ml/opik
Rules for writing PR descriptions, changelog entries and feature documentation in the Opik repository, including the exact headings that CI requires.
comet-ml/opik
Turns a code change into one committed, passing Playwright end-to-end spec by resolving the change scope and handing authoring to a companion skill.
comet-ml/opik
Starts, rebuilds, and troubleshoots the Opik local dev stack, including an optional Comet Platform integration mode for the Opik team.
Works with
Categories
Measures what a ClickHouse query change actually costs, turning a suspicion that a query is slow into numbers a reviewer can act on before it merges. This skill sets rules for proving a ClickHouse query's cost rather than guessing at it. Every claim needs a measurement that would come out differently if the claim were false, and an equivalence check comes first: a variant is not comparable until it is shown to return the same rows, in the same order when the query defines one, as the query it varies.
ClickHouse Query Performance Validation fits situations like: reviewing a DAO or query change before it merges; investigating why an endpoint has become slow; answering a reviewer who asks what a query costs at scale; deciding whether a query clause is pulling its weight.
Run `npx skills add comet-ml/opik --skill query-performance -a claude-code`. Or copy the skill folder (.agents/skills/query-performance in comet-ml/opik) into .claude/skills/query-performance in your project. Claude Code loads it when a task matches its description.
Run `npx skills add comet-ml/opik --skill query-performance -a codex`. Or copy the skill folder (.agents/skills/query-performance in comet-ml/opik) into .agents/skills/query-performance 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 comet-ml/opik --skill query-performance -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/query-performance, .gemini/skills/query-performance, .github/skills/query-performance and .opencode/skills/query-performance in your project.
SKILL.md names no scripts, command-line tools or credentials: ClickHouse Query Performance Validation is instructions for the agent only. Our summary lists: A ClickHouse environment with read-only access, or a Testcontainers dataset to extrapolate from.
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.
ClickHouse Query Performance Validation is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
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.
Skills that share tags, products or a category with ClickHouse Query Performance Validation: Pytorch Clickhouse (pytorch/test-infra, 113 stars), Clickhouse Io (affaan-m/ECC, 274k stars), Generating Clickhouse Query Performance Reports (PostHog/posthog-foss, 721 stars) and Performance (kid-sid/claude-spellbook, 189 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
comet-ml (a GitHub organization) maintains it in comet-ml/opik, which has 22,412 GitHub stars. The repository holds 19 skills in this directory. The repository was last updated on October 7, 2026.
Source: comet-ml/opik on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.