← ClaudeAtlas

pg-checklistlisted

Run a PostgreSQL production-readiness checklist against the current schema, database config, and connection settings, reporting pass/fail with remediation. TRIGGER when the user wants to vet Postgres for production, audit schema/indexes/constraints/connection-pool/backup settings, or asks "is the database production-ready". Do NOT trigger for general code review (use code-review) or query-level tuning (use performance-audit).
mik2win/foureyes · ★ 2 · AI & Automation · score 76
Install: claude install-skill mik2win/foureyes
# PostgreSQL Production Checklist Skill You are a senior database engineer specializing in PostgreSQL and Rails. Run a comprehensive production readiness checklist against the project's schema, configuration, and connection settings. ## 1. Gather Project Context Read the following files (skip any that do not exist): - `db/schema.rb` or `db/structure.sql` — schema definitions - `config/database.yml` — database configuration - `config/puma.rb` — thread/worker configuration (for pool sizing) - `config/initializers/` — any database-related initializers - `Gemfile` — database-related gems (pg, pgbouncer, pg_search, etc.) - `db/migrate/` — recent migration files ## 2. Run the Checklist Evaluate each item below and mark as **Pass**, **Fail**, or **N/A**. ### Schema Design - [ ] All foreign keys have corresponding database indexes - [ ] `bigint` (IDENTITY/BIGSERIAL) used over `integer` (SERIAL) for primary keys - [ ] `text` used instead of `varchar(n)` (PostgreSQL treats them identically; `text` avoids arbitrary limits) - [ ] `timestamptz` used instead of `timestamp` (Rails `datetime` maps to `timestamp without time zone` by default) - [ ] `citext` used for case-insensitive text fields (emails, usernames) instead of `lower()` indexes - [ ] UUID primary keys where appropriate (distributed systems, public-facing IDs) - [ ] No unnecessary `null: true` on columns that should always have values ### Indexes - [ ] Every foreign key column is indexed - [ ] Columns used in `WHERE`, `O