Supabase RLS and Postgres Migration Review: Indexes, Locks
A SKILL.md that reviews Supabase or Postgres migrations and queries for missing row level security, leaky policies, unindexed foreign keys and table-locking changes, with fix SQL.
Skill prompt for Claude Code and Codex
Prompt
Installs to .agents/skills/supabase-rls-and-postgres-migration-review-indexes-locks/
mkdir -p .agents/skills/supabase-rls-and-postgres-migration-review-indexes-locks && curl -sL "https://prompts-gpt.com/prompts/supabase-rls-and-postgres-migration-review-indexes-locks/raw" -o .agents/skills/supabase-rls-and-postgres-migration-review-indexes-locks/SKILL.mdExample output
Tips and common edits
Why this works
- It checks for the update policy without with check, a common Supabase hole that a quick read of the policies misses.
- Every finding comes with fix SQL and a file:line, so it can go straight into a review comment.
- Locking checks catch migrations that pass on a small dev database and block writes on a large production table.
Save as .claude/skills/postgres-supabase-review/SKILL.md, or .agents/skills/ for Codex, Cursor and Gemini CLI. Ask: "review the database changes in this PR". It reads files and a local stack only; it never touches production.
Common edits
- Remove the Supabase section for plain Postgres apps and add your ORM's migration folder to the scope step.
- Add a row count threshold, such as 1 million rows, above which any blocking change is a Blocker rather than Should fix.
Reuse it: Use in a workflowAdapt in the builder
Prompt details
- By
- Prompts-GPT editors
- Published
Did this prompt work?
More like this
Security Review of a Code Snippet: Ranked Findings With Exploit Path and Fix
Reviews pasted code for injection, broken authorization, secrets, SSRF and similar flaws, and returns only real findings ranked by severity, each with a one-line exploit path and fixed code.
Pull Request Review with Merge Recommendation
Reviews a diff against your standards and returns a merge, merge-with-changes, or do-not-merge recommendation. Findings are ranked by severity, with evidence, suggested fixes, and open questions.
Audit a stale README against project configuration
Spot outdated setup steps, dead commands, and missing dependencies between your README and your actual configuration files.
Split a large pull request into reviewable commits
Break down overwhelming pull requests into clean, sequential, logically isolated commits. Use it when code reviews stall due to sprawling diffs.
Write a guided walkthrough for a complex pull request
Structure complex multi-file pull requests into a clear, numbered narrative review order for your teammates.
Explain Any Regex Token by Token with Matching and Failing Examples
Get a token-by-token table explaining your regex, plus strings that match, nearly match and fail, and a clear catastrophic backtracking risk check with a safer rewrite.
- Resolve a Git Merge Conflict and Keep What Both Branches Intended
- Review a Beginner's Code with Kind, Prioritized Feedback on the Top 3 Fixes
- Refactor Pasted Code for Readability Without Changing Its Behavior
- Test-First Bug Fix Skill: Reproduce, Fix, Prove (SKILL.md)
- Plain-English Question to a Correct SQL Query for Your Schema
- Release Notes From Git Log Skill for Users and Developers (SKILL.md)