postgres-pro
An agent skill by Jeffallan, from Jeffallan/claude-skills. Tags: analytics, database, debugging, performance, sql-pro.
What it does
Use when optimizing PostgreSQL queries, configuring replication, or implementing advanced database features. Invoke for EXPLAIN analysis, JSONB operations, extension usage, VACUUM tuning, performance monitoring.
Install
With the skills CLI, which installs into Claude Code, Codex, Cursor and other agents:
npx skills add Jeffallan/claude-skills --skill postgres-pro
Or copy the skill folder into Claude Code's skills directory by hand (~/.claude/skills for every project, or .claude/skills inside one):
git clone --depth 1 https://github.com/Jeffallan/claude-skills
cp -r claude-skills/skills/postgres-pro ~/.claude/skills/postgres-pro
Safety box score
Grade D, elevated risk: 53 of 100 risk points, rated 2026-10-19. The grade rates what the skill and its scripts can reach on the machine of whoever installs it, across eight categories from shell execution to secrets access. How the score works.
This skill is a PostgreSQL administration playbook: it includes SQL and shell commands for tuning, replication, monitoring, and failover. The main risks are destructive server-side changes, privileged service/config edits, and data moving between hosts during replication and FDW use.
| Category | Level | Why |
|---|---|---|
| Code & shell execution | 2 (moderate) | The skill includes many runnable SQL and shell commands such as `EXPLAIN (ANALYZE, BUFFERS)`, `pg_basebackup`, `pg_ctl promote`, `systemctl stop postgresql`, and `VACUUM FULL`, so an agent can actively execute database and system operations. |
| Network access | 2 (moderate) | It connects to remote PostgreSQL hosts and ships data/WAL across the network via `CREATE SUBSCRIPTION ... CONNECTION 'host=publisher-host...'`, `postgres_fdw`, and replication/archive examples like `pg_basebackup -h primary-host`. |
| Filesystem reach | 3 (high) | The replication guide explicitly deletes and rewrites database storage, including `rm -rf /var/lib/postgresql/14/main/*` and `pg_basebackup -D /var/lib/postgresql/14/main`, which can destroy local database files. |
| Secrets & credentials | 2 (moderate) | Several examples embed or request credentials and keys, e.g. `password='<replication-password>'`, `password='<remote-db-password>'`, and `pgp_sym_encrypt(..., 'encryption-key')`, so the skill may handle sensitive access material. |
| Privilege & persistence | 2 (moderate) | It calls for system-level actions like `apt-get install pg-auto-failover`, `systemctl stop postgresql`, and editing `postgresql.conf`/`pg_hba.conf`, which typically require elevated privileges. |
| Instruction hijack surface | 0 (none) | There is no instruction to ignore safeguards, follow fetched remote content, hide actions, or adopt misleading personas; the content is standard database guidance. |
| Irreversible actions | 2 (moderate) | The skill can trigger impactful operations such as `pg_promote()`, `DROP SUBSCRIPTION`, `pg_cancel_backend`, and `VACUUM FULL`; these are inherent to PostgreSQL administration but can change availability or data topology. |
| Transparency | 0 (none) | All shipped files are plain, readable markdown; there are no binaries, minified assets, or decoded-at-runtime payloads. |
Before installing
- Read `references/replication.md` first; it contains `rm -rf /var/lib/postgresql/14/main/*` and `pg_ctl promote`.
- Only use it on a disposable or well-backed-up PostgreSQL cluster if you plan to follow the replication/failover workflows.
- Confirm you are comfortable granting the agent network access to PostgreSQL hosts and credentials used in `CREATE SUBSCRIPTION` and `postgres_fdw` examples.
Rated 2026-10-19 by an automated review of 6 files from the skill's repository.
Source
- Repository
- Jeffallan/claude-skills (all skills from this repository)
- Path
- skills/postgres-pro/SKILL.md
- Branch
- main
- Updated
- 2026-09-19
Related skills
- database-optimizer — Optimizes database queries and improves performance across PostgreSQL and MySQL systems.
- sql-pro — Optimizes SQL queries, designs database schemas, and troubleshoots performance issues.
- eas-observe — EAS service (paid). Use for anything related to EAS Observe - adding `expo-observe` to an Expo project (AppMetricsRoot/ObserveRoot HOC.
- redshift-guide — Amazon Redshift is NOT PostgreSQL — corrects PostgreSQL-derived LLM mistakes; covers Redshift-specific SQL, DDL, COPY/UNLOAD, system views, metadata discovery.
- monitoring-expert — Configures monitoring systems, implements structured logging pipelines, creates Prometheus/Grafana dashboards, defines alerting rules.
- amazon-dynamodb — Designs, reviews, and debugs DynamoDB data layers from design axioms — enumerates access patterns, chooses partition/sort keys and GSIs.