Debug Supabase with logs and AI

Reads the right Supabase logs (API, Postgres, auth, storage, edge functions) and the advisors to find why something fails or is slow. It checks RLS policies and missing indexes, and proposes a fix with the evidence.

Asks before writingUses 6 Supabase toolsWorks in RevampKey, Claude Code, Codex and Cursor

Use in RevampKey

Get RevampKey to connect Supabase

RevampKey is a free desktop app for Mac, Windows and Linux. Install it, sign in, and Supabase is one click away with its skills already attached.

Download RevampKey

Not now? Use the skills in your current tool

curl -fsSL --create-dirs -o .claude/skills/supabase-debug-with-logs/SKILL.md https://revampkey.com/marketplace/supabase/skills/debug-with-logs/SKILL.md
Other agents
Other agents

When to use it

  • "My query returns nothing" (often RLS)
  • Random 500s from the API
  • Slow pages after data growth

What it looks like

You

Users say the tasks list is empty after login.

get_logsquery_logslist_tablesexecute_sql+2 more
Agent

The API logs show 200s with 0 rows for /rest/v1/tasks. The RLS policy on tasks checks team_members.user_id = auth.uid(), but the new signup flow never inserts into team_members, so new users see nothing. Fix: insert the membership in the signup trigger (SQL below). Apply on a branch first?

The SKILL.md file

View raw
name: supabase-debug-with-logs

Debug a Supabase problem, such as API errors, auth failures, slow queries, edge function crashes or realtime and storage issues, from project logs and advisors, then propose a fix. Use when the user reports that something in their Supabase app is failing, slow or returning errors.

Steps

  1. Pin down the symptom: which feature, the error message or status code, and roughly when.
  2. Pick the log service that matches: api for PostgREST and gateway errors, postgres, auth, storage, realtime or edge-function. Read recent entries with get_logs, or run a filtered query over a time window with query_logs.
  3. Read the schema context with list_tables when the error names a table or column.
  4. Common causes to check:
    • 401 or 403, or empty results: RLS policies blocking the role. Inspect them with a read-only execute_sql on pg_policies.
    • 500 from PostgREST: a database error, which appears in the postgres logs.
    • Slow requests: missing indexes. get_advisors with the performance type flags them.
    • Edge function errors: read the function with get_edge_function alongside its logs.
  5. Confirm with a read-only query when you can, such as explain on the slow query.

Report

Cause, the evidence (log lines, policy or plan), and the fix as SQL or code. Any fix that changes the database or a function waits for the user's approval and follows the schema-change steps.

Supabase tools it uses

  • get_logs
  • query_logs
  • list_tables
  • execute_sqlAsks first
  • get_advisors
  • get_edge_function

Tool list from supabase-community/supabase-mcp source.

FAQ

Why do I get empty results instead of an error?

Row Level Security filters rows silently. This skill checks your policies against the role making the request.

Will it change my database?

No. It reads logs and runs read-only queries; any fix needs your approval.