
Postgres Best Practices
- 837 installs
- 21 repo stars
- Updated July 26, 2026
- neondatabase/postgres-skills
postgres-best-practices is a Claude skill from Neon Database that guides schema design, indexing strategies, query optimization, migrations, and common pitfalls for developers writing SQL or operating Postgres databases.
About
postgres-best-practices is an official Neon Database skill covering Postgres guidelines across schema design, indexing strategies, query optimization, migrations, and common pitfalls. Developers invoke it when writing SQL, designing schemas, tuning slow queries, or setting up Postgres on Neon or self-hosted instances. The skill organizes reference material by area with linked resources so agents recommend index types, migration patterns, and anti-patterns instead of ad hoc SQL. Reach for postgres-best-practices during greenfield schema work, performance investigations, and safe migration planning alongside ORMs like Prisma or Drizzle.
- Comprehensive schema design guidelines including normalization and data type selection
- Indexing strategies and query optimization techniques
- Migration best practices and common Postgres pitfalls to avoid
- Ready-to-use reference files for schema-design, indexing, and query patterns
Postgres Best Practices by the numbers
- 837 all-time installs (skills.sh)
- +64 installs in the week ending Aug 4, 2026 (Skillselion tracking)
- Ranked #100 of 911 Databases skills by installs in the Skillselion catalog
- Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/neondatabase/postgres-skills --skill postgres-best-practicesAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 837 |
|---|---|
| repo stars | ★ 21 |
| Last updated | July 26, 2026 |
| Repository | neondatabase/postgres-skills ↗ |
What are Postgres schema and indexing best practices?
Follow proven Postgres patterns for schema design, indexing, query tuning, and safe migrations.
Who is it for?
Backend developers writing Postgres SQL, designing schemas, or tuning queries on Neon or standard Postgres deployments.
Skip if: Developers on MongoDB, DynamoDB, or other non-relational stores where Postgres-specific indexing rules do not apply.
When should I use this skill?
A developer writes SQL, designs Postgres schemas, optimizes queries, or plans database migrations.
What you get
Optimized SQL queries, index recommendations, migration-safe schema changes, pitfall avoidance notes
- Index recommendations
- Optimized query rewrites
- Migration-safe schema guidance
By the numbers
- Covers 5 core areas: schema design, indexing, query optimization, migrations, and common pitfalls
Files
Postgres Best Practices
Guidelines and best practices for working with Postgres, covering schema design, indexing, query optimization, and common pitfalls.
References
| Area | Resource | When to Use |
|---|---|---|
| Schema Design | references/schema-design.md | Designing tables, choosing data types, normalizing |
Schema Design
Best practices for designing Postgres schemas.
Choosing Data Types
- Prefer
textovervarchar(n)unless a length constraint is meaningful to the domain. - Use
timestamptzinstead oftimestampto always store timezone-aware timestamps. - Use
uuidfor primary keys when IDs may be exposed externally or generated client-side.
Related skills
How it compares
Pick postgres-best-practices over generic SQL skills when the database is Postgres and Neon-aligned patterns for indexes and migrations are needed.
FAQ
What topics does postgres-best-practices cover?
postgres-best-practices from Neon Database covers schema design, indexing strategies, query optimization, migrations, and common Postgres pitfalls, with reference tables linking each area to specific guidance resources.
When should developers use postgres-best-practices?
Developers should use postgres-best-practices when writing SQL, designing database schemas, optimizing slow queries, or setting up Postgres databases, including Neon-hosted deployments.