jshsakura/awesome-opencode-skills

postgres-pro

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

查看源码

使用方法

  1. 复制安装命令,在自己的智能体环境安装前先检查源码包。
  2. 从原始文档核对所需工具、凭据和支持的宿主。
  3. 说明输入材料与期望交付物,并对照来源检查输出。
npx skills add https://github.com/jshsakura/awesome-opencode-skills --skill postgres-pro

开始前需了解

  • 安装不包含模型订阅、API 额度或访问文件的权限。
  • 仓库星数和安装量反映活跃情况,不等于独立质量或安全测试。
仓库原始内容

按源仓库内容呈现,保留标题、案例、代码、表格、链接以及原文引用的演示图片。

Instructions

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.

按任务相关推荐

来自同一仓库

更多 Skills

全部 Skills