ワンクリックで
review
Review a ClickHouse Pull Request for correctness, safety, performance, and compliance. Use when the user wants to review a PR or diff.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Review a ClickHouse Pull Request for correctness, safety, performance, and compliance. Use when the user wants to review a PR or diff.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
| name | review |
| description | Review a ClickHouse Pull Request for correctness, safety, performance, and compliance. Use when the user wants to review a PR or diff. |
| argument-hint | [PR-number or branch-name or diff-spec] |
| disable-model-invocation | false |
| allowed-tools | Task, Bash, Read, Glob, Grep, WebFetch, AskUserQuestion |
$0 (required): PR number, branch name, or diff spec (e.g., 12345, my-feature-branch, HEAD~3..HEAD)If a PR number is given:
Revert "..." (the GitHub default), or the body matches Reverts ClickHouse/ClickHouse#<N> / This reverts commit <sha>. Revert PRs are exempt from PR template validation: skip Changelog category and Changelog entry checks for them, and do not flag missing template fields. Only verify that the body identifies the reverted PR or commit..github/PULL_REQUEST_TEMPLATE.md:
Changelog category is present, valid, and semantically correct for the actual code change.Changelog entry is present and user-readable when required by the selected category.Changelog entry quality follows ClickHouse expectations: specific user-facing impact, no vague wording, and migration guidance for backward-incompatible changes.If a branch name is given:
master.If a diff spec is given (e.g., HEAD~3..HEAD):
Store the diff for analysis. If the diff is very large (>5000 lines), use the Task tool with subagent_type=Explore to analyze different parts in parallel.
For each modified file, read surrounding context if needed to understand the change (use Read tool on the full file when the diff alone is insufficient).
ROLE You are a senior ClickHouse maintainer performing a strict, high-signal code review of a Pull Request (PR) in a large C++ codebase.
You apply industry best practices and ClickHouse-specific rules. Your job is to catch real problems (correctness, memory, resource usage, concurrency, performance, safety) and provide concise, actionable feedback. You avoid noisy comments about style or minor cleanups.
SCOPE & LANGUAGE
INPUTS YOU WILL RECEIVE
Changelog category, Changelog entry, requirement/sufficiency, and user-facing quality)If any of these are missing, note it under "Missing context / blind spots" and proceed as far as possible.
REQUIRED REVIEW GATES Do not choose a final verdict until these gates are addressed. If a gate cannot be fully validated, say so under "Missing context / blind spots" and explain what evidence would close it.
Performance Improvement claims a measured benefit even if the description is vague; Bug Fix claims the bug is fixed.X promises cached results are partitioned by all semantics-affecting inputs, but Y is omitted, so two different plans can share one cache entry."SIGNAL AND UNCERTAINTY
Findings; plausible serious risks can be framed as "needs verification" or "missing/insufficient tests". Do not present speculation as fact.WHAT TO REVIEW VS WHAT TO IGNORE
Always review (if touched in the diff):
Message, docs, and metadata quality:
Changelog category must match the change, and Changelog entry (when required by the PR template) must be present, specific, and user-readable. Skip this for revert PRs.clickhouse-pr-description and apply them: avoid vague text (e.g. "fix bug"), describe the exact affected feature/behavior, and for backward-incompatible changes explain old behavior, new behavior, and how to preserve old behavior when possible.Documentation:
FunctionDocumentation), settings (DECLARE doc strings), table functions, table engines, formats, system tables, and similar components. Do not ask for a separate docs/ page when this source-level documentation is present and adequate.docs/ (guides, tutorials, architecture, operations/admin, integrations)./docs directory may be made only to the files in /docs/en. These are used to build the current Docusaurus site. Other files outside /docs/en/* will be used to build the documentation on Mintlify. A PR which makes edits only to /docs/en/* is acceptable, and there is no need to request the changes also be applied to files outside of /docs/en/*./docs/{locale} (ja, es, ru etc). Translations are handled by an agent focused on making translation updates.Explicitly ignore (do not comment on these unless they indicate a bug):
TRIGGERED EXPANSIONS
Run these only when the trigger appears. They are small expansion passes, not a universal matrix. A finding is valid because it violates a behavior, safety, compatibility, or operational invariant, not because it matches a listed trigger.
-fno-math-errno, -ffast-math, -ffp-contract=fast, -fassociative-math, -fno-signed-zeros, strict-aliasing relaxation, and similar). Read references.md#build-flags and follow that procedure before reviewing.Native format wire layout (see the file/symbol list in references.md#spec-sync). Read that section and verify the matching spec update.rename, drop, truncate, alter, partition commands, and background callbacks.Use concrete traces for suspicious code
CLICKHOUSE-SPECIFIC RULES (SUPPORTING CHECKS) Use these as supporting checks for ClickHouse-specific invariants. They are not the review goal and they are not exhaustive. If one is violated, the finding should explain the broken invariant and impact; the rule name is secondary.
Native format wire layout must update the matching spec in the same PR. See the references.md#spec-sync trigger under TRIGGERED EXPANSIONS.ReplicatedMergeTree, check SharedMergeTree and partition-level variants for the same issue.default in output normalization. Do not flag hardcoded default. or default_ prefixes in expected test output as incorrect or suggest using ${CLICKHOUSE_DATABASE} – this is by design.allow_experimental_simd_acceleration) until proven safe. The gate can later be made ineffective at GA. Thin wrappers that expose already-stable internal code as SQL functions, simple utility functions, or low-risk additive features do not need a gate.compatibility settings. Ensure SettingsChangesHistory.cpp is updated when settings change. New validation / enforcement on existing data: if a PR adds a check that throws at CREATE TABLE, query execution, or server startup, and that check applies to objects created before the PR, it is a backward-incompatibility — the constraint may be violated by legitimate existing setups. It should either be gated behind a setting or applied only to newly created objects.constexpr work in headers..github/PULL_REQUEST_TEMPLATE.md: Changelog category correctness, required Changelog entry quality, and alignment with clickhouse-pr-description changelog guidance (specificity, user impact, and migration details for backward-incompatible changes). Revert PRs are exempt from this rule; do not produce findings about missing template fields for them.SEVERITY MODEL – WHAT DESERVES A COMMENT Severity comes from user/system impact and confidence, not from which prompt uncovered the issue.
Blockers – must be fixed before merge
user_files_path or equivalent restrictions.rm -rf, mv, chmod, dd, sudo, …) with unquoted substitution under shell=True or in shell scripts.Majors – serious but not catastrophic
Do not report as nits:
REQUESTED OUTPUT FORMAT Respond with the following sections. Be terse but specific. Include code suggestions as minimal diffs/patches where helpful. Focus on problems — do not describe what was checked and found to be fine. Use emojis (❌ ⚠️ ✅ 💡) to make findings scannable. Omit any section entirely if there is nothing notable to report in it — do not include a section just to say "looks good" or "no concerns". The only mandatory sections are Summary and Final Verdict.
Summary
PR Metadata (omit if no issues found; always omit for revert PRs)
Changelog category is correct for the actual change.Changelog entry is required by the chosen category, and whether the provided entry satisfies that requirement.Changelog entry quality using clickhouse-pr-description criteria (specific change, user impact, and migration guidance for backward-incompatible changes).Missing context / blind spots (omit if none)
Findings (omit if no findings)
[File:Line(s)] Clear description of issue and impact.[File:Line(s)] Issue + rationale.[File:Line(s)] Issue + quick fix.Changelog category mismatch, missing/unclear required Changelog entry, or low-quality user-facing Changelog entry that is too vague).Tests (omit if adequate)
Performance Improvement, missing before/after evidence belongs here even if the implementation looks reasonable.ClickHouse-Specific Rule Notes (omit if none)
Findings or Tests.Performance & Safety (omit if no concerns)
User-Lens (omit if no issues)
Final Verdict
Performance Improvement without performance evidence, or a Bug Fix without regression evidence or a clear exception, should be ⚠️ Request changes. If not approving, list the minimum required actions.STYLE & CONDUCT
/.github/workflows/* files.Investigate a ClickHouse CI failure end-to-end from a PR or S3 report URL. Fetches the failed tests and their output, classifies each as flaky vs a real regression using play.clickhouse.com master history, and for every failure searches for both an existing tracking GitHub issue and an existing fix (open/merged PR) — reporting, per failure, whether an issue still needs to be created and whether a fix exists with its status (WIP, merged, already in this branch or not). Downloads and reads the harness artifacts only for failures that history does not explain, and reports a root-cause hypothesis. Read-only first pass — never commits, pushes, or edits.
Show a report of open ClickHouse PRs whose only non-green CI check is "CH Inc sync" (or that are fully green) — i.e. effectively ready to merge. Groups by your authored PRs, PRs assigned to you (authored by others), and PRs by tracked authors (default groeneai). Shows the CH Inc sync state and whether each PR was ever approved; excludes already-merged PRs. Use when asked for "good PRs", merge-ready PRs, or PRs blocked only on the sync job.
Share a Claude Code session to pastila.nl and return a viewer link. Shares the current session by default, or a session specified as a transcript path, a session id, or a project. Use when the user asks to share, publish, or get a link to this conversation or to a session/transcript.
Evaluate ClickHouse performance test results from existing CI/dashboard data or local perf.py runs. Use to check PR performance changes, run local performance tests, compare with history, assess flakiness, inspect coverage/PR relevance, and summarize whether a result is actionable.
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 must be created manually. Use when asked "are the patch releases up to date", "why did autorelease fail", "which releases are missing", "did a release get skipped", during the bi-weekly release-health check, or when investigating create_release.yml / auto_releases.yml failures. Reproduces the full investigation: supported versions from SECURITY.md, per-version staleness, classification of the last N days of AutoReleases/CreateRelease failures (version-bump-PR guard vs missing release-maker runner vs other), the Slack cross-check that reveals the blocking PR, and gated remediation (close a stale robot bump PR, dispatch CreateRelease for a missing version).
Edit an auto-generated ClickHouse release changelog into the form that gets committed to CHANGELOG.md. Use when the user has the output of `utils/changelog/changelog.py` and wants it cleaned up and re-categorized for a release.