# postgres-best-practices

> Claude/Codex skill by [@neondatabase](https://omgskills.com/library/neondatabase/index.md) · 51 stars · Updated 2026-10-06

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.

## Install

```sh
git clone https://github.com/neondatabase/postgres-skills /tmp/postgres-skills && ln -s /tmp/postgres-skills/skills/postgres-best-practices ~/.claude/skills/postgres-best-practices
```

## From README

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 . PostgreSQL provides 5 years of support per major version. Always run the latest minor release.

## Links

- HTML page: https://omgskills.com/skills/neondatabase/postgres-skills/postgres-best-practices/
- GitHub: https://github.com/neondatabase/postgres-skills
- Author: [@neondatabase](https://omgskills.com/library/neondatabase/index.md)

## More from this repo

- [skill-creator](https://omgskills.com/skills/neondatabase/postgres-skills/skill-creator/index.md) — Guide for creating effective skills.
   - [@neondatabase](https://omgskills.com/library/neondatabase/index.md) · 52 stars

## More skills by this author

- [claimable-postgres](https://omgskills.com/skills/neondatabase/mcp-server-neon/claimable-postgres/index.md) — Provision instant temporary Postgres databases via Claimable Postgres by Neon (neon.new) with no login, signup, or...
   - [@neondatabase](https://omgskills.com/library/neondatabase/index.md) · 654 stars
- [logging-best-practices](https://omgskills.com/skills/neondatabase/mcp-server-neon/logging-best-practices/index.md) — Logging best practices focused on wide events (canonical log lines) for powerful debugging and analytics
   - [@neondatabase](https://omgskills.com/library/neondatabase/index.md) · 654 stars
