Agent skill

Perf Report

by ClickHouse in ClickHouse/ClickHouse

Analyze CI performance comparison reports for a ClickHouse PR.

Apache-2.0Auto-check: notesDatabases

Install Perf Report

skills CLI
$ npx skills add ClickHouse/ClickHouse --skill perf-report -a claude-code

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

GitHub CLI
$ gh skill install ClickHouse/ClickHouse perf-report --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/ClickHouse/ClickHouse.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/perf-report .claude/skills/perf-report && 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
perf-report
GitHub stars
50k
Token cost
~2.6k tokens
SKILL.md length
1,183 words
Files
1
Skills in repo
24
Repo updated
First seen
Licence
Apache-2.0

At a glance

Analyze CI performance comparison reports for a ClickHouse PR.

  • Works in 9 steps: Fetch performance data → List ALL changes → Cross-reference with master history → …
  • Tasks that involve Data warehousing
  • SKILL.md covers Arguments, Steps and Rules
  • Calls curl, python3 and clickhouse

What it does

Perf Report is an agent skill from ClickHouse/ClickHouse. Analyze CI performance comparison reports for a ClickHouse PR. Lists all regressions and improvements, cross-references with master history to distinguish real changes from flaky tests.

Its SKILL.md is about 2.6k 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 and Failing and flaky tests. It works with ClickHouse. The repository describes itself as: ClickHouse® is a real-time analytics database management system. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Data warehousing
  • Tasks that involve Failing and flaky tests

Example prompts

  • “/perf-report”

Requirements

  • Python 3
  • Pre-approved tools (allowed-tools): Bash, Read, Grep, Glob, WebFetch

Workflow steps

9 steps, taken from the step headings in SKILL.md.

  1. Fetch performance data
  2. List ALL changes
  3. Cross-reference with master history
  4. Classify each change
  5. Present the verdict
  6. Summary
  7. Deep-dive: accessing CI logs (when asked)
  8. Deep-dive: trace log profiling (flamegraphs)
  9. Deep-dive: profile events from raw TSV

What it can do on your machine

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

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash
    • Read
    • Grep
    • Glob
    • WebFetch

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • curl
    • python3
    • clickhouse
    • node

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

  • Network

    No URLs in SKILL.md. Its commands use curl, which can reach the network depending on how they are called.

    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

Perf Report loads about 2.6k tokens when it runs. Until then it costs about 49 tokens; SKILL.md has 1,183 words of instructions outside code blocks.

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

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: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Bash, Read, Grep, Glob, WebFetch

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 ClickHouse/ClickHouse at commit cd023af, republished under its Apache-2.0 licence (© ClickHouse). 1,183 words, ~2,648 tokens.

