ワンクリックで
query-optimization
Rules for using explain/analyze/optimize tools to help the user tune their queries.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Rules for using explain/analyze/optimize tools to help the user tune their queries.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Rules and strategies for exploring databases, tables, schemas, and searching metadata.
Complex rules for calling render_chart, inferring axes, and choosing chart types based on user intent.
Diagnose a ClickHouse server error (code/name/exception) and give a concrete, actionable fix.
Diagnose part/partition health of a MergeTree table — too many parts, slow/stuck merges, bad partition key.
Diagnose a column/table schema issue — Nullable overhead, oversized integer, or weak compression — and propose an ALTER.
Strict rules on outputting ClickHouse syntax, limiting rows, and rendering SQL in markdown.
| name | query-optimization |
| description | Rules for using explain/analyze/optimize tools to help the user tune their queries. |
The user wants to understand or improve the performance of a query: why it's slow, its execution plan, or a faster rewrite. For server-wide health (what's slow right now) use system-troubleshooting; for partition/merge health use parts-diagnosis.
get_slow_queries — when the user asks "what's been slow" (historical, from query_log).analyze_query — fast static complexity metrics + lightweight recommendations.explain_query — the execution plan ClickHouse generates for the query.get_table_ddl — confirm engine / ORDER BY / PARTITION BY before recommending pruning.optimize_query — produce an AI rewrite with performance tips (delegates to the optimizer).clickhouse-playbook reference skill — before recommending a rewrite, to name the exact pattern (argMax, predicate pushdown, PREWHERE, JOIN ordering, …).PREWHERE, and avoiding cross joins on huge tables.