com um clique
database-review
Reviews database schema changes, migrations, and queries.
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Menu
Reviews database schema changes, migrations, and queries.
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Baseado na classificação ocupacional SOC
Diagnoses openclaude provider configuration problems and proposes fixes.
Resolves merge and rebase conflicts by preserving both sides' intent.
Reads a CodeQL or static-analysis finding and produces a targeted fix.
Fixture where a curl-piped-to-bash sits inside a fenced block; scanner must still flag it.
Implements frontend components following project conventions.
Diagnoses and fixes CI pipeline failures.
| name | database-review |
| title | Database Review |
| description | Reviews database schema changes, migrations, and queries. |
| category | database |
| tags | ["database","migrations","sql","postgres"] |
| trust | official |
| version | 0.1.0 |
| license | MIT |
| author | gnanam |
Review a migration, schema change, or query. The dangerous failures are silent at code-review time and loud at 2 AM — locks held during a deploy, an index that gets bypassed, a constraint that breaks existing rows. Catch them now.
debugging.ALTER TABLE actually does on that engine.ALTER TABLE ... ADD COLUMN with a default rewrites the
table on older versions; in newer versions it doesn't, but a
NOT NULL constraint without a default still does.CONCURRENTLY where supported?
A blocking CREATE INDEX on a hot table is a deploy outage.NOT NULL and CHECK constraints
scan the table. NOT VALID then VALIDATE separately avoids
blocking.NOT NULL column without a default — old code
inserting without the column fails.WHERE a = ? AND b = ? with an index on (a) only uses half the index.LIMIT/OFFSET.WHERE int_col = '42' can disable index
use on some engines.EXPLAIN (or EXPLAIN ANALYZE against a copy with
realistic data volume) when the query is non-trivial or the
table is large. A plan is worth ten guesses.down (or its equivalent) that brings the schema back to the
prior state, or a written note explaining why it cannot be
reversed. A migration that ships without a path back is a
migration you cannot deploy on a Friday.In scope: "Add a last_login_at column to users."
→ On Postgres 11+, ADD COLUMN last_login_at timestamptz without
a default is fast (metadata-only). Adding NOT NULL will scan
the table — if users is large, either allow NULL or backfill
in batches and add NOT NULL later as NOT VALID + VALIDATE.
Verify the new column doesn't break old code mid-deploy.
In scope: "This query is slow: SELECT * FROM orders WHERE status = 'pending' ORDER BY created_at DESC LIMIT 50."
→ Look for an index on (status, created_at DESC). A plain
index on status will still scan and sort. If pending is a
small fraction of rows, a partial index WHERE status = 'pending' is even better and cheaper to maintain.
In scope: "Drop the legacy_id column from products."
→ Two-step. First deploy that removes all reads/writes of
legacy_id from application code. Then a follow-up migration
drops the column. A single-step drop will break any pod still
running the old code during rollout.
Out of scope: "Design a schema for a new SaaS product."
→ Needs a brief and access patterns first. Not a review task.
EXPLAIN when the query was non-trivial?