Download SKILL.mdSave it as .claude/skills/perf-report/SKILL.md (or your agent's skills folder).
name
perf-report
description
Analyze CI performance comparison reports for a ClickHouse PR. Lists all regressions and improvements, cross-references with master history to distinguish real changes from flaky tests.
allowed-tools
Bash, Read, Grep, Glob, WebFetch
argument-hint
<PR-number or CI-report-URL>
disable-model-invocation
false

Performance Report Analysis Skill

Arguments

  • $0 (required): PR number (e.g. 99474) or a CI report URL

Steps

1. Fetch performance data

Use the fetch_perf_report.py tool to get TSV data for both architectures:

bash
python3 .claude/tools/fetch_perf_report.py "https://github.com/ClickHouse/ClickHouse/pull/$PR" --arch amd --tsv
python3 .claude/tools/fetch_perf_report.py "https://github.com/ClickHouse/ClickHouse/pull/$PR" --arch arm --tsv

If a direct CI report URL is given instead of a PR number, use it directly.

Extract all changed queries (column 10 == 1 means the change exceeds the threshold):

  • Column 1: test name
  • Column 2: query index
  • Column 4: batch
  • Column 5: old time
  • Column 6: new time
  • Column 8: ratio (e.g. 1.5 = 1.5x)
  • Column 10: 1 if changed, 0 if within threshold
  • Column 12: "slower" or "faster"
  • Column 13: query text
2. List ALL changes

Present the complete, unfiltered list of all changes above 1.10x, sorted by magnitude, for both architectures separately. Use tables with columns: Magnitude, Direction, Test, Query#, Batch.

Do NOT summarize, collapse, or hide entries. Do NOT dismiss anything as "noise" or "not actionable" without evidence. Every entry must be visible.

3. Cross-reference with master history

This step is MANDATORY. For every test that shows as slower or faster above 1.10x, check the public CI database to determine if this is a known flaky test or a genuine change introduced by the PR. Do NOT skip this step or use alternative approaches (like manually fetching perf reports from other PRs).

Query the default.checks table on play.clickhouse.com with user=explorer:

bash
clickhouse client --format PrettyCompactNoEscapes --host play.clickhouse.com --user explorer --secure --query "
SELECT
    replaceRegexpOne(test_name, '::(new|old)$', '') AS test,
    countIf(test_status = 'slower') AS slower_count,
    countIf(test_status = 'faster') AS faster_count,
    countIf(test_status = 'unstable') AS unstable_count,
    count() AS total_runs
FROM default.checks
WHERE pull_request_number = 0
  AND check_name LIKE '%Performance%amd%'
  AND check_start_time >= now() - INTERVAL 30 DAY
  AND test_name IN (
    'norm_distance #2::new',
    'array_sort #0::new'
  )
GROUP BY test
ORDER BY slower_count DESC, test
"

Run one query per architecture — use '%Performance%amd%' for x86 and '%Performance%arm%' for ARM.

Critical details:

  • Host: play.clickhouse.com, user: explorer (NOT play)
  • Table: default.checks (NOT perftest or other tables)
  • pull_request_number = 0 filters to master-only commits (no PR noise)
  • Test names in the DB have ::new and ::old suffixes — always query with ::new
  • Include ALL changed tests in a single IN clause to minimize round-trips
4. Classify each change

For each test, classify based on the master history:

  • Flaky on master: appears as slower in >1% of master runs, or has many unstable entries. Note the count (e.g. "8/685 runs").
  • New in this PR: 0 slower (or faster) appearances on master in the last 30 days with a meaningful number of total runs (>50). This change was first observed in this PR.
  • Rarely on master: 1-2 appearances out of hundreds. Treat as borderline — note it but don't dismiss.
  • For "faster" results: check if the test was previously slower on master (meaning this PR fixes it).
5. Present the verdict

Present the final classification in a table per architecture:

MagnitudeTestMaster slower/total (30d)Verdict

Classify as:

  • Flaky — frequently appears on master, dismiss
  • Unstable — high unstable count on master, dismiss
  • New in this PR — investigate — regression not seen on master before
  • New in this PR — improvement — speedup not seen on master before, or fixes a previously-slower test
  • Rarely on master — borderline, note it
6. Summary

After the tables, provide a brief summary:

  • Count of genuine regressions (never on master) per architecture
  • Count of genuine improvements per architecture
  • Count of flaky/dismissed entries
  • Call out any extreme outliers (>2x) explicitly regardless of flaky status
7. Deep-dive: accessing CI logs (when asked)

When the user asks to investigate a specific regression further, download and analyze the CI artifacts.

Get artifact links using the fetch_ci_report.js tool with --links:

bash
node .claude/tools/fetch_ci_report.js "<CI-report-URL-for-specific-batch>" --links

This will show logs.tar.zst, job.log.zst, all-query-metrics.tsv, report.html, etc.

Download and extract server logs:

bash
curl -sS "<logs.tar.zst-URL>" -o tmp/perf_logs.tar.zst
tar -I zstd -tf tmp/perf_logs.tar.zst  # list contents
tar -I zstd -xf tmp/perf_logs.tar.zst -C tmp/ ./right/server.log  # PR binary
tar -I zstd -xf tmp/perf_logs.tar.zst -C tmp/ ./left/server.log   # master binary
  • right/server.log = PR binary (the "new" version)
  • left/server.log = master binary (the "old" version)

Analyze the query execution by finding the query ID in the server log:

bash
# Find the query and its timing
grep "math.query2" tmp/right/server.log | grep -E "Aggregated|Read.*rows.*sec"

The perf framework uses query IDs like {test_name.query{N}.run{M}} (e.g. math.query2.run0). Look at:

  • Aggregated ... in X sec — actual compute time
  • executeQuery: Read N rows ... in X sec — total query time
  • TCPHandler: Processed in X sec — wall clock including network

Compare both servers during the same time window to see if the machine was under load or if only the PR binary was slow. Check for:

  • Background activity (merges, flushes, system log writes)
  • Errors or warnings
  • Whether the slowdown is in UserTime (CPU-bound) or wall clock (I/O/contention)

Check the git hash of the binary that actually ran:

bash
grep "Starting ClickHouse" tmp/right/server.log | head -1

This shows the exact revision, build ID, and PID. Compare with what you expect — the CI perf test may use a different binary than the latest commit if the build was cached.

Show full SKILL.md (493 more words)Show less
8. Deep-dive: trace log profiling (flamegraphs)

The perf job writes right-trace-log.tsv and left-trace-log.tsv, exports of system.trace_log from each server, containing CPU and real-time stack samples for every query.

Two limits to know before reaching for these files. They are NOT shipped in logs.tar.zst (the archive excludes *-trace-log.tsv), and the dump holds only the four columns the report reads: query_id, trace, trace_type, size. There is no symbols column; addresses are symbolized separately through *-addresses.tsv.

Use the report's collapsed stacks instead. report/stacks.$version.tsv already carries symbolized, collapsed stacks per query, and it is what the report's own flamegraphs are built from. It has no header; its first three columns are test, query_index and trace_type, so select a query by those three fields (the math.queryN spelling is a query id and never appears in this file). Keep the trace types apart: CPU and Real count samples while MemorySample and JemallocSample sum bytes, so folding them together mixes units.

bash
tar -I zstd -xf tmp/perf_logs.tar.zst -C tmp/ ./report/stacks.right.tsv
awk -F'\t' '$1 == "math" && $2 == 2 && $3 == "CPU"' tmp/report/stacks.right.tsv \
  | cut -f 5- | sed 's/\t/ /g' > tmp/math2_right.collapsed

The resulting .collapsed file can be processed with flamegraph.pl. Compare left (master) vs right (PR) to see what changed. Not with analyze-assembly.py --perf-map: that flag reads JSONL records keyed by instruction address, so every folded symbol;...;symbol count line is rejected as a JSON parse error and the weighting silently comes out empty.

This is the fastest way to identify the root cause of a regression. Example: for a 31x exp10 regression, the trace log immediately showed modf consuming 577/1200 CPU samples on the PR binary vs 28/60 on master — pinpointing the exact function responsible without needing to reproduce locally.

The archive also contains pre-built SVG flamegraphs for queries the framework selected for detailed analysis:

bash
tar -I zstd -tf tmp/perf_logs.tar.zst | grep "\.svg"

These come in .left.svg (master), .right.svg (PR), and .diff.svg (differential) variants, for both CPU and Real time. Not all queries get flamegraphs — only those the framework considers interesting.

9. Deep-dive: profile events from raw TSV

The archive contains per-query raw metric data in analyze/tmp/{test}_{queryN}.tsv. Each row is one run, with an array of all ProfileEvents (counters like UserTimeMicroseconds, OSCPUVirtualTimeMicroseconds, RealTimeMicroseconds, etc.).

bash
tar -I zstd -xf tmp/perf_logs.tar.zst -C tmp/ ./analyze/tmp/math_2.tsv

The all-query-metrics.tsv file (linked from --links output) contains the processed comparison data with old/new values, ratios, and thresholds for every metric of every query. The fetch_perf_report.py tool already parses this, but the raw file has all metrics, not just client_time.

Important: use unique download paths

When analyzing multiple batches or PRs, use unique directory names to avoid overwriting:

bash
mkdir -p tmp/batch1_amd tmp/batch5_amd
curl -sS "<batch1-logs-url>" -o tmp/batch1_amd/logs.tar.zst
curl -sS "<batch5-logs-url>" -o tmp/batch5_amd/logs.tar.zst
tar -I zstd -xf tmp/batch1_amd/logs.tar.zst -C tmp/batch1_amd/

Rules

  • Never dismiss a regression without checking master history first. Do not call anything "noise" or "not actionable" based on intuition alone.
  • Show all data. The user wants the full picture, not a filtered summary.
  • Both architectures matter. AMD runs on Intel Sapphire Rapids (m7i.4xlarge), ARM runs on Graviton 4 (m8g.4xlarge). Regressions on one but not the other are still real.
  • A test appearing in multiple CI runs of the same PR is a strong signal even if it also occasionally appears on master.
  • Do not look at the PR code or run local benchmarks unless explicitly asked. This skill is purely about CI report analysis.

© ClickHouse, 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

Files

Just SKILL.md in .claude/skills/perf-report of ClickHouse/ClickHouse.

Open the folder on GitHubat commit cd023af

Compare with similar skills

Perf Report 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.

Perf Report compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Perf Report this skillClickHouse/ClickHouse50k—~2.6kAutomated safety check: NotesApache-2.0
Update Keyword Engine ListsClickHouse/clickhouse-java1.6k—~457Automated safety check: PassApache-2.0
Testingar-io/ar-io-node127—~2.6kAutomated safety check: NotesAGPL-3.0
Local Platform E2Ecomputesdk/benchmarks126—~3kAutomated safety check: NotesMIT
Manual Testhypequery/hypequery103—~618Automated safety check: PassCustom licence
Clickhouse CI Integrationjeremylongshore/tons-of-skills-marketplace2.8k—~1.4kAutomated safety check: PassMIT

Similar skills

  • Update Keyword Engine Lists

    ClickHouse/clickhouse-java

    Update ALLOWEDKEYWORDALIASES in ClickHouseSqlUtils.java and ENGINETOTABLETYPE in DatabaseMetaDataImpl.java from failing test output.

    1.6k GitHub stars~457 tokensUpdated today
    DatabasesAuto-check passed
  • Testing

    ar-io/ar-io-node

    Decision guide for testing in the ar-io-node repo — which test layer to use, how to run it, and which helpers to reach for.

    127 GitHub stars~2.6k tokensUpdated today
    Testing & QAAuto-check: notes
  • Local Platform E2E

    computesdk/benchmarks

    Stand up benchmarks-platform locally (Postgres + MinIO + ClickHouse in docker) and run a real @benchsdk/runner benchmark against it, with no cloud or provider credentials.

    126 GitHub stars~3k tokensUpdated yesterday
    DatabasesAuto-check: notes
  • Manual Test

    hypequery/hypequery

    Execute one of the model-runnable E2E test specs in testing/ (cli, datasets, serve, mcp, react) against a real ClickHouse instance.

    103 GitHub stars~618 tokensUpdated today
    DatabasesAuto-check passed
  • Clickhouse CI Integration

    jeremylongshore/tons-of-skills-marketplace

    Run ClickHouse integration tests in CI with GitHub Actions and Docker containers.

    2.8k GitHub stars~1.4k tokensUpdated today
    DatabasesAuto-check passed
  • Clickhouse Logs Queries

    supabase/supabase

    Official

    Write, review, and migrate Supabase logs queries against the ClickHouse-backed logs table (the logs.all.otel analytics endpoint).

    111k GitHub stars~2.4k tokensUpdated today
    DatabasesAuto-check passed

More from ClickHouse/ClickHouse

All 24 skills in this repo
  • Keeper Stress Analysis

    ClickHouse/ClickHouse

    Analyze ClickHouse Keeper stress-test results from play.clickhouse.com / keeperstresstests data warehouse.

    50k GitHub stars~4.7k tokensUpdated today
    Auto-check passed
  • Perf Comparison

    ClickHouse/ClickHouse

    Evaluate ClickHouse performance test results from existing CI/dashboard data or local perf.py runs.

    50k GitHub stars~3.9k tokensUpdated today
    Auto-check: notes
  • Patch Release Check

    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…

    50k GitHub stars~4k tokensUpdated today
    Auto-check: notes
  • Alloc Profile

    ClickHouse/ClickHouse

    Analyze a jemalloc (or other) allocation profile in collapsed stack format.

    50k GitHub stars~4.3k tokensUpdated today
    Auto-check passed
  • Bisect

    ClickHouse/ClickHouse

    Bisect a ClickHouse regression using pre-built master binaries from CI.

    50k GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • Clickhouse PR Description

    ClickHouse/ClickHouse

    Generate PR descriptions for ClickHouse/ClickHouse that match maintainer expectations.

    50k GitHub stars~1.9k tokensUpdated today
    Auto-check passed

Works with

Questions about Perf Report

What does Perf Report do?

Analyze CI performance comparison reports for a ClickHouse PR. Perf Report is an agent skill from ClickHouse/ClickHouse. Analyze CI performance comparison reports for a ClickHouse PR.

When should I use Perf Report?

Perf Report fits situations like: tasks that involve Data warehousing; tasks that involve Failing and flaky tests.

How do I install Perf Report in Claude Code?

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

How do I install Perf Report in Codex?

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

Can I use Perf Report 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 ClickHouse/ClickHouse --skill perf-report -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/perf-report, .gemini/skills/perf-report, .github/skills/perf-report and .opencode/skills/perf-report in your project.

What does Perf Report need to run?

Going by SKILL.md and its folder, Perf Report needs the command-line tools its instructions call (curl, python3, clickhouse and node). Our summary lists: Python 3. Its frontmatter pre-approves these tools: Bash, Read, Grep, Glob, WebFetch.

Does Perf Report access the network?

SKILL.md contains no URLs. Its commands use curl, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Perf Report safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Perf Report use?

Perf Report 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.

How many tokens does Perf Report use?

About 2.6k tokens (SKILL.md is roughly 11k 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 Perf Report?

Skills that share tags, products or a category with Perf Report: Update Keyword Engine Lists (ClickHouse/clickhouse-java, 1.6k stars), Testing (ar-io/ar-io-node, 127 stars), Local Platform E2E (computesdk/benchmarks, 126 stars) and Manual Test (hypequery/hypequery, 103 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Perf Report?

ClickHouse (a GitHub organization) maintains it in ClickHouse/ClickHouse, which has 50,288 GitHub stars. The repository holds 24 skills in this directory. The repository was last updated on October 8, 2026.

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