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.

74

Quality

93%

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

92%Weight 40%Scale 1-5

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

A high-quality methodology skill body: executable SQL and a precise column table, a well-sequenced 9-step workflow with explicit validation checkpoints, and clean one-level-deep references to real bundle files. The only mild weakness is verbosity in the step-9 delta and grounding-recommendations prose.

DimensionReasoningScore

Conciseness

The body is dense and information-rich, assuming Claude's competence about ClickHouse rather than explaining basics, and every section earns its place; a few explanatory passages (notably the long step-9 delta guidance and the grounding-recommendations prose) could be tightened without losing clarity.

4 / 5

Actionability

It provides copy-paste-ready SQL predicates ('query_duration_ms > 30000 OR exception_code IN (159, 160, 241)'), a concrete typed-column table, exact file references, and a fully specified numbered report structure covering the common cases.

5 / 5

Workflow Clarity

The 9-step workflow is clearly sequenced with explicit validation checkpoints — step 1 confirms retention covers the window before trusting it, and step 9 forces comparable windows before quoting a delta — plus feedback loops like re-running until retention checks pass.

5 / 5

Progressive Disclosure

SKILL.md is a clear methodology overview with well-signaled, one-level-deep references to three real files (query-patterns.md, materialization-analysis.md, hogql-deep-dive.md), each described in a dedicated References section, with bulk SQL patterns appropriately split out of the main file.

5 / 5

Total

19

/

20

Passed

Description

95%Weight 40%Scale 1-5

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

A strong, specific description with an explicit 'Use when...' trigger clause covering many natural phrases and a clearly defined PostHog ClickHouse niche. It is well above the midpoint on every dimension, with only specificity slightly below the top anchor due to capability-area phrasing rather than a crisp enumerated action list.

DimensionReasoningScore

Specificity

Lists several concrete actions — 'Produce and structure slow-query performance reports', categorize/attribute slow queries, root-cause patterns — with domain-specific coverage, but describes capability areas more than a clean enumerated action list, leaving minor gaps versus the comprehensive anchor.

4 / 5

Completeness

It explicitly answers both what (produce/structure reports, categorize, attribute, root-cause, report structure) and when (an explicit 'Use when...' clause with concrete trigger phrases).

5 / 5

Trigger Term Quality

The 'Use when...' clause covers many natural phrases users would say — 'slow query report', 'query performance analysis over the last N days', 'per-team query cost', 'OOM or timeout investigation', 'cluster cost/memory regressions', 'materialization candidates' — with comprehensive synonym coverage.

5 / 5

Distinctiveness Conflict Risk

It targets a clear niche — PostHog production ClickHouse slow-query reports on `query_log_archive` — with distinct triggers and an explicit handoff to a sibling skill, giving minimal conflict risk.

5 / 5

Total

19

/

20

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.