一键导入
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.