clickhouse avatar

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-code

Installs 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 postgresInstancePrometheusGet under the Prometheus tag. Returns Prometheus exposition format. System and workload metrics for one Postgres service.
  • Slow Query Patterns — operation slowQueryPatternsGetList under 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

More from clickhouse/agent-skills

All 10
1wordpress avatarwp-performancewordpress/agent-skillsUse when investigating or improving WordPress performance (backend-only agent): profiling and measurement (WP-CLI profile/doctor, Server-Timing, Query Monitor v6.7Kskills.sh installs
2grafana avataropentelemetrygrafana/skillsInstrument any app with OpenTelemetry and ship metrics / logs / traces to Grafana Cloud or self-hosted Mimir / Loki / Tempo / Pyroscope. Covers SDK auto-instrum6.6Kskills.sh installs
3affaan-m avatarlaravel-securityaffaan-m/eccLaravel security best practices — authentication, authorization, Eloquent safety, CSRF, XSS prevention, API security, and secure deployment configurations.6.6Kskills.sh installs
4assistant-ui avatartoolsassistant-ui/skillsRegisters LLM tools and renders custom tool-call UI in assistant-ui (@assistant-ui/react). Covers the current authoring model: a "use generative" file exporting6.5Kskills.sh installs
5jeffallan avatarfastapi-expertjeffallan/claude-skillsUse when building high-performance async Python APIs with FastAPI and Pydantic V2. Invoke to create REST endpoints, define Pydantic models, implement authentica6.4Kskills.sh installs
6aws avatarcreating-amazon-aurora-db-cluster-with-instancesaws/agent-toolkit-for-awsCreates a complete Amazon Aurora database cluster with instances, handling cluster creation, instance provisioning, and Secrets Manager password management in t6.4Kskills.sh installs