In brief
Gathers best practices Postgres independent from the supplier: schema design, indexing, query optimization, migrations and frequent traps. It is used to write SQL, design a schema, optimize queries, or install a Postgres database. The skill covers PostgreSQL 14-18; version-specific features are marked (e.g. `[PG15+]`, `[PG18+]`), and environment-dependent examples indicate multi-node privileges, extensions or configurations. PostgreSQL offers five years of support per major version: we still aim for the latest minor version. This is not the Neon-specific guide (`neon-postgres`) or the official practices maintained by Supabase, although some advice overlaps.
What it does
- Postgres Guide 14-18, independent of supplier: schema, index, queries, migrations and traps
- Version notes are marked; Neon or Supabase practices have their own records
Who it is for, and an example
Teams that design or optimize a PostgreSQL, regardless of the host, and need schema, index and query rules rather than a Neon or Supabase specific guide.
Example request: "Read this schema and these requests in light of Postgres 16 practices, pointing out what would require a `[PG18+]` marker. »
When writing, rereading or installing a PostgreSQL in general, and not for a specific advice to Neon, Supabase, or another engine. Example written by iadujour.fr from the SKILL.md, not tested.
Install
npx skills add neondatabase/postgres-skills
npx skills add neondatabase/postgres-skillsLevel: Intermediate
Suppose a project already in place at the publisher and the tools described in SKILL.md.
Good to know
SKILL.md excerpt
The original description, which the agent reads to decide whether to load the skill (in English):
Best practices and guidelines for working with Postgres. Covers schema design, indexing strategies, query optimization, migrations, and common pitfalls. Use when writing SQL, designing database schemas, optimizing queries, or setting up a Postgres database.
Quoted from SKILL.md at commit a8b6fd6 . The folder also contains 13 extra files (references/).
The SKILL.md has 37 lines and 2 main sections:
- Supported Versions
- References
Licence: Apache 2.0
Checked on 10 November 2026 : repository LICENSE file .
The licence allows reuse: the full SKILL.md text is reproduced below, unmodified, with its licence notice.
Full SKILL.md text
Reproduced unmodified from neondatabase/postgres-skills (commit a8b6fd6) , © Neon, under licence Apache 2.0 (original licence file ).
Show the original SKILL.md (37 lines, in English)
---
name: postgres-best-practices
description: Best practices and guidelines for working with Postgres. Covers schema design, indexing strategies, query optimization, migrations, and common pitfalls. Use when writing SQL, designing database schemas, optimizing queries, or setting up a Postgres database.
---
# Postgres Best Practices
Guidelines and best practices for working with Postgres, covering schema design, indexing, query optimization, and common pitfalls.
## Supported Versions
This skill covers PostgreSQL 14 through 18. Version-specific features are tagged (e.g., `[PG15+]`, `[PG18+]`); environment-dependent examples identify required privileges, extensions, or multi-node setup.
PostgreSQL provides 5 years of support per major version. Always run the latest minor release.
| Version | Initial Release | End of Life |
| ------- | ------------------ | ------------------ |
| 18 | September 2025 | November 2030 |
| 17 | September 2024 | November 2029 |
| 16 | September 2023 | November 2028 |
| 15 | October 2022 | November 2027 |
| 14 | September 2021 | November 2026 |
Source: [postgresql.org/support/versioning](https://www.postgresql.org/support/versioning/)
## References
| Area | Resource | When to Use |
| ----------------------- | --------------------------------------- | ------------------------------------------------------------------ |
| Schema Design | `references/schema-design.md` | Designing tables, choosing data types, normalizing, partitioning |
| Indexing | `references/indexing.md` | Choosing index types, composite indexes, partial/covering indexes |
| Query Optimization | `references/query-optimization.md` | Reading EXPLAIN ANALYZE, fixing bottlenecks, planner tuning |
| Query Patterns | `references/query-patterns.md` | CTEs, window functions, lateral joins, UPSERT, JSONB, anti-patterns|
| Performance Diagnostics | `references/performance-diagnostics.md` | pg_stat views, lock analysis, VACUUM, connection management |
| Logical Replication | `references/logical-replication.md` | Pub/sub replication, live migrations, CDC |
| Hot Standby | `references/hot-standby.md` | Streaming replication, read replicas, failover |
| Transaction Isolation | `references/transaction-isolation.md` | Isolation levels, lost updates, serialization failures, retry logic |
| Backup & Restore | `references/backup-restore.md` | pg_dump/pg_restore, pg_basebackup, PITR, recovery |
| Security & Roles | `references/security-roles.md` | Privileges, RLS, pg_hba.conf, authentication, SSL |
| Bulk Data Loading | `references/bulk-loading.md` | COPY patterns, ETL staging, optimizing large loads, batch ops |
| Connection Pooling | `references/connection-pooling.md` | PgBouncer config, pool modes, prepared statements, sizing |
| Major Version Upgrades | `references/major-version-upgrades.md` | pg_upgrade, logical replication migration, pre/post checklists |
Comments.
A field note, a question, a precision on this skill? Comments are reviewed before publication.
Published comments
Loading comments…
Leave a comment
Moderation charter. Every comment is reviewed before publication. We refuse hate speech, insulting or discriminatory language, advertising, spam and promotional links, off-topic posts and other people’s personal data.