Official agent skill

Generating Clickhouse Query Performance Reports

by PostHog in PostHog/posthog

Produce and structure slow-query performance reports for PostHog's production ClickHouse (US and EU).

OfficialCustom licenceAuto-check passedDatabases

Install Generating Clickhouse Query Performance Reports

skills CLI
$ npx skills add PostHog/posthog --skill generating-clickhouse-query-performance-reports -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install PostHog/posthog generating-clickhouse-query-performance-reports --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/PostHog/posthog.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/generating-clickhouse-query-performance-reports .claude/skills/generating-clickhouse-query-performance-reports && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
generating-clickhouse-query-performance-reports
GitHub stars
40k
Token cost
~5.1k tokens
SKILL.md length
2,305 words
Files
4 (incl. references)
Skills in repo
252
Repo updated
First seen
Licence
Custom licence

At a glance

Produce and structure slow-query performance reports for PostHog's production ClickHouse (US and EU).

  • Works in 9 steps: Confirm the window. Per-day count() over… → Headline summary. Total slow queries,… → Date distribution. Slow count, timeouts,… → …
  • Asked for a slow query report
  • SKILL.md covers Data source:…, What counts as a slow query, Producing the report and Grounding recommendations in…, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Generating Clickhouse Query Performance Reports is an agent skill from PostHog/posthog, published by the product's own GitHub organization. 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 querylogarchive source (typed lc columns, multi-day retention), how to categorize and attribute slow queries, root-cause patterns (unmaterialized JSONExtract, high-cardinality breakdowns, heavy…

Its SKILL.md is about 5.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files (for example `references/hogql-deep-dive.md`, `references/materialization-analysis.md` and `references/query-patterns.md`).

It sits in Databases, covering Query optimization and Data warehousing. It works with ClickHouse and PostHog. The repository describes itself as: :hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error…

When your agent uses it

  • Asked for a slow query report
  • Query performance analysis over the last N days
  • Per-team query cost
  • Timeout investigation

Example prompts

  • “/generating-clickhouse-query-performance-reports”

Workflow steps

9 steps, taken from the first numbered list in SKILL.md.

  1. Confirm the window. Per-day count() over the intended range to verify the archive actually
  2. Headline summary. Total slow queries, total cluster query-hours, bytes read, teams touched,
  3. Date distribution. Slow count, timeouts, and OOMs per day. This is where incidents announce
  4. Categorize. Group by lc_kind × lc_product × lc_access_method. This separates background
  5. Attribute. Drill into the worst categories by team_id. Rank by total cluster-hours
  6. Characterize user-facing slowness. For lc_kind='request' AND lc_product='product_analytics'
  7. Root-cause the worst offenders. For the top findings, do not stop at "team X is slow": pull the
  8. Examples + write-up. Capture query_id + event_date for the worst offenders in each finding,
  9. Diff against the previous report (do this last, if there is one). If the sibling

What it can do on your machine

Read from SKILL.md and the folder at commit 812e5c6. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are sql).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Generating Clickhouse Query Performance Reports loads about 5.1k tokens when it runs, and up to ~12k if it reads all its reference files. Until then it costs about 170 tokens; SKILL.md has 2,305 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~170
When it runs · the whole SKILL.md, loaded when a task matches
~5.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~12k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

Its licence (Custom licence) doesn't allow us to republish the file, so here is its outline and opening line. It has 2,305 words (~5,073 tokens).

“This skill is the methodology for investigating slow ClickHouse queries and writing up a performance report. It pairs with querying-production-databases-via-metabase, which is the mechanism (SSO-gated auth and hogli metabase:query). Run every query in this skill through that one.”

— opening of SKILL.md by PostHog, Custom licence
name
generating-clickhouse-query-performance-reports

Read the full SKILL.md on GitHub

Files

SKILL.md and 3 other files (references) in .agents/skills/generating-clickhouse-query-performance-reports of PostHog/posthog.

  • SKILL.md
  • references/hogql-deep-dive.md
  • references/materialization-analysis.md
  • references/query-patterns.md

Open the folder on GitHubat commit 812e5c6

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders. This page covers the copy in PostHog/posthog, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Generating Clickhouse Query Performance Reports next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Generating Clickhouse Query Performance Reports compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Generating Clickhouse Query Performance Reports this skillPostHog/posthog40k—~5.1kAutomated safety check: PassCustom licence
Clickhouse Ioaffaan-m/ECC276k1 repos~2.7kAutomated safety check: PassMIT
Clickhouse Performance Tuningjeremylongshore/tons-of-skills-marketplace2.8k—~1.2kAutomated safety check: PassMIT
Pytorch Clickhousepytorch/test-infra113—~2.8kAutomated safety check: PassCustom licence
Clickhouse IohellangleZ/burn-in-cceverywhere-ralph11214 repos~2.5kAutomated safety check: PassNone
Clickhouse System QueriesFrankChen021/datastoria327—~731Automated safety check: PassCustom licence

