CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

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 `querying-production-databases` skill.

Quality

89%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

—

The risk profile of this skill

SKILL.md
Quality
Evals
Security

Quality

Content

81%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 well-engineered methodology skill: the multi-step workflow is clearly sequenced with real validation checkpoints and fallbacks, and detail is appropriately pushed into one-level-deep reference files. The body is somewhat long with a few repeated caveats, and the step-9 delta methodology and agent-grounding playbook are detailed enough that they could be extracted into references.

Suggestions

Trim the repetition of the shareable-Metabase-link and sibling-repo-fallback instructions, each of which appears three times (intro, step 8/9, and report structure); stating each once in the workflow and once in the report checklist is enough.

Consider moving the full delta-comparison methodology (step 9's window-comparability and incident-exclusion rules) into a reference file like references/delta-analysis.md, keeping a short pointer in the main workflow.

Consolidate the step-9 caveats into a compact list; the five overlapping warnings about window comparability, incident dominance, and slow-set-only metrics could be tightened to two or three sentences.

DimensionReasoningScore

Conciseness

The body is dense with non-obvious, PostHog-specific knowledge (retention limits of system.query_log, the type='QueryFinish' trap, two-populations caveat) and avoids generic concept explanations, but a few caveats are repeated — the shareable-Metabase-link instruction and the sibling-repo fallback each appear three times, and step 9 is padded with overlapping delta warnings that could be trimmed.

4 / 5

Actionability

Guidance is largely executable: the exact slow-query predicate "query_duration_ms > 30000 OR exception_code IN (159, 160, 241)", typed column table, the command "hogli metabase:databases", and precise output naming ("<YYYY-MM-DD>-<topic>.md"). The bulk ready-to-run SQL lives in references/query-patterns.md (appropriate), but the body alone is not copy-paste runnable for the full workflow and the referenced files could not be verified in the bundle.

4 / 5

Workflow Clarity

A clearly sequenced 9-step coarse-to-specific workflow with explicit validation checkpoints — step 1 verifies archive coverage before trusting a window, step 9 enforces window comparability and incident-excluded baselines before quoting deltas — plus deliberate ordering rationale ("Do not read previous reports until step 9"), a fallback path when the sibling repo is absent, and an ordered report-structure checklist.

5 / 5

Progressive Disclosure

Good structure: bulk SQL is split into three one-level-deep reference files, each described in a References section and cited inline at point of use ("references/query-patterns.md §1b", "§4c", "§7"), with related skills linked. However, the body runs ~240 lines and some self-contained methodology (the full delta-comparison procedure in step 9, the grounding-recommendations agent playbook) could itself live in a reference file.

4 / 5

Total

17

/

20

Passed

Description

96%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 description: it explicitly states what the skill does and when to use it with concrete, natural trigger phrases, and stays specific to the PostHog ClickHouse reporting niche. The only weakness is slight trigger overlap with the closely related per-query optimization skill.

DimensionReasoningScore

Specificity

Multiple concrete actions are named — "Produce and structure slow-query performance reports", "categorize and attribute slow queries", "root-cause patterns (unmaterialized JSONExtract, high-cardinality breakdowns, heavy joins)", plus the data source and report structure — comprehensive for the domain, with no vague filler.

5 / 5

Completeness

Both halves are explicitly answered: the "what" ("Produce and structure slow-query performance reports for PostHog's production ClickHouse (US and EU)") and an explicit "Use when asked for..." clause listing concrete trigger scenarios. Third-person voice is used throughout.

5 / 5

Trigger Term Quality

Natural trigger phrases a user would actually say are covered comprehensively: "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".

5 / 5

Distinctiveness Conflict Risk

The niche is clear (fleet-level ClickHouse performance reporting for PostHog, US/EU) with report/analysis-shaped triggers, but "OOM or timeout investigation" overlaps slightly with the sibling optimizing-clickhouse-and-hogql-queries skill that owns individual-query investigation — minor overlap risk with a closely related skill rather than minimal.

4 / 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.

Validation — 14 / 16 Passed

Validation for skill structure

CriteriaDescriptionResult

relative_links

Relative link issues: 7 suspicious

Warning

referenced_paths_exist

Referenced path issues: 16 missing

Warning

Total

14

/

16

Passed

Repository

PostHog/posthog

Path

.agents/skills/generating-clickhouse-query-performance-reports/SKILL.md

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.