How to add the Supabase Postgres Best Practices skill to Claude Code
- Install supabase-postgres-best-practices for Claude Code. Bring an anonymized schema and the SQL query you want to review.
- Start with read-only evidence such as a query plan from a development database. The skill provides Postgres reference guidance and works without a Supabase account when you provide the inputs directly.
npx skills add https://github.com/supabase/agent-skills --skill supabase-postgres-best-practicesReview a slow query before adding an index
Share the query and plan for a list of recent orders filtered by store. Include current indexes and approximate row counts. Ask Claude Code to identify which part of the plan consumes work, then explain the expected benefit and write cost of any proposed index.
Test on representative development data. Compare results and timings for both large and small stores, and check that the returned order IDs remain identical. Connecting an online Supabase project is a separate MCP workflow.