
Clickhouse Managed Postgres Rca
When your ClickHouse-managed Postgres instance starts crawling, this skill runs a six-step diagnostic workflow that hits two Beta APIs: Prometheus for system gauges like cache hit ratio and active connections, and the Slow Query Patterns endpoint for per-digest latency and IO stats. It triangulates evidence using three built-in heuristics (full scan, N+1 loop, write congestion), then writes up a root cause report with a recommended fix but won't touch your database. The workflow is strict about not hardcoding field names since both APIs are still Beta, so it fetches the OpenAPI spec fresh every session. Nice safety rails for an observability layer that's still moving.
- skills.sh installs
- 6.8K
- GitHub stars
- 565
- last updated
- Aug 21, 2026
Install
$ npx -y skills add clickhouse/agent-skills --skill clickhouse-managed-postgres-rca --agent claude-codeInstalls into .claude/skills of the current project.
Files
ClickHouse Managed Postgres RCA
When to use
Trigger whenever a user reports slowness, high CPU, low throughput, cache thrash, or any unexplained pain on a ClickHouse-managed Postgres instance.
What you have access to
Two APIs on https://api.clickhouse.cloud (HTTP Basic auth
using a ClickHouse Cloud API key/secret pair):
- Prometheus metrics — operation
postgresInstancePrometheusGetunder the Prometheus tag. Returns Prometheus exposition format. System and workload metrics for one Postgres service. - Slow Query Patterns — operation
slowQueryPatternsGetListunder the Postgres tag. Returns per-digest latency, IO, and call statistics for normalized query patterns. Beta.
Both endpoints require an organizationId and a serviceId as
path parameters. The user must supply both, plus the API
key/secret pair.
What you do NOT have
- Query plans / EXPLAIN output.
- Per-table scan-type counters (
seq_scan/idx_scan). - Autovacuum or last-ANALYZE timestamps.
Reason from IO and timing signals, not from a plan tree.
Workflow
Six steps, in order. Do not skip ahead.
Sponsors
Details
- Repository
- github.com/clickhouse/agent-skills
- Categories
- Backend & APIs, AI & Agent Building, Debugging, Automation & Workflows, Databases
- First seen
- Jun 11, 2026