Similar skills

  • Clickhouse Io

    affaan-m/ECC

    ClickHouse database patterns, query optimization, analytics, and data engineering best practices for high-performance analytical workloads.

    276k GitHub starsUsed in 1 repo~2.7k tokens
    DatabasesAuto-check passed
  • Clickhouse Performance Tuning

    jeremylongshore/tons-of-skills-marketplace

    Optimize ClickHouse query performance with indexing, projections, settings tuning, and query analysis using system tables.

    2.8k GitHub stars~1.2k tokensUpdated today
    DatabasesAuto-check passed
  • Pytorch Clickhouse

    pytorch/test-infra

    Load this FIRST whenever working with PyTorch CI data (any pytorch/ org repo), the torchci/HUD codebase, or the PyTorch HUD ClickHouse database.

    113 GitHub stars~2.8k tokensUpdated today
    DatabasesAuto-check passed
  • Clickhouse Io

    hellangleZ/burn-in-cceverywhere-ralph

    ClickHouse database patterns, query optimization, analytics, and data engineering best practices for high-performance analytical workloads.

    112 GitHub starsUsed in 14 repos~2.5k tokens
    DatabasesAuto-check passed
  • Clickhouse System Queries

    FrankChen021/datastoria

    Query ClickHouse system tables to inspect query logs, monitor cluster health, check replication status, and analyze slow queries.

    327 GitHub stars~731 tokensUpdated 2 mo ago
    DatabasesAuto-check passed
  • Clickhouse Managed Postgres Rca

    ClickHouse/agent-skills

    MUST USE when investigating performance issues on a ClickHouse-managed Postgres instance.

    544 GitHub stars~1.2k tokensUpdated 10 days ago
    DatabasesAuto-check passed

More from PostHog/posthog

All 252 skills in this repo
  • Authoring Log Alerts

    PostHog/posthog

    Official

    Author useful, low-noise log alerts on services in a PostHog project.

    40k GitHub stars~3k tokensUpdated today
    Auto-check passed
  • Official

    Operating procedure for the conflict-autoresolver agent: sweep open PostHog/posthog PRs that conflict with master, resolve the trivial conflicts (generated artifacts deterministically, source…

    40k GitHub stars~4.2k tokensUpdated today
    Auto-check passed
  • Official

    Help users debug PostHog Error Tracking stack-trace symbolication for any supported platform — JavaScript/TypeScript web, React Native (Hermes), Android (Proguard / R8), or iOS / macOS (dSYM).

    40k GitHub stars~2.2k tokensUpdated today
    Auto-check passed
  • Exploring Apm Traces

    PostHog/posthog

    Official

    Investigates distributed application performance using PostHog APM (OpenTelemetry span) data via MCP.

    40k GitHub stars~3.5k tokensUpdated today
    Auto-check passed
  • Exploring LLM Traces

    PostHog/posthog

    Official

    Debug and inspect LLM/AI agent traces using PostHog's MCP tools.

    40k GitHub stars~4.4k tokensUpdated today
    Auto-check passed
  • Investigate Metric

    PostHog/posthog

    Official

    Diagnose why a product metric changed (dropped, spiked, or plateaued) by orchestrating breakdowns, actors, paths, lifecycle, retention, and annotations queries.

    40k GitHub stars~1.9k tokensUpdated today
    Auto-check passed

Categories

Questions about Generating Clickhouse Query Performance Reports

What does Generating Clickhouse Query Performance Reports do?

Produce and structure slow-query performance reports for PostHog's production ClickHouse (US and EU). Generating Clickhouse Query Performance Reports is an agent skill from PostHog/posthog, published by the product's own GitHub organization. Produce and structure slow-query performance reports for PostHog's production ClickHouse (US and EU).

When should I use Generating Clickhouse Query Performance Reports?

Generating Clickhouse Query Performance Reports fits situations like: asked for a slow query report; query performance analysis over the last N days; per-team query cost; timeout investigation.

How do I install Generating Clickhouse Query Performance Reports in Claude Code?

Run `npx skills add PostHog/posthog --skill generating-clickhouse-query-performance-reports -a claude-code`. Or copy the skill folder (.agents/skills/generating-clickhouse-query-performance-reports in PostHog/posthog) into .claude/skills/generating-clickhouse-query-performance-reports in your project. Claude Code loads it when a task matches its description.

How do I install Generating Clickhouse Query Performance Reports in Codex?

Run `npx skills add PostHog/posthog --skill generating-clickhouse-query-performance-reports -a codex`. Or copy the skill folder (.agents/skills/generating-clickhouse-query-performance-reports in PostHog/posthog) into .agents/skills/generating-clickhouse-query-performance-reports in your project. Codex loads it when a task matches its description.

Can I use Generating Clickhouse Query Performance Reports in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add PostHog/posthog --skill generating-clickhouse-query-performance-reports -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/generating-clickhouse-query-performance-reports, .gemini/skills/generating-clickhouse-query-performance-reports, .github/skills/generating-clickhouse-query-performance-reports and .opencode/skills/generating-clickhouse-query-performance-reports in your project.

What does Generating Clickhouse Query Performance Reports need to run?

SKILL.md names no scripts, command-line tools or credentials: Generating Clickhouse Query Performance Reports is instructions for the agent only.

Does Generating Clickhouse Query Performance Reports access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Generating Clickhouse Query Performance Reports safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Generating Clickhouse Query Performance Reports use?

Generating Clickhouse Query Performance Reports has a licence file (the repository's licence) that doesn't match a standard licence. Read it on GitHub before reusing the skill.

How many tokens does Generating Clickhouse Query Performance Reports use?

About 5.1k tokens (SKILL.md is roughly 20k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 7.1k tokens, read only when the agent opens those files.

What are the alternatives to Generating Clickhouse Query Performance Reports?

Skills that share tags, products or a category with Generating Clickhouse Query Performance Reports: Clickhouse Io (affaan-m/ECC, 276k stars), Clickhouse Performance Tuning (jeremylongshore/tons-of-skills-marketplace, 2.8k stars), Pytorch Clickhouse (pytorch/test-infra, 113 stars) and Clickhouse Io (hellangleZ/burn-in-cceverywhere-ralph, 112 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Generating Clickhouse Query Performance Reports?

PostHog (a GitHub organization, an official publisher) maintains it in PostHog/posthog, which has 40,200 GitHub stars. The repository holds 252 skills in this directory. The repository was last updated on October 9, 2026.

Source: PostHog/posthog on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.