Agent Native

infra-postgres

This skill sets up and manages Postgres databases using the clickhousectl CLI.

by ClickHouseOfficial publisherNot reviewed

Identity proven by GitHub's verified organisation badge (ClickHouse)

Agents
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode
License
Apache-2.0 (permissive)
Pin
356a8c1pinned Oct 9, 2026
Context cost
about 570 tokenswhen the skill loads
GitHub stars
544on clickhouse/agent-skills
Scripts
None found

What it does

“Sets up and manages Postgres using the clickhousectl CLI — runs a local Docker-backed Postgres for development, and creates and operates managed ClickHouse Cloud Postgres services (connections, TLS, runtime config, read replicas, failover, point-in-time restore). Use when the user wants a Postgres or PostgreSQL database for their application, a local Postgres dev environment, psql access, or a managed/production Postgres in ClickHouse Cloud, or mentions moving a local Postgres to production. Also use when migrating an existing Postgres database (Neon, Supabase, RDS, Aurora, Cloud SQL, self-hosted) into ClickHouse Cloud Postgres.”
The author's description, from SKILL.md

Generated summary from the skill's own text

This skill sets up and manages Postgres databases using the clickhousectl CLI. It supports local Docker-backed Postgres instances for development and managed Postgres services in ClickHouse Cloud for production, including operations like TLS configuration, read replicas, failover, and point-in-time restore. It also handles migrations from existing Postgres providers like Neon, Supabase, RDS, and Aurora into ClickHouse Cloud.

When to use it

  • Setting up a local Postgres development environment with Docker
  • Deploying managed Postgres to ClickHouse Cloud for production
  • Managing cloud Postgres operations like TLS, replicas, and failover
  • Migrating existing Postgres databases to ClickHouse Cloud

When not to

  • Replicating Postgres data into ClickHouse for analytics queries
  • Setting up ClickHouse itself rather than Postgres

Install

These commands install from the publisher's repository and need no account.

skills CLI

npx skills add clickhouse/agent-skills --skill infra-postgres

Installs from the repository's default branch, which may have changed since the commit we checked.

GitHub CLI 2.90 or later

gh skill install clickhouse/agent-skills infra-postgres@356a8c1b9a7392adb389a132f5ad3fec38532a03

Installs the commit we checked (356a8c1).

Copy by hand

Download the folder at 356a8c1 and put it in .claude/skills/infra-postgres for Claude Code and in .agents/skills/infra-postgres for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode.

Skill folder on GitHub at 356a8c1

Claude Code plugin

/plugin install clickhouse@claude-plugins-official

The publisher's plugin in Claude's official marketplace. It may hold more than this skill, and we have not pinned it.

Claude Code plugin

/plugin install clickhouse-best-practices@claude-plugins-official

The publisher's plugin in Claude's official marketplace. It may hold more than this skill, and we have not pinned it.

Copy for your agent

A prompt for any coding agent. It installs this skill from GitHub at the pinned commit, copies the files as they are, and runs nothing unless you ask.

Prompt

Install the agent skill "infra-postgres" by ClickHouse.

Source, pinned to commit 356a8c1b9a7392adb389a132f5ad3fec38532a03:
https://github.com/clickhouse/agent-skills/tree/356a8c1b9a7392adb389a132f5ad3fec38532a03/skills/infra-postgres

1. Download that folder at exactly this commit. Do not use the default branch.
2. Copy every file unchanged, keeping the folder structure, into .claude/skills/infra-postgres/ for Claude Code and .agents/skills/infra-postgres/ for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode. Create the folders if they do not exist.
3. Do not edit the files, and do not run any script in the folder unless I ask you to.
4. When you are done, list the files you copied and where you put them.

Listing and checks: https://www.agentnative.dev/skills/clickhouse/infra-postgres

SKILL.md at the pin

---
name: infra-postgres
description: Sets up and manages Postgres using the clickhousectl CLI — runs a local Docker-backed Postgres for development, and creates and operates managed ClickHouse Cloud Postgres services (connections, TLS, runtime config, read replicas, failover, point-in-time restore). Use when the user wants a Postgres or PostgreSQL database for their application, a local Postgres dev environment, psql access, or a managed/production Postgres in ClickHouse Cloud, or mentions moving a local Postgres to production. Also use when migrating an existing Postgres database (Neon, Supabase, RDS, Aurora, Cloud SQL, self-hosted) into ClickHouse Cloud Postgres.
license: Apache-2.0
metadata:
  author: ClickHouse Inc
  version: "0.2.0"
---

# Postgres with clickhousectl

`clickhousectl` manages Postgres in two environments:

- **Local** — named, Docker-backed Postgres instances on the user's machine, for development.
- **Cloud** — managed Postgres services in ClickHouse Cloud (beta), for production: HA, read replicas, point-in-time restore.

This file routes to the right reference. The step-by-step workflows live in `ref/local.md`, `ref/cloud.md`, and `ref/migrate.md` — read the one that matches the user's situation before running commands.

## Which reference to use

