CtrlK
BlogDocsLog inGet started
Tessl Logo

generating-clickhouse-query-performance-reports

Produce and structure slow-query performance reports for PostHog's production ClickHouse (US and EU). Use when asked for a slow query report, query performance analysis over the last N days, per-team query cost, OOM or timeout investigation, cluster cost/memory regressions, or materialization candidates. Covers the modern `query_log_archive` source (typed `lc_*` columns, multi-day retention), how to categorize and attribute slow queries, root-cause patterns (unmaterialized JSONExtract, high-cardinality breakdowns, heavy joins), and the report structure. Runs queries via the `query-clickhouse-via-metabase` skill.

73

Quality

92%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide

SecuritybySnyk

Low

Low-risk findings worth noting

SKILL.md
Quality
Evals
Security

Quality

Content

85%

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

The body is a high-quality, highly actionable methodology with a clear sequenced workflow and excellent one-level-deep progressive disclosure into real reference files. Its only real weakness is conciseness: a handful of key caveats and the save-location instruction are repeated across sections and could be consolidated.

Suggestions

Consolidate the 'all queries, not just the slow set' rationale into a single canonical statement (e.g. once in step 2 and once in Report structure §5) and reference it elsewhere rather than re-deriving it in steps 5 and Interpreting the results.

State the report save-location rule once (e.g. in Report structure) and link back to it from step 9 and the grounding section instead of repeating the temp-fallback guidance three times.

The 'Covers the modern query_log_archive source...' detail in the description and the Data source section overlap; consider trimming the description's source detail to keep it a trigger-focused summary.

DimensionReasoningScore

Conciseness

Most content is dense, non-obvious expert knowledge (lc_* columns, exception codes, archive retention) that earns its place, but several points are restated multiple times — the 'all queries, not just the slow set' caveat recurs across steps 2, 5, Interpreting the results, and Report structure §5, and the sibling-repo save location is repeated three times — so it could be tightened. It is above the score-1 'explains concepts Claude knows' floor but below the fully lean anchor.

2 / 3

Actionability

Provides executable SQL predicates ('query_duration_ms > 30000 OR exception_code IN (159, 160, 241)', 'FROM posthog.query_log_archive'), concrete commands ('hogli metabase:databases'), a full typed-column table, and precise file-naming and report-structure conventions — copy-paste ready guidance rather than abstract direction.

3 / 3

Workflow Clarity

A clearly sequenced 9-step process with explicit ordering guidance ('Do not read previous reports until step 9'), a validation checkpoint (step 1 'Confirm the window' via per-day count), and explicit feedback logic in the delta step (comparable windows, incident-excluded baseline) — matching the 'clear sequence with explicit validation steps' anchor.

3 / 3

Progressive Disclosure

The SKILL.md is an overview with three well-signaled, one-level-deep references (query-patterns.md, materialization-analysis.md, hogql-deep-dive.md — all real files in references/), each annotated with what it contains; bulk SQL and deep dives are appropriately split out with easy navigation.

3 / 3

Total

11

/

12

Passed

Description

100%

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

The description is specific, written in third person, and pairs concrete capabilities with an explicit, well-populated 'Use when...' trigger clause. It carves out a distinctive niche with low conflict risk. Verbosity is the only minor weakness, but it stays on the right side of the specificity/verbosity tradeoff.

DimensionReasoningScore

Specificity

Lists multiple concrete actions — 'Produce and structure slow-query performance reports', 'categorize and attribute slow queries', and named root-cause patterns ('unmaterialized JSONExtract, high-cardinality breakdowns, heavy joins') — matching the 'lists multiple specific concrete actions' anchor.

3 / 3

Completeness

Clearly answers both 'what' (produce/structure reports, covers the query_log_archive source, categorization, root-cause patterns, report structure) and 'when' via an explicit 'Use when...' clause, so it is not capped at 2.

3 / 3

Trigger Term Quality

The 'Use when asked for a slow query report, query performance analysis over the last N days, per-team query cost, OOM or timeout investigation, cluster cost/memory regressions, or materialization candidates' clause gives natural terms a user would actually say, with strong coverage.

3 / 3

Distinctiveness Conflict Risk

A clear niche — slow-query reporting for PostHog's production ClickHouse (US/EU) via a named sibling skill — with distinct triggers that are unlikely to fire for unrelated skills.

3 / 3

Total

12

/

12

Passed

Validation

87%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation14 / 16 Passed

Validation for skill structure

CriteriaDescriptionResult

relative_links

Relative link issues: 6 suspicious

Warning

referenced_paths_exist

Referenced path issues: 2 missing

Warning

Total

14

/

16

Passed

Repository
PostHog/posthog
Reviewed

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.