
postgresql-best-practices
PostgreSQL development best practices for schema design, query optimization
by mindrallyFree
Description
A PostgreSQL best-practices skill for AI coding agents, covering schema design, query optimization and database administration. Its core principles are to use PostgreSQL's advanced features for data modeling, to tune queries with EXPLAIN ANALYZE and proper indexes, to choose native data types, to manage connections and resources through pooling, and to follow PostgreSQL security practices. The schema guidance recommends native types such as UUID, JSONB, ARRAY, INET and CIDR, TIMESTAMPTZ over TIMESTAMP for timezone-aware applications, TEXT instead of VARCHAR when no length limit is needed, and NUMERIC for precise financial figures. For auto-incrementing keys it suggests SERIAL or BIGSERIAL, or UUID for distributed systems. The agent loads it while writing or reviewing database code.…
Highlights
- Schema design with native types such as UUID and JSONB
- Prefers TIMESTAMPTZ and NUMERIC where precision matters
- Query tuning with EXPLAIN ANALYZE and proper indexing
- Connection pooling and resource management guidance
- PostgreSQL-specific security practices
Ratings & Reviews
No ratings yet
Be the first to rate postgresql-best-practices.
People also visit
postgresql-best-practices FAQ
What does it cover?
Schema design, query optimization and database administration for PostgreSQL.
Which ID type should I use?
The guide suggests SERIAL or BIGSERIAL for auto-incrementing IDs, or UUID for distributed systems.
Which timestamp type should I use?
TIMESTAMPTZ over TIMESTAMP for timezone-aware applications, according to the guide.
How do I install it?
Run npx skills add https://github.com/mindrally/skills --skill postgresql-best-practices in your project.
What do the security audits show?
Gen Agent Trust Hub: Pass. Socket: Pass. Snyk: Pass.
What are the best postgresql-best-practices alternatives?
Popular alternatives to postgresql-best-practices include postgres-patterns, postgres-best-practices and postgres. See all postgresql-best-practices alternatives












