| name | supabase-debug-bundle |
| description | Collect Supabase diagnostic info for troubleshooting and support tickets.
Use when debugging connection failures, auth issues, Realtime drops, Storage
errors, RLS misconfigurations, or preparing a support escalation.
Trigger: "supabase debug", "supabase diagnostics", "supabase support bundle",
"collect supabase logs", "debug supabase connection".
|
| allowed-tools | Read, Bash(npx:*), Bash(node:*), Bash(curl:*), Bash(supabase:*), Bash(tar:*), Grep, Glob |
| version | 1.53.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","supabase","debugging","support","diagnostics"] |
| compatibility | Designed for Claude Code, also compatible with Codex and OpenClaw |
Supabase Debug Bundle
Overview
Collect a comprehensive, redacted diagnostic bundle from a Supabase project. Tests connectivity, auth, Realtime, Storage, RLS policy behavior, and database health — then packages everything into a single archive safe for sharing with Supabase support.
Current State
!node --version 2>/dev/null || echo 'Node.js not found'
!npx supabase --version 2>/dev/null || echo 'Supabase CLI not found'
!npm list @supabase/supabase-js 2>/dev/null | grep supabase || echo '@supabase/supabase-js not installed'
Prerequisites
- Node.js 18+ with
@supabase/supabase-js v2 installed in the project
- Supabase CLI installed (
npm i -g supabase or npx supabase)
- Environment variables set:
SUPABASE_URL and SUPABASE_ANON_KEY (minimum); SUPABASE_SERVICE_ROLE_KEY for full diagnostics
- Project linked via
supabase link --project-ref <ref> (for CLI commands)
Instructions
Step 1: Gather Environment and Connectivity
Collect SDK version, project URL, key type, and test basic connectivity against the REST and Auth endpoints.
import { createClient } from '@supabase/supabase-js'
const url = process.env.SUPABASE_URL!
const anonKey = process.env.SUPABASE_ANON_KEY!
const serviceKey = process.env.SUPABASE_SERVICE_ROLE_KEY
const keyType = serviceKey ? 'service_role' : 'anon'
const supabase = createClient(url, serviceKey ?? anonKey, {
auth: { autoRefreshToken: false, persistSession: }
})
: <, > = {}
diagnostics. = {
: ().,
: process.,
: url.(, ),
: keyType,
: ().(),
}
restStart = .()
restRes = (, {
: { : anonKey, : },
})
diagnostics. = {
: restRes.,
: .() - restStart,
: restRes.,
}
authStart = .()
{ : sessionData, : sessionErr } = supabase..()
diagnostics. = {
: sessionErr ? : ,
: !!sessionData?.,
: .() - authStart,
}
dbStart = .()
{ : dbErr } = supabase.().().()
diagnostics. = {
: (!dbErr || dbErr. === ) ? : ,
: .() - dbStart,
}
.(.(diagnostics, , ))