Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

query-performance

Skill by comet-ml

Validates what a ClickHouse query costs before it is merged, using read-only access to a real environment or an extrapolated Testcontainers dataset. Built for developers reviewing DAO query changes, slow endpoints, or scale questions.

  • Score 93
  • 24k stars
  • Apache-2.0
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install query-performance

Built from the published package, never by AI.

git clone --depth 1 https://github.com/comet-ml/opik /tmp/opik && mkdir -p ~/.claude/skills && cp -r /tmp/opik/.agents/skills/query-performance ~/.claude/skills/query-performance

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install query-performance in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This skill turns a claim that a ClickHouse query is expensive into measured numbers. It compares a candidate query against main, checks that both return the same results, and runs each variant at least five times. Each run records latency (p50, p90, p95, min), peak memory, CPU time, and scan figures such as parts, granules, and rows read.

The skill works either on a real environment through read-only access or on a revived Testcontainers dataset extrapolated to 20k, 500k, and 1M entities. Each clause gets a verdict of change, keep, or caller's call, with the negative results recorded. It is aimed at developers and reviewers who need to check query cost at production scale before merging.

Written from the project's SKILL.md and checked against it.

What it can do

  • Equivalence gateConfirms a candidate query returns the same results as the query it varies, including order where it matters.
  • Multi-run measurementCollects latency, peak memory, CPU time, and scan counts over at least five runs per variant.
  • Assumption checksProbes ClickHouse behaviors such as CTE re-evaluation and EXPLAIN execution before relying on them.
  • Clause-level inventoryLists CTEs, subqueries, prunes, dedup steps, and joins, with how often each is referenced.
  • Per-clause verdictsGives each clause a verdict of change, keep, or caller's call, backed by a measurement.
  • Before and after reportingProduces per call site and per shape tables that justify each verdict with measured dimensions.

What you need

  • ClickHouse
  • Testcontainers, or read-only access to a real environment
  • Maven (mvn)

Try asking

  • Measure the cost of this ClickHouse query change against main before I merge.
  • Extrapolate this DAO query's cost to 500k and 1M entities using a Testcontainers dataset.
  • Check whether this slow endpoint's query has a clause that can be removed.

Good to know

  • Container data is not production shape, so Testcontainers results are extrapolated.
  • A read-only role can abort long queries through row-read caps and may refuse needed settings.
  • Tail quantiles p90 and p95 need more than five runs to be reliable.
  • Public PRs report relative numbers by size tier, not workspace ids or absolute production figures.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: .agents/skills/query-performance/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md9 KB
  • environments.md5 KB
  • instrumentation.md5 KB
  • rendering.md1 KB

Alternatives to query-performance

All alternatives →
hugging-face-datasetssickn33
94

Creates, configures and manages datasets on the Hugging Face Hub, including SQL-based querying and transformation. Built for people who edit dataset content and metadata directly, alongside the HF MCP server.

AAA Skill 50k
db-repairgarrytan
94

Diagnoses and repairs gbrain's Postgres access when a command or MCP result shows a GBRAIN_DB_ACCESS marker, or when the operator reports the brain database is down. It runs the hardcoded gbrain db-repair ladder and verifies the result with a re-probe.

AAA Skill 34k
alloydb-basicsgoogle
94

Manages clusters, instances, and backups for AlloyDB for PostgreSQL. Built for creating, configuring, and administering AlloyDB databases, not general PostgreSQL or Cloud SQL instances.

AAA Skill 26k
clickhouse-logs-queriessupabase
94

Writes, reviews and migrates Supabase logs queries against the ClickHouse logs table served by the logs.all.otel endpoint. Built for developers who write Logs Explorer SQL or convert older BigQuery logs queries.

AAA Skill 116k
fix-slow-queriespaperclipai
94

Diagnoses and fixes slow Paperclip PostgreSQL queries using Cloud and Neon evidence, local benchmarks, regression tests, and a pull request with passing checks. Built for engineers working on Paperclip.

AAA Skill 119k
prisma-8prisma
94

Guides AI assistants through Prisma 8 projects built on @prisma/orm-postgres, @prisma/orm-sqlite, or @prisma/orm-mongo. It covers data contracts, migrations, typed queries and runtime setup for developers on Prisma 8.

AAA Skill 48k

Compare with hugging-face-datasets, db-repair or alloydb-basics

query-performance: common questions

What does query-performance measure?

It measures p50, p90, p95 and min latency, peak memory, CPU time, and scanned parts, granules, and rows read. The scan numbers are used to explain why the other figures changed.

Can it be used without access to production?

Yes. When read-only environment access is not available, the skill uses a revived Testcontainers dataset and extrapolates results to 20k, 500k, and 1M entities.

When should this skill be used?

The source says to use it when a DAO query changes, when an endpoint is slow, or when a reviewer asks what a query costs at scale.

How do I install query-performance?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is query-performance free?

The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.

Is query-performance safe to use?

It scores 93 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to query-performance?

Similar skills: hugging-face-datasets, db-repair, alloydb-basics, clickhouse-logs-queries.

query-performance Install

Add to stack

Loading.