AGENT SKILL

postgresql

Engineer PostgreSQL from workload evidence. Use for SQL pull requests, schemas, indexes, transactions, migrations, performance, security/RLS, backup/PITR, reports, and generated Drizzle or Jet SQL.

License 许可
MIT
最近更新
2026-11-14
Stars
★ 4
Forks
1

01 前言 Front Matter

name
postgresql
description
Engineer PostgreSQL from workload evidence. Use for SQL pull requests, schemas, indexes, transactions, migrations, performance, security/RLS, backup/PITR, reports, and generated Drizzle or Jet SQL.

02 资源文件 20

03 SKILL.md 正文

Fit SQL to one measured workload, version, provider, and recovery contract. PostgreSQL semantics and actual SQL outrank ORM/query-builder/provider claims.

Workflow

  1. Mode: author/review SQL; schema/index; transactions/queues; migration; tune; operate/recover; secure/tenant; report; or Jet.
  2. Contract: automatically detect client/server versions; record fork/provider, extensions/topology/pooler, workload, volume/skew/growth, concurrency, SLO, RPO/RTO, security, change window. Mark unknowns.
  3. Ground truth: exact SQL/parameters, transaction boundary, schema/catalog, representative data, plan/stats, waits/locks, resources, and deploy/config history.
  4. Smallest reversible change: evidence, hypothesis, expected effect, write/storage/lock/WAL cost, unhappy paths, version/provider caveats, rollback/forward-fix, abort criteria, verification.
  5. Live gate: production diagnosis defaults read-only, bounded, time-limited. Get explicit approval for writes, DDL, cancellation, role/policy/config changes, failover, restore, or destructive commands; reconfirm target.
  6. Execute once: preserve exact SQL/transaction boundaries; observe rollout and stop on abort criteria.
  7. Evidence: verify DB and user outcomes, record before/after window, check recovery, name uncertainty.

Route

Work Read
SQL PR/diff SQL-PR-REVIEW.md plus touched domains
Queries, joins, pagination, DML SQL-AUTHORING.md
Types, constraints, indexes, partitions SCHEMA-INDEXES.md
Isolation, retries, locks, queues TRANSACTIONS-ORCHESTRATION.md
DDL, backfills, generated migrations MIGRATIONS.md
Plans, stats, benchmarks PERFORMANCE.md
Pooling, vacuum, WAL, HA, PITR OPERATIONS-RECOVERY.md
Roles, RLS, tenant isolation SECURITY-TENANCY.md
Health/weekly report WEEKLY-REPORT.md
Versions/providers VERSIONS-PROVIDERS.md
PostgreSQL 19 preview/RC; psql 19 POSTGRESQL-19.md
Drizzle SQL-AUTHORING.md, migrations, versions/providers
go-jet/jet GO-JET.md
Evidence/corpus refresh EVIDENCE.md

Output

context -> evidence -> recommendation -> exact SQL/code -> impact/risks -> approval/rollout -> rollback/forward-fix -> verification. Reviews put correctness/safety before style. Without live evidence, give bounded collection queries and stop at hypothesis.

04 同仓库更多 Skills