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
- 参考文档agents/openai.yaml215 B
- 脚本postgresql-skill.test.ts410 B
- 参考文档references/EVIDENCE.md4.2 KB
- 参考文档references/GO-JET.md4.4 KB
- 参考文档references/MIGRATIONS.md3.4 KB
- 参考文档references/OPERATIONS-RECOVERY.md3.7 KB
- 参考文档references/PERFORMANCE.md3.2 KB
- 参考文档references/POSTGRESQL-19.md6.9 KB
- 参考文档references/SCHEMA-INDEXES.md3.2 KB
- 参考文档references/SECURITY-TENANCY.md3.2 KB
- 参考文档references/source-index.jsonl3.0 MB
- 参考文档references/SQL-AUTHORING.md3.3 KB
- 参考文档references/SQL-PR-REVIEW.md13.8 KB
- 参考文档references/TRANSACTIONS-ORCHESTRATION.md3.4 KB
- 参考文档references/VERSIONS-PROVIDERS.md6.5 KB
- 参考文档references/WEEKLY-REPORT.md4.5 KB
- 脚本scripts/detect-version.test.ts5.8 KB
- 脚本scripts/detect-version.ts5.2 KB
- 脚本scripts/refresh-corpus.test.ts7.9 KB
- 脚本scripts/refresh-corpus.ts20.7 KB
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
- Mode: author/review SQL; schema/index; transactions/queues; migration; tune; operate/recover; secure/tenant; report; or Jet.
- 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.
- Ground truth: exact SQL/parameters, transaction boundary, schema/catalog, representative data, plan/stats, waits/locks, resources, and deploy/config history.
- Smallest reversible change: evidence, hypothesis, expected effect, write/storage/lock/WAL cost, unhappy paths, version/provider caveats, rollback/forward-fix, abort criteria, verification.
- 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.
- Execute once: preserve exact SQL/transaction boundaries; observe rollout and stop on abort criteria.
- 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
learn-taste
Turn a session's design corrections into scoped, reasoned rules for future agents. Use for /learn-taste or requests to remember design feedback, not general workflow retrospectives.
learn-taste
Turn a session's design corrections into scoped, reasoned rules for future agents. Use for /learn-taste or requests to remember design feedback, not general workflow retrospectives.
pull-requests
Use when finalizing a pull request or continuing an existing one; preserve the requested endpoint and draft state.
pull-requests
Use when finalizing a pull request or continuing an existing one; preserve the requested endpoint and draft state.
hill-climb
Optimize a defined outcome through bounded evaluation loops. Use for hill-climb requests or repeated improvement against an executable eval, benchmark, or visual comparison; not a one-pass review.
gestures
Build or fix web drag, swipe, sheet, reorder, and hold interactions: direct tracking, rubber banding, release velocity, momentum, snap points, and interruption. Not native React Native or Swift.