Skip to main content
subagent CX Codex

postgres-pro · voltagent/awesome-codex-subagents — Codex subagent: features and installation

postgres-pro is a Codex subagent for PostgreSQL schemas, query plans, locking, and operational risks. It joins tasks that need workload-aware advice on database changes and migrations.

MIT ★ 6,505 updated 2026-10-05

Install into Codex · Manually: put the files in place All methods and platforms ↓
.codex/agents/postgres-pro.toml
Open on GitHub

What postgres-pro does

postgres-pro reviews PostgreSQL queries against table and index shape, transaction behavior, and planner choices. It identifies likely causes such as a poor plan, missing indexes, or lock contention, then proposes a small change and explains its rollback implications.

The subagent covers isolation levels, index types, large-table migrations, vacuum and autovacuum, partitioning, replication, and failover. It checks recommendations against a normal path and a high-contention case, and calls out production validation that static review cannot provide. Risky schema rewrites and maintenance operations require evidence and a safe rollout plan unless the parent agent explicitly asks for them.

What it helps with

  • trace a slow PostgreSQL query to its likely cause
  • assess lock contention and deadlock risk
  • choose an index for observed access patterns
  • plan a large-table migration with rollback steps
  • check how database changes affect replication and availability

Example prompts for the agent

  • Analyze this slow PostgreSQL query and explain the planner's choice.
  • Assess the lock contention and deadlock risk in this transaction.
  • Draft a safe migration plan for this large table, including rollback.

How to install postgres-pro

Manually: put the files in place

.codex/agents/postgres-pro.toml

Codex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/

Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean

Questions about postgres-pro

How do I install postgres-pro in Codex?

Add the subagent file at .codex/agents/postgres-pro.toml.

What does postgres-pro do?

It reviews PostgreSQL schemas, queries, indexes, locks, and migration risks. Its recommendations include tradeoffs, rollback implications, and remaining checks.

Which PostgreSQL concerns does postgres-pro cover?

It examines planner behavior, lock contention, transaction isolation, large-table migrations, maintenance, partitioning, and replication.

Source text

postgres-pro.toml · MIT
# postgres-pro

Use when a task needs PostgreSQL-specific expertise for schema design, performance behavior, locking, or operational database features.

Own PostgreSQL review as planner-aware performance and operational safety analysis.

Ground recommendations in workload behavior, locking semantics, and migration risk rather than generic tuning rules.

Working mode:
1. Map the Postgres boundary: query pattern, table/index shape, and transaction behavior.
2. Identify dominant issue source (planner choice, index gaps, lock contention, or schema design constraint).
3. Recommend the smallest safe improvement with clear rollback implications.
4. Validate expected impact for one normal path and one high-contention or degraded path.

Focus on:
- planner behavior with statistics, cardinality, and index selectivity
- lock modes, transaction isolation, and deadlock/contention risk
- index design including btree/gin/gist/brin suitability tradeoffs
- schema evolution and migration/backfill safety on large tables
- vacuum/analyze/autovacuum implications for long-term performance
- partitioning and retention strategies where workload scale justifies it
- replication and failover considerations for operational safety

Quality checks:
- verify query/index recommendations align with observed access patterns
- confirm lock and isolation implications are explicit for write-heavy paths
- check migration guidance for downtime, rollback, and replication impact
- ensure planner/statistics assumptions are called out where uncertain
- call out production-level validations needed beyond static code review

Return:
- primary PostgreSQL issue and mechanism behind it
- smallest high-leverage change with tradeoffs
- expected impact on latency/throughput/operability
- validations performed and remaining environment checks
- residual risk and phased next steps

Do not recommend risky schema rewrites or maintenance operations without evidence and rollout safety unless explicitly requested by the parent agent.

© VoltAgent · MIT · VoltAgent/awesome-codex-subagents

Similar subagents

All subagents for Backend and APIs →

postgres-pro by other authors comes first.

postgres-pro VoltAgent Community postgres-pro — a PostgreSQL subagent for query tuning, replication design, backups, and database troubleshooting. Use it when performance or high-availability work needs a structured review. CX Codex 897installs design-postgres-tables tigerdata design-postgres-tables — a reference skill for PostgreSQL table design: data types, indexes, constraints, JSONB and partitioning. Useful when your agent writes or edits a schema. CX Codex +1 680installs postgres-tuning oakoss postgres-tuning — a skill for Claude Code, Codex, Cursor and other agents that provides PostgreSQL 17/18+ performance tuning guidance. Covers async I/O, query plan forensics, index strategy, autovacuum, pgvector, and connection pooling. CX Codex +1 136installs postgres-expert 0xfurai postgres-expert helps design PostgreSQL schemas, optimize slow SQL queries, and configure indexes for balanced read and write performance. CX Codex ★ 1,029repo stars postgres-query civitai postgres-query runs PostgreSQL queries, inspects index usage, and analyzes execution plans using read-only connections by default. CX Codex +1 ★ 7,327repo stars postgresql davila7 Guides table schema design for PostgreSQL, emphasizing strict data types, indexing for foreign keys, and engine-specific storage nuances. CX Codex +1 312installs database-designer borghei The database-designer skill for Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, and OpenCode reviews SQL schemas, suggests indexes, and creates migrations. Use it for DDL reviews, index tuning, or schema diffs. CX Codex +1 176installs

From the same set176

The whole set →
cli-developer cli-developer — a Codex subagent that treats CLI development as workflow engineering, not checklist ticking. Maps the friction, finds the root cause, and proposes the smallest safe fix—from argument parsing to error messages. CX Codex ★ 6,505repo stars build-engineer build-engineer — a subagent for diagnosing build failures, dependency-graph issues, and CI pipeline instability. Maps the root cause, then recommends the smallest change that cuts friction without triggering full system migration. CX Codex ★ 6,505repo stars reinforcement-learning-engineer reinforcement-learning-engineer designs RL environments, crafts reward functions, and trains decision-making agents in Codex with safety checks across random seeds. CX Codex ★ 6,505repo stars prompt-engineer The prompt-engineer subagent treats prompts as behavior contracts, finds unclear instructions, and compares revisions against normal, edge, and failure scenarios. CX Codex ★ 6,505repo stars nlp-engineer nlp-engineer fixes text pipelines, tokenization, embeddings, and ranking in Codex. Focuses on real-world linguistic failure modes rather than synthetic benchmarks. CX Codex ★ 6,505repo stars mlops-engineer The mlops-engineer subagent handles model delivery, registries, pipelines, monitoring, and environment orchestration when an ML system needs controlled releases and rollback checks. CX Codex ★ 6,505repo stars ml-engineer ml-engineer — a subagent for working with machine learning in production code: from feature preparation to inference boundary validation. Keeps ML logic stable and visible in user-facing behavior. CX Codex ★ 6,505repo stars machine-learning-engineer machine-learning-engineer maintains training-serving parity and fixes production inference pipelines without unnecessary research overhauls. CX Codex ★ 6,505repo stars

Project sponsors

Companies that keep this analytics open