Profiling Slow API Endpoints
PostHog/posthog-foss
Profiles slow PostHog API endpoints when the main cost is in Postgres or Python.
MUST USE when investigating performance issues on a ClickHouse-managed Postgres instance.
$ npx skills add ClickHouse/agent-skills --skill clickhouse-managed-postgres-rca -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install ClickHouse/agent-skills clickhouse-managed-postgres-rca --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/ClickHouse/agent-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/clickhouse-managed-postgres-rca .claude/skills/clickhouse-managed-postgres-rca && rm -rf skills-srcUse ~/.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/
Install the "clickhouse-managed-postgres-rca" agent skill from https://github.com/ClickHouse/agent-skills/tree/main/skills/clickhouse-managed-postgres-rca into .claude/skills/clickhouse-managed-postgres-rca/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "clickhouse-managed-postgres-rca", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/ClickHouse/agent-skills/tree/main/skills/clickhouse-managed-postgres-rcaType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add ClickHouse/agent-skills --skill clickhouse-managed-postgres-rca -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install ClickHouse/agent-skills clickhouse-managed-postgres-rca --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ClickHouse/agent-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/clickhouse-managed-postgres-rca .agents/skills/clickhouse-managed-postgres-rca && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "clickhouse-managed-postgres-rca" agent skill from https://github.com/ClickHouse/agent-skills/tree/main/skills/clickhouse-managed-postgres-rca into .agents/skills/clickhouse-managed-postgres-rca/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "clickhouse-managed-postgres-rca", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add ClickHouse/agent-skills --skill clickhouse-managed-postgres-rca -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install ClickHouse/agent-skills clickhouse-managed-postgres-rca --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ClickHouse/agent-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/clickhouse-managed-postgres-rca .cursor/skills/clickhouse-managed-postgres-rca && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "clickhouse-managed-postgres-rca" agent skill from https://github.com/ClickHouse/agent-skills/tree/main/skills/clickhouse-managed-postgres-rca into .cursor/skills/clickhouse-managed-postgres-rca/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "clickhouse-managed-postgres-rca", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/ClickHouse/agent-skills.git --path skills/clickhouse-managed-postgres-rca--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add ClickHouse/agent-skills --skill clickhouse-managed-postgres-rca -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install ClickHouse/agent-skills clickhouse-managed-postgres-rca --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ClickHouse/agent-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/clickhouse-managed-postgres-rca .gemini/skills/clickhouse-managed-postgres-rca && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "clickhouse-managed-postgres-rca" agent skill from https://github.com/ClickHouse/agent-skills/tree/main/skills/clickhouse-managed-postgres-rca into .gemini/skills/clickhouse-managed-postgres-rca/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "clickhouse-managed-postgres-rca", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install ClickHouse/agent-skills clickhouse-managed-postgres-rcaInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add ClickHouse/agent-skills --skill clickhouse-managed-postgres-rca -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/ClickHouse/agent-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/clickhouse-managed-postgres-rca .github/skills/clickhouse-managed-postgres-rca && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "clickhouse-managed-postgres-rca" agent skill from https://github.com/ClickHouse/agent-skills/tree/main/skills/clickhouse-managed-postgres-rca into .github/skills/clickhouse-managed-postgres-rca/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "clickhouse-managed-postgres-rca", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add ClickHouse/agent-skills --skill clickhouse-managed-postgres-rca -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install ClickHouse/agent-skills clickhouse-managed-postgres-rca --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ClickHouse/agent-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/clickhouse-managed-postgres-rca .opencode/skills/clickhouse-managed-postgres-rca && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "clickhouse-managed-postgres-rca" agent skill from https://github.com/ClickHouse/agent-skills/tree/main/skills/clickhouse-managed-postgres-rca into .opencode/skills/clickhouse-managed-postgres-rca/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "clickhouse-managed-postgres-rca", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
clickhouse-managed-postgres-rcaMUST USE when investigating performance issues on a ClickHouse-managed Postgres instance.
Clickhouse Managed Postgres Rca is an agent skill from ClickHouse/agent-skills. MUST USE when investigating performance issues on a ClickHouse-managed Postgres instance. Provides an evidence-based RCA workflow that scrapes the Prometheus endpoint for system signal, pulls per-digest evidence from the Slow Query Patterns API, and recommends (does not apply) a fix.
Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 13 other files (for example `AGENTS.md`, `README.md` and `metadata.json`).
It sits in Databases, covering Data warehousing, Query optimization and Web scraping. It works with ClickHouse, PostgreSQL and Prometheus. The repository describes itself as: The official Agent Skills for ClickHouse and ClickHouse Cloud. The licence is Apache-2.0.
6 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 356a8c1. It shows what the files ask for, not the result of running them.
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.
No scripts in the folder and no shell commands in SKILL.md.
From the folder's file list and the shell code blocks in SKILL.md.
Hosts in commands or code, which the agent is likely to contact:
api.clickhouse.cloudFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Clickhouse Managed Postgres Rca loads about 1.2k tokens when it runs. Until then it costs about 79 tokens; SKILL.md has 613 words of instructions outside code blocks.
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.
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.
The full file from ClickHouse/agent-skills at commit 356a8c1, republished under its Apache-2.0 licence (© ClickHouse). 613 words, ~1,224 tokens.
.claude/skills/clickhouse-managed-postgres-rca/SKILL.md (or your agent's skills folder). This skill also uses 12 other files; get the full folder from GitHub.Trigger whenever a user reports slowness, high CPU, low throughput, cache thrash, or any unexplained pain on a ClickHouse-managed Postgres instance.
Two APIs on https://api.clickhouse.cloud (HTTP Basic auth
using a ClickHouse Cloud API key/secret pair):
postgresInstancePrometheusGet
under the Prometheus tag. Returns Prometheus exposition format.
System and workload metrics for one Postgres service.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.
seq_scan / idx_scan).Reason from IO and timing signals, not from a plan tree.
Six steps, in order. Do not skip ahead.
Steps 2 and 3 only share auth — no data dependency between
them. Run them in parallel (background curls, & + wait) to
cut wall time from sequential ~2s to ~1s.
These endpoints are Beta — paths, params, and JSON field names
can shift. Follow rules/openapi-discovery.md to:
https://api.clickhouse.cloud/v1.operationId:postgresInstancePrometheusGet (Prometheus tag)slowQueryPatternsGetList (Postgres tag){ semantic role → actual field name }.Use the resolved names in every subsequent request and citation. Never hardcode field names from memory.
Follow rules/prometheus-scrape.md. One scrape, no wait.
You're after gauges (current values) that don't need a delta:
CacheHitRatio, ActiveConnections, MemoryUsedPercent,
FilesystemUsedPercent.
A CacheHitRatio well below ~95% on a workload that should
fit in cache is a real signal on its own. Climbing
ActiveConnections toward the pool ceiling is a real signal
on its own. These don't need rate-of-change.
A second scrape for counter deltas is opt-in, used only when Step 4 triage points at write-congestion (where deadlock and rollback rates matter and the Slow Query Patterns API can't substitute). For the read-path case (the most common RCA shape) the single scrape is enough.
Request the slow query patterns. Follow
rules/slow-query-patterns-fields.md for the fields that
matter and how to read them. This is the primary diagnostic —
it returns per-pattern accumulated totals (call count, runtime,
blocks, rows) over the window you request, which is the
"rate-of-change" data you'd otherwise derive from two Prom
scrapes — but per query and without waiting.
If no patterns return a meaningful totalDurationUs, the
report may be overstated or the issue isn't query-shaped.
Stop and tell the user what you looked at.
Follow rules/triage.md. Match the combined Prom + slow-query
signal to one of the heuristic shapes. Each shape points to a
specific heuristic file:
rules/heuristic-full-scan.md — read-path full scan.rules/heuristic-hot-loop.md — N+1 / hot loop from the app.rules/heuristic-write-congestion.md — deadlocks, slow
writes, high rollback rate.If the signal does not match any shape cleanly, do not invent a hypothesis. Surface the top patterns and ask the user which workload they recognize. New heuristics are welcome as PRs.
Use the format in rules/output-template.md. Always include:
symptom, evidence, hypothesis (noting any alternative cause
you cannot rule out from this surface alone), short-term fix,
and long-term follow-ups.
Follow rules/recommend-only.md. Never run DDL. Never call
pg_cancel_backend or pg_terminate_backend. Write the
recommendation, explain why, and let the human apply it.
For the complete guide with every rule expanded in a single
context load: AGENTS.md.
© ClickHouse, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 12 other files in skills/clickhouse-managed-postgres-rca of ClickHouse/agent-skills.
Open the folder on GitHubat commit 356a8c1
Clickhouse Managed Postgres Rca 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Clickhouse Managed Postgres Rca this skillClickHouse/agent-skills | 544 | — | ~1.2k | Automated safety check: Pass | Apache-2.0 | |
| Profiling Slow API EndpointsPostHog/posthog-foss | 721 | — | ~1k | Automated safety check: Pass | MIT | |
| Querying Production Databases Via MetabasePostHog/posthog-foss | 721 | — | ~2.8k | Automated safety check: Pass | MIT | |
| Analyzing Experiment Precompute CanaryPostHog/posthog-foss | 721 | — | ~3.5k | Automated safety check: Pass | MIT | |
| Chdb SQLvemetric/vemetric | 394 | 1 repos | ~1.2k | Automated safety check: Pass | Apache-2.0 | |
| Observal AdminObserval/Observal | 4.1k | — | ~774 | Automated safety check: Pass | Apache-2.0 |
PostHog/posthog-foss
Profiles slow PostHog API endpoints when the main cost is in Postgres or Python.
PostHog/posthog-foss
Runs read-only production database analysis through PostHog's internal Metabase instances.
PostHog/posthog-foss
Analyze the experiment precompute result-consistency canary across prod-US and prod-EU, deep-dive any issues, and produce an actionable report.
vemetric/vemetric
A skill your agent uses when the user wants to run SQL — especially analytical SQL — on local files (parquet/csv/json), URLs, S3 paths, or remote databases (Postgres, MySQL, MongoDB, ClickHouse…
Observal/Observal
Administers Observal users, settings, diagnostics, review queues, security events, audit logs, SAML, SCIM, the local Observal server, its upgrades and rollback, and its own PostgreSQL and ClickHouse…
FrankChen021/datastoria
Query ClickHouse system tables to inspect query logs, monitor cluster health, check replication status, and analyze slow queries.
ClickHouse/agent-skills
Generates TypeScript or JavaScript readers and writers for ClickHouse's RowBinary formats over HTTP in Node.js, after checking that RowBinary suits the data.
Works with
Categories
MUST USE when investigating performance issues on a ClickHouse-managed Postgres instance. Clickhouse Managed Postgres Rca is an agent skill from ClickHouse/agent-skills. MUST USE when investigating performance issues on a ClickHouse-managed Postgres instance.
Clickhouse Managed Postgres Rca fits situations like: investigating performance issues on a ClickHouse-managed Postgres instance; tasks that involve Data warehousing; tasks that involve Query optimization.
Run `npx skills add ClickHouse/agent-skills --skill clickhouse-managed-postgres-rca -a claude-code`. Or copy the skill folder (skills/clickhouse-managed-postgres-rca in ClickHouse/agent-skills) into .claude/skills/clickhouse-managed-postgres-rca in your project. Claude Code loads it when a task matches its description.
Run `npx skills add ClickHouse/agent-skills --skill clickhouse-managed-postgres-rca -a codex`. Or copy the skill folder (skills/clickhouse-managed-postgres-rca in ClickHouse/agent-skills) into .agents/skills/clickhouse-managed-postgres-rca in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ClickHouse/agent-skills --skill clickhouse-managed-postgres-rca -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/clickhouse-managed-postgres-rca, .gemini/skills/clickhouse-managed-postgres-rca, .github/skills/clickhouse-managed-postgres-rca and .opencode/skills/clickhouse-managed-postgres-rca in your project.
SKILL.md names no scripts, command-line tools or credentials: Clickhouse Managed Postgres Rca is instructions for the agent only.
SKILL.md names 1 domain. In commands or code: api.clickhouse.cloud; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.
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.
Clickhouse Managed Postgres Rca is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.2k tokens (SKILL.md is roughly 4.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Clickhouse Managed Postgres Rca: Profiling Slow API Endpoints (PostHog/posthog-foss, 721 stars), Querying Production Databases Via Metabase (PostHog/posthog-foss, 721 stars), Analyzing Experiment Precompute Canary (PostHog/posthog-foss, 721 stars) and Chdb SQL (vemetric/vemetric, 394 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
ClickHouse (a GitHub organization) maintains it in ClickHouse/agent-skills, which has 544 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on September 29, 2026.
Source: ClickHouse/agent-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.