| The user wants to... | Read |
|----------------------|------|
| Develop or prototype locally, run tests/CI against Postgres, no cloud account needed | [ref/local.md](ref/local.md) |
| Go to production, host a managed Postgres, or use ClickHouse Cloud explicitly | [ref/cloud.md](ref/cloud.md) |
| Operate an existing cloud service (passwords, TLS, config, replicas, failover, restore) | [ref/cloud.md](ref/cloud.md) |
| Migrate an existing Postgres (Neon, Supabase, RDS, ...) into ClickHouse Cloud Postgres | [ref/migrate.md](ref/migrate.md) |
| Develop locally now, ship to production later | Start with [ref/local.md](ref/local.md); it points to [ref/cloud.md](ref/cloud.md) when it's time to go to prod |

If it's genuinely ambiguous (e.g. "set up Postgres for my app"), default to local for development tasks and ask before creating anything in the cloud — cloud services cost money.

## Prerequisites (both workflows)

Check that `clickhousectl` is installed:

```bash
which clickhousectl
```

If not found, install it:

```bash
curl -fsSL https://clickhouse.com/cli | sh
```

This installs to `~/.local/bin/clickhousectl` (with a `chctl` alias). If the command is still not found, suggest `export PATH="$HOME/.local/bin:$PATH"` or a new terminal.

All commands accept `--json` for machine-readable output. Exit codes follow `gh` conventions: 0 success, 1 error, 2 cancelled, 4 auth required.

## Related

- To replicate Postgres data into ClickHouse for analytics, see ClickPipes (`clickhousectl cloud clickpipe --help`). ClickPipes cannot target a Postgres service — for Postgres-to-Postgres migration use [ref/migrate.md](ref/migrate.md).
- For ClickHouse itself (local development or ClickHouse Cloud services), use the `infra-clickhouse` skill.

From clickhouse/agent-skills at 356a8c1, shown as plain text under its license: Apache-2.0 (permissive). The license text is in skills/infra-postgres/SKILL.md.

View SKILL.md on GitHub at 356a8c1

Files

6 files, 19 KB in total. Each file has a sha256 in the pin's manifest; the first 12 characters are shown.

Skill folder on GitHub at 356a8c1
All 15 skills from ClickHouse

More from ClickHouse

  • chdb-datastore

    This skill enables working with tabular data using a pandas-compatible API backed by ClickHouse for faster execution.

    Contains scripts

    Claude Code, Codex, Cursor +3 · about 1.2K tokens · pinned 6 days ago

  • chdb-sql

    The skill enables running ClickHouse SQL queries on local files (parquet, csv, json), remote databases (Postgres, MySQL, MongoDB, ClickHouse Cloud), and cloud…

    Contains scripts

    Claude Code, Codex, Cursor +3 · about 960 tokens · pinned 6 days ago

  • clickhouse-architecture-advisor

    This skill guides agents through ClickHouse architecture decisions for specific workloads like observability, SIEM, and financial services.

    Claude Code, Codex, Cursor +4 · about 690 tokens · pinned 6 days ago

  • clickhouse-best-practices

    This skill provides 31 ClickHouse best practices rules covering schema design, query optimization, data ingestion, and agent connectivity.

    Claude Code, Codex, Cursor +4 · about 2.5K tokens · pinned 6 days ago

  • clickhouse-js-node-rowbinary

    This skill generates TypeScript/JavaScript code to read and write ClickHouse RowBinary format streams in Node.js.

    Contains scripts

    Claude Code, Codex, Cursor +3 · about 1.2K tokens · pinned 6 days ago

  • clickhouse-js-node-troubleshooting

    Diagnose and fix issues with the ClickHouse Node.js client (@clickhouse/client) running in Node.js environments.

    Claude Code, Codex, Cursor +4 · about 1.1K tokens · pinned 6 days ago

  • prisma-8

    This skill helps agents work with Prisma 8, a contract-first data layer for TypeScript projects.

    by PrismaOfficial publisher

    Contains scripts

    Claude Code, Codex, Cursor +3 · about 3.5K tokens · pinned 6 days ago

  • supabase-postgres-best-practices

    This skill provides a comprehensive guide to Postgres optimization and best practices maintained by Supabase.

    by SupabaseOfficial publisher

    Claude Code, Codex, Cursor +4 · about 440 tokens · pinned 6 days ago

  • prisma-next-contract

    This skill enables editing the Prisma Next data contract, the single source of truth for your data layer.

    by PrismaOfficial publisher

    Claude Code, Codex, Cursor +4 · about 6.9K tokens · pinned 6 days ago

  • vercel-storage

    This skill guides agents through Vercel's storage ecosystem, including Blob for file uploads, Global Config for edge-accessible configuration, and Marketplace…

    by VercelOfficial publisher

    Claude Code, Codex, Cursor +3 · about 3.4K tokens · pinned 6 days ago

  • netlify-database

    This skill enables agents to set up and manage zero-config managed Postgres databases on Netlify via the @netlify/database package.

    by NetlifyOfficial publisher

    Claude Code, Codex, Cursor +4 · about 4.7K tokens · pinned 6 days ago

  • dsql

    This skill enables agents to build and manage Aurora DSQL, a serverless PostgreSQL-compatible distributed SQL database.

    by Amazon (AWS)Official publisher

    Contains scripts

    Claude Code, Codex, Cursor +3 · about 6.5K tokens · pinned 6 days ago

The skills listed here are third-party software, collected from public GitHub repositories as a catalog of recent skills and provided as is. Agent Native does not write or control them and is not responsible for any harm, loss or damage caused by installing or using them. Labels and checks describe what we saw at one commit and are not a guarantee. Read a skill's files before you run it. Terms of use