diagnose-clickhouse-cl…
Diagnose ClickHouse cluster health and provide concrete remediation.
Query ClickHouse system tables to inspect query logs, monitor cluster health, check replication status, and analyze slow queries. Use when the user mentions "system tables", "query_log", "ClickHouse monitoring", "cluster status", "slow queries", or asks to diagnose ClickHouse
Claude Code
$ npx -y skills add FrankChen021/datastoria --skill clickhouse-system-queries --agent claude-code
Codex
$ npx skills add FrankChen021/datastoria --skill clickhouse-system-queries -a codex -y
Cursor
$ npx skills add FrankChen021/datastoria --skill clickhouse-system-queries -a cursor -y
Gemini CLI
$ npx skills add FrankChen021/datastoria --skill clickhouse-system-queries -a gemini-cli -y
GitHub Copilot
$ npx skills add FrankChen021/datastoria --skill clickhouse-system-queries -a github-copilot -y
OpenCode
$ npx skills add FrankChen021/datastoria --skill clickhouse-system-queries -a opencode -y
Windsurf
$ npx skills add FrankChen021/datastoria --skill clickhouse-system-queries -a windsurf -y
name: clickhouse-system-queries description: > Query ClickHouse system tables to inspect query logs, monitor cluster health, check replication status, and analyze slow queries. Use when the user mentions "system tables", "query_log", "ClickHouse monitoring", "cluster status", "slow queries", or asks to diagnose ClickHouse operational issues. metadata: author: DataStoria disable-slash-command: true
Use this skill when the user asks for operational inspection on ClickHouse `system.*` tables.
Current table coverage:
Relationship to `sql-expert`:
Example — map vs flattened access:
-- Map access SELECT ProfileEvents['DistributedConnectionFailTry'] AS fails FROM system.query_log WHERE event_date = today(); -- Flattened column access SELECT ProfileEvent_DistributedConnectionFailTry AS fails FROM system.query_log WHERE event_date = today();
1. **Resolve target** — identify system table and intent. Inherit the most recent time window from conversation, or default to last 60 minutes.
2. **Load reference** — for `system.query_log`, call `skill_resource` to load `references/system-query-log.md` before writing any SQL. For unsupported tables, fall back to `sql-expert`.
3. **Execute** — choose the right tool:
-- search_query_log: standard lookup
-- finds top 10 slowest queries in the last hour
-- execute_sql: time-bucketed visualization
SELECT toStartOfFiveMinutes(event_time) AS bucket,
count() AS queries,
avg(query_duration_ms) AS avg_ms
FROM system.query_log
WHERE event_date = today() AND event_time > now() - INTERVAL 1 HOUR
GROUP BY bucket ORDER BY bucketDefault to `LIMIT 50` unless the user specifies otherwise.
4. **Summarize** with concise findings and next actions.
The AI-native ClickHouse console for your cluster diagnostics, query generation, evidence-based optimization, intelligent visualization.
Diagnose ClickHouse cluster health and provide concrete remediation.
Diagnose ClickHouse runtime query failures when the user wants database-level cause and fix guidance from an error or numeric…
Optimize slow queries, analyze SQL performance, and collect evidence for expensive workloads.
Investigate application or repository source code with search_file and read_file to explain behavior, trace root causes of…
Expert system for generating, validating, and optimizing ClickHouse SQL. Use this when the user needs data, queries, or analysis.
Rules for charts and visualization. Use when the user asks for charts, graphs, plots, or visual representations (line, bar, pie,…
Use this skill to extract structured Markdown/JSON from PDFs and document images—tables with cell-level precision, formulas as…
Estimates intracellular metabolic fluxes from steady-state carbon-13 isotope-tracing measurements using validated atom maps,…