[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M796EFAQXA27NDPDK78RA32H":3,"skill-same:01M796EFAQXA27NDPDK78RA32H":58},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":35,"commitSha":36,"skillDirectory":37,"forksCount":38,"repositoryHtmlUrl":39,"repositoryHomepageUrl":6,"ownerHtmlUrl":40,"ownerBlogUrl":41,"ownerDescription":42,"updatedAt":43,"install":44,"resources":57},"01M796EFAQXA27NDPDK78RA32H","supabase-debug-bundle",null,"Collect Supabase diagnostic info for troubleshooting and support tickets.\nUse when debugging connection failures, auth issues, Realtime drops, Storage\nerrors, RLS misconfigurations, or preparing a support escalation.\nTrigger: \"supabase debug\", \"supabase diagnostics\", \"supabase support bundle\",\n\"collect supabase logs\", \"debug supabase connection\".","jukeyman\u002Fjukeyman-skills","jukeyman","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F142960420?v=4","01M78FR4Y3DHMMCBCC0GXXNB3F","RICK JEFFERSON","01M78FR4Z8RVQRAD31Y5J7V6EB",1,"MIT","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsaas-packs--supabase-pack--supabase-debug-bundle\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: supabase-debug-bundle\ndescription: |\n  Collect Supabase diagnostic info for troubleshooting and support tickets.\n  Use when debugging connection failures, auth issues, Realtime drops, Storage\n  errors, RLS misconfigurations, or preparing a support escalation.\n  Trigger: \"supabase debug\", \"supabase diagnostics\", \"supabase support bundle\",\n  \"collect supabase logs\", \"debug supabase connection\".\nallowed-tools: Read, Bash(npx:*), Bash(node:*), Bash(curl:*), Bash(supabase:*), Bash(tar:*), Grep, Glob\nversion: 1.0.0\nlicense: MIT\nauthor: Jeremy Longshore \u003Cjeremy@intentsolutions.io>\ncompatible-with: claude-code, codex, openclaw\ntags: [saas, supabase, debugging, support, diagnostics]\n---\n\n# Supabase Debug Bundle\n\nCollect 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.\n\n## Current State\n\n!`node --version 2>\u002Fdev\u002Fnull || echo 'Node.js not found'`\n!`npx supabase --version 2>\u002Fdev\u002Fnull || echo 'Supabase CLI not found'`\n!`npm list @supabase\u002Fsupabase-js 2>\u002Fdev\u002Fnull | grep supabase || echo '@supabase\u002Fsupabase-js not installed'`\n\n## Prerequisites\n\n- **Node.js 18+** with `@supabase\u002Fsupabase-js` v2 installed in the project\n- **Supabase CLI** installed (`npm i -g supabase` or `npx supabase`)\n- **Environment variables** set: `SUPABASE_URL` and `SUPABASE_ANON_KEY` (minimum); `SUPABASE_SERVICE_ROLE_KEY` for full diagnostics\n- Project linked via `supabase link --project-ref \u003Cref>` (for CLI commands)\n\n## Instructions\n\n### Step 1: Gather Environment and Connectivity\n\nCollect SDK version, project URL, key type, and test basic connectivity against the REST and Auth endpoints.\n\n```typescript\nimport { createClient } from '@supabase\u002Fsupabase-js'\n\nconst url = process.env.SUPABASE_URL!\nconst anonKey = process.env.SUPABASE_ANON_KEY!\nconst serviceKey = process.env.SUPABASE_SERVICE_ROLE_KEY\n\n\u002F\u002F Identify which key is in use\nconst keyType = serviceKey ? 'service_role' : 'anon'\nconst supabase = createClient(url, serviceKey ?? anonKey, {\n  auth: { autoRefreshToken: false, persistSession: false }\n})\n\nconst diagnostics: Record\u003Cstring, unknown> = {}\n\n\u002F\u002F 1a — SDK + environment\ndiagnostics.environment = {\n  supabase_js_version: require('@supabase\u002Fsupabase-js\u002Fpackage.json').version,\n  node_version: process.version,\n  project_url: url.replace(\u002Fhttps:\\\u002F\\\u002F([^.]+)\\..*\u002F, 'https:\u002F\u002F$1.***'),\n  key_type: keyType,\n  timestamp: new Date().toISOString(),\n}\n\n\u002F\u002F 1b — REST API connectivity\nconst restStart = Date.now()\nconst restRes = await fetch(`${url}\u002Frest\u002Fv1\u002F`, {\n  headers: { apikey: anonKey, Authorization: `Bearer ${anonKey}` },\n})\ndiagnostics.rest_api = {\n  status: restRes.status,\n  latency_ms: Date.now() - restStart,\n  ok: restRes.ok,\n}\n\n\u002F\u002F 1c — Auth health\nconst authStart = Date.now()\nconst { data: sessionData, error: sessionErr } = await supabase.auth.getSession()\ndiagnostics.auth = {\n  status: sessionErr ? `error: ${sessionErr.message}` : 'ok',\n  has_session: !!sessionData?.session,\n  latency_ms: Date.now() - authStart,\n}\n\n\u002F\u002F 1d — Database connectivity probe\nconst dbStart = Date.now()\nconst { error: dbErr } = await supabase.from('_test_ping').select('*').limit(1)\ndiagnostics.database = {\n  \u002F\u002F 42P01 = table doesn't exist, which proves the connection works\n  status: (!dbErr || dbErr.code === '42P01') ? 'connected' : `error: ${dbErr.code}`,\n  latency_ms: Date.now() - dbStart,\n}\n\nconsole.log(JSON.stringify(diagnostics, null, 2))\n```\n\n**What to check:** REST API should return `200`. Auth should return `ok`. Database probe returning `42P01` (relation not found) is normal — it confirms the PostgREST connection works.\n\n### Step 2: Test Realtime, Storage, and RLS\n\nProbe the three subsystems that cause the most support tickets.\n\n```typescript\n\u002F\u002F 2a — Realtime subscription test\nconst realtimeResult = await new Promise\u003CRecord\u003Cstring, unknown>>((resolve) => {\n  const timeout = setTimeout(() => {\n    resolve({ status: 'timeout', detail: 'No SUBSCRIBED event within 5s' })\n  }, 5000)\n\n  const channel = supabase.channel('debug-probe')\n  channel.subscribe((status) => {\n    if (status === 'SUBSCRIBED') {\n      clearTimeout(timeout)\n      channel.unsubscribe()\n      resolve({ status: 'ok', detail: 'Channel subscribed successfully' })\n    } else if (status === 'CHANNEL_ERROR') {\n      clearTimeout(timeout)\n      channel.unsubscribe()\n      resolve({ status: 'error', detail: 'CHANNEL_ERROR on subscribe' })\n    }\n  })\n})\ndiagnostics.realtime = realtimeResult\n\n\u002F\u002F 2b — Storage bucket listing\nconst { data: buckets, error: storageErr } = await supabase.storage.listBuckets()\ndiagnostics.storage = {\n  status: storageErr ? `error: ${storageErr.message}` : 'ok',\n  bucket_count: buckets?.length ?? 0,\n  buckets: buckets?.map((b) => ({ name: b.name, public: b.public })) ?? [],\n}\n\n\u002F\u002F 2c — RLS comparison: anon vs service_role\n\u002F\u002F Query the same table with both key types to detect RLS misconfiguration\nif (serviceKey) {\n  const anonClient = createClient(url, anonKey, {\n    auth: { autoRefreshToken: false, persistSession: false },\n  })\n  \u002F\u002F Pick the first public table from pg_tables (or fall back)\n  const { data: tables } = await supabase\n    .from('information_schema.tables' as any)\n    .select('table_name')\n    .eq('table_schema', 'public')\n    .limit(1)\n\n  const testTable = tables?.[0]?.table_name\n  if (testTable) {\n    const { count: anonCount } = await anonClient\n      .from(testTable)\n      .select('*', { count: 'exact', head: true })\n    const { count: serviceCount } = await supabase\n      .from(testTable)\n      .select('*', { count: 'exact', head: true })\n    diagnostics.rls = {\n      table: testTable,\n      anon_visible_rows: anonCount ?? 0,\n      service_role_visible_rows: serviceCount ?? 0,\n      rls_active: (anonCount ?? 0) !== (serviceCount ?? 0),\n    }\n  } else {\n    diagnostics.rls = { status: 'skipped', detail: 'No public tables found' }\n  }\n} else {\n  diagnostics.rls = { status: 'skipped', detail: 'No service_role key — cannot compare' }\n}\n```\n\n**What to check:** Realtime should reach `SUBSCRIBED` within 5 seconds. Storage should list buckets without error. RLS comparison showing identical row counts for anon and service_role on a table you expect to be protected means RLS policies may be missing.\n\n### Step 3: Collect Database Health and Package the Bundle\n\nPull database statistics via the Supabase CLI inspect commands and the platform status page, then archive everything.\n\n```bash\n#!\u002Fbin\u002Fbash\nset -euo pipefail\n\nBUNDLE_DIR=\"supabase-debug-$(date +%Y%m%d-%H%M%S)\"\nmkdir -p \"$BUNDLE_DIR\"\n\n# 3a — Supabase CLI status (local dev)\nnpx supabase status > \"$BUNDLE_DIR\u002Fcli-status.txt\" 2>&1 || echo \"CLI status unavailable (not linked or no local dev)\" > \"$BUNDLE_DIR\u002Fcli-status.txt\"\n\n# 3b — Database inspection via CLI\nnpx supabase inspect db table-sizes   > \"$BUNDLE_DIR\u002Ftable-sizes.txt\"   2>&1 || true\nnpx supabase inspect db index-usage   > \"$BUNDLE_DIR\u002Findex-usage.txt\"   2>&1 || true\nnpx supabase inspect db cache-hit     > \"$BUNDLE_DIR\u002Fcache-hit.txt\"     2>&1 || true\nnpx supabase inspect db seq-scans     > \"$BUNDLE_DIR\u002Fseq-scans.txt\"     2>&1 || true\nnpx supabase inspect db long-running-queries > \"$BUNDLE_DIR\u002Flong-queries.txt\" 2>&1 || true\nnpx supabase inspect db bloat         > \"$BUNDLE_DIR\u002Fbloat.txt\"         2>&1 || true\nnpx supabase inspect db replication-slots > \"$BUNDLE_DIR\u002Freplication.txt\" 2>&1 || true\n\n# 3c — Platform status page\ncurl -sf https:\u002F\u002Fstatus.supabase.com\u002Fapi\u002Fv2\u002Fstatus.json \\\n  | python3 -m json.tool > \"$BUNDLE_DIR\u002Fplatform-status.json\" 2>\u002Fdev\u002Fnull \\\n  || echo '{\"error\": \"Could not reach status.supabase.com\"}' > \"$BUNDLE_DIR\u002Fplatform-status.json\"\n\n# 3d — Redact secrets from all collected files\nfind \"$BUNDLE_DIR\" -type f -exec sed -i \\\n  -e 's\u002FeyJ[A-Za-z0-9_-]\\{20,\\}\\(\\.[A-Za-z0-9_-]*\\)*\u002F[JWT_REDACTED]\u002Fg' \\\n  -e 's\u002Fsbp_[A-Za-z0-9]\\{20,\\}\u002F[SBP_KEY_REDACTED]\u002Fg' \\\n  -e 's\u002F[A-Za-z0-9._%+-]\\+@[A-Za-z0-9.-]\\+\\.[A-Za-z]\\{2,\\}\u002F[EMAIL_REDACTED]\u002Fg' {} +\n\n# 3e — Package\ntar czf \"${BUNDLE_DIR}.tar.gz\" \"$BUNDLE_DIR\"\necho \"Debug bundle created: ${BUNDLE_DIR}.tar.gz\"\necho \"Contents:\"\nls -lh \"$BUNDLE_DIR\"\u002F\n```\n\n**What to check:** Review `cache-hit.txt` — index and table hit rates below 99% indicate memory pressure. `bloat.txt` values above 50% on large tables warrant a `VACUUM`. `seq-scans.txt` highlights tables needing indexes.\n\n## Output\n\nThe skill produces `supabase-debug-YYYYMMDD-HHMMSS.tar.gz` containing:\n\n| File | Contents |\n|------|----------|\n| `cli-status.txt` | Local Supabase stack status (services, ports, URLs) |\n| `table-sizes.txt` | All tables with row counts and disk usage |\n| `index-usage.txt` | Index scan frequency — unused indexes are candidates for removal |\n| `cache-hit.txt` | Buffer cache and index cache hit ratios |\n| `seq-scans.txt` | Tables with high sequential scan counts (missing indexes) |\n| `long-queries.txt` | Currently running queries over the duration threshold |\n| `bloat.txt` | Table and index bloat percentages |\n| `replication.txt` | Replication slot status (relevant for Realtime) |\n| `platform-status.json` | Supabase platform health from status.supabase.com |\n\nPlus the TypeScript diagnostics output (connectivity, auth, Realtime, Storage, RLS) printed to stdout.\n\nAll JWT tokens, Supabase project keys (`sbp_*`), and email addresses are automatically redacted before archiving.\n\n## Error Handling\n\n| Symptom | Cause | Fix |\n|---------|-------|-----|\n| REST API returns `401` | Invalid or expired `anon` key | Regenerate key in Dashboard > Settings > API |\n| REST API returns `000` or times out | Wrong `SUPABASE_URL` or project paused | Verify URL; unpause project in Dashboard |\n| Realtime returns `CHANNEL_ERROR` | WebSocket blocked by firewall\u002Fproxy | Check corporate proxy; try from a different network |\n| Realtime times out (5s) | Realtime addon not enabled or quota hit | Enable Realtime on the table in Dashboard > Database > Replication |\n| Storage `listBuckets` returns `403` | RLS enabled on storage without policy | Add a storage policy or use `service_role` key |\n| `supabase inspect db` fails | CLI not linked to remote project | Run `supabase link --project-ref \u003Cref>` first |\n| `cache-hit` below 95% | Database instance too small for workload | Upgrade compute size or optimize queries |\n| RLS shows identical counts | No RLS policies on the table | Add policies via `ALTER TABLE ... ENABLE ROW LEVEL SECURITY` |\n| `pg_stat_statements` not available | Extension not enabled | Enable in Dashboard > Database > Extensions |\n\n## Examples\n\n**Quick connectivity check (no service key needed):**\n\n```typescript\nimport { createClient } from '@supabase\u002Fsupabase-js'\n\nconst supabase = createClient(process.env.SUPABASE_URL!, process.env.SUPABASE_ANON_KEY!)\n\nconst start = Date.now()\nconst { error } = await supabase.from('any_table').select('*').limit(1)\nconsole.log({\n  connected: !error || error.code === '42P01',\n  latency_ms: Date.now() - start,\n  error: error?.message ?? null,\n})\n```\n\n**API endpoint test with curl:**\n\n```bash\ncurl -s -o \u002Fdev\u002Fnull -w \"HTTP %{http_code} in %{time_total}s\\n\" \\\n  \"https:\u002F\u002F\u003Cproject-ref>.supabase.co\u002Frest\u002Fv1\u002F\" \\\n  -H \"apikey: $SUPABASE_ANON_KEY\"\n```\n\n**Check auth session from a running app:**\n\n```typescript\nconst { data, error } = await supabase.auth.getSession()\nif (error) console.error('Auth error:', error.message)\nelse if (!data.session) console.log('No active session (user not logged in)')\nelse console.log('Session valid, expires:', data.session.expires_at)\n```\n\n## Resources\n\n- [Supabase Troubleshooting Guide](https:\u002F\u002Fsupabase.com\u002Fdocs\u002Fguides\u002Fplatform\u002Ftroubleshooting) — official first-stop for common issues\n- [Database Inspect (CLI)](https:\u002F\u002Fsupabase.com\u002Fdocs\u002Fguides\u002Fdatabase\u002Finspect) — `supabase inspect db` command reference\n- [Supabase Status Page](https:\u002F\u002Fstatus.supabase.com) — live platform health\n- [Supabase Support](https:\u002F\u002Fsupabase.com\u002Fsupport) — file a ticket with your debug bundle attached\n- [RLS Guide](https:\u002F\u002Fsupabase.com\u002Fdocs\u002Fguides\u002Fdatabase\u002Fpostgres\u002Frow-level-security) — row-level security policy authoring\n- [Realtime Quotas](https:\u002F\u002Fsupabase.com\u002Fdocs\u002Fguides\u002Frealtime\u002Fquotas) — connection and message limits\n\n## Next Steps\n\n- Run `supabase-common-errors` to match diagnostic output against known issue patterns\n- Run `supabase-rate-limits` if the bundle reveals 429 responses or throttled connections\n- Run `supabase-performance-tuning` if cache hit ratios are below 99% or sequential scans are high\n- Run `supabase-observability` to set up ongoing monitoring so issues surface before they become tickets\n","# Supabase Debug Bundle\n\nCollect 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.\n\n## Current State\n\n!`node --version 2>\u002Fdev\u002Fnull || echo 'Node.js not found'`\n!`npx supabase --version 2>\u002Fdev\u002Fnull || echo 'Supabase CLI not found'`\n!`npm list @supabase\u002Fsupabase-js 2>\u002Fdev\u002Fnull | grep supabase || echo '@supabase\u002Fsupabase-js not installed'`\n\n## Prerequisites\n\n- **Node.js 18+** with `@supabase\u002Fsupabase-js` v2 installed in the project\n- **Supabase CLI** installed (`npm i -g supabase` or `npx supabase`)\n- **Environment variables** set: `SUPABASE_URL` and `SUPABASE_ANON_KEY` (minimum); `SUPABASE_SERVICE_ROLE_KEY` for full diagnostics\n- Project linked via `supabase link --project-ref \u003Cref>` (for CLI commands)\n\n## Instructions\n\n### Step 1: Gather Environment and Connectivity\n\nCollect SDK version, project URL, key type, and test basic connectivity against the REST and Auth endpoints.\n\n```typescript\nimport { createClient } from '@supabase\u002Fsupabase-js'\n\nconst url = process.env.SUPABASE_URL!\nconst anonKey = process.env.SUPABASE_ANON_KEY!\nconst serviceKey = process.env.SUPABASE_SERVICE_ROLE_KEY\n\n\u002F\u002F Identify which key is in use\nconst keyType = serviceKey ? 'service_role' : 'anon'\nconst supabase = createClient(url, serviceKey ?? anonKey, {\n  auth: { autoRefreshToken: false, persistSession: false }\n})\n\nconst diagnostics: Record\u003Cstring, unknown> = {}\n\n\u002F\u002F 1a — SDK + environment\ndiagnostics.environment = {\n  supabase_js_version: require('@supabase\u002Fsupabase-js\u002Fpackage.json').version,\n  node_version: process.version,\n  project_url: url.replace(\u002Fhttps:\\\u002F\\\u002F([^.]+)\\..*\u002F, 'https:\u002F\u002F$1.***'),\n  key_type: keyType,\n  timestamp: new Date().toISOString(),\n}\n\n\u002F\u002F 1b — REST API connectivity\nconst restStart = Date.now()\nconst restRes = await fetch(`${url}\u002Frest\u002Fv1\u002F`, {\n  headers: { apikey: anonKey, Authorization: `Bearer ${anonKey}` },\n})\ndiagnostics.rest_api = {\n  status: restRes.status,\n  latency_ms: Date.now() - restStart,\n  ok: restRes.ok,\n}\n\n\u002F\u002F 1c — Auth health\nconst authStart = Date.now()\nconst { data: sessionData, error: sessionErr } = await supabase.auth.getSession()\ndiagnostics.auth = {\n  status: sessionErr ? `error: ${sessionErr.message}` : 'ok',\n  has_session: !!sessionData?.session,\n  latency_ms: Date.now() - authStart,\n}\n\n\u002F\u002F 1d — Database connectivity probe\nconst dbStart = Date.now()\nconst { error: dbErr } = await supabase.from('_test_ping').select('*').limit(1)\ndiagnostics.database = {\n  \u002F\u002F 42P01 = table doesn't exist, which proves the connection works\n  status: (!dbErr || dbErr.code === '42P01') ? 'connected' : `error: ${dbErr.code}`,\n  latency_ms: Date.now() - dbStart,\n}\n\nconsole.log(JSON.stringify(diagnostics, null, 2))\n```\n\n**What to check:** REST API should return `200`. Auth should return `ok`. Database probe returning `42P01` (relation not found) is normal — it confirms the PostgREST connection works.\n\n### Step 2: Test Realtime, Storage, and RLS\n\nProbe the three subsystems that cause the most support tickets.\n\n```typescript\n\u002F\u002F 2a — Realtime subscription test\nconst realtimeResult = await new Promise\u003CRecord\u003Cstring, unknown>>((resolve) => {\n  const timeout = setTimeout(() => {\n    resolve({ status: 'timeout', detail: 'No SUBSCRIBED event within 5s' })\n  }, 5000)\n\n  const channel = supabase.channel('debug-probe')\n  channel.subscribe((status) => {\n    if (status === 'SUBSCRIBED') {\n      clearTimeout(timeout)\n      channel.unsubscribe()\n      resolve({ status: 'ok', detail: 'Channel subscribed successfully' })\n    } else if (status === 'CHANNEL_ERROR') {\n      clearTimeout(timeout)\n      channel.unsubscribe()\n      resolve({ status: 'error', detail: 'CHANNEL_ERROR on subscribe' })\n    }\n  })\n})\ndiagnostics.realtime = realtimeResult\n\n\u002F\u002F 2b — Storage bucket listing\nconst { data: buckets, error: storageErr } = await supabase.storage.listBuckets()\ndiagnostics.storage = {\n  status: storageErr ? `error: ${storageErr.message}` : 'ok',\n  bucket_count: buckets?.length ?? 0,\n  buckets: buckets?.map((b) => ({ name: b.name, public: b.public })) ?? [],\n}\n\n\u002F\u002F 2c — RLS comparison: anon vs service_role\n\u002F\u002F Query the same table with both key types to detect RLS misconfiguration\nif (serviceKey) {\n  const anonClient = createClient(url, anonKey, {\n    auth: { autoRefreshToken: false, persistSession: false },\n  })\n  \u002F\u002F Pick the first public table from pg_tables (or fall back)\n  const { data: tables } = await supabase\n    .from('information_schema.tables' as any)\n    .select('table_name')\n    .eq('table_schema', 'public')\n    .limit(1)\n\n  const testTable = tables?.[0]?.table_name\n  if (testTable) {\n    const { count: anonCount } = await anonClient\n      .from(testTable)\n      .select('*', { count: 'exact', head: true })\n    const { count: serviceCount } = await supabase\n      .from(testTable)\n      .select('*', { count: 'exact', head: true })\n    diagnostics.rls = {\n      table: testTable,\n      anon_visible_rows: anonCount ?? 0,\n      service_role_visible_rows: serviceCount ?? 0,\n      rls_active: (anonCount ?? 0) !== (serviceCount ?? 0),\n    }\n  } else {\n    diagnostics.rls = { status: 'skipped', detail: 'No public tables found' }\n  }\n} else {\n  diagnostics.rls = { status: 'skipped', detail: 'No service_role key — cannot compare' }\n}\n```\n\n**What to check:** Realtime should reach `SUBSCRIBED` within 5 seconds. Storage should list buckets without error. RLS comparison showing identical row counts for anon and service_role on a table you expect to be protected means RLS policies may be missing.\n\n### Step 3: Collect Database Health and Package the Bundle\n\nPull database statistics via the Supabase CLI inspect commands and the platform status page, then archive everything.\n\n```bash\n#!\u002Fbin\u002Fbash\nset -euo pipefail\n\nBUNDLE_DIR=\"supabase-debug-$(date +%Y%m%d-%H%M%S)\"\nmkdir -p \"$BUNDLE_DIR\"\n\n# 3a — Supabase CLI status (local dev)\nnpx supabase status > \"$BUNDLE_DIR\u002Fcli-status.txt\" 2>&1 || echo \"CLI status unavailable (not linked or no local dev)\" > \"$BUNDLE_DIR\u002Fcli-status.txt\"\n\n# 3b — Database inspection via CLI\nnpx supabase inspect db table-sizes   > \"$BUNDLE_DIR\u002Ftable-sizes.txt\"   2>&1 || true\nnpx supabase inspect db index-usage   > \"$BUNDLE_DIR\u002Findex-usage.txt\"   2>&1 || true\nnpx supabase inspect db cache-hit     > \"$BUNDLE_DIR\u002Fcache-hit.txt\"     2>&1 || true\nnpx supabase inspect db seq-scans     > \"$BUNDLE_DIR\u002Fseq-scans.txt\"     2>&1 || true\nnpx supabase inspect db long-running-queries > \"$BUNDLE_DIR\u002Flong-queries.txt\" 2>&1 || true\nnpx supabase inspect db bloat         > \"$BUNDLE_DIR\u002Fbloat.txt\"         2>&1 || true\nnpx supabase inspect db replication-slots > \"$BUNDLE_DIR\u002Freplication.txt\" 2>&1 || true\n\n# 3c — Platform status page\ncurl -sf https:\u002F\u002Fstatus.supabase.com\u002Fapi\u002Fv2\u002Fstatus.json \\\n  | python3 -m json.tool > \"$BUNDLE_DIR\u002Fplatform-status.json\" 2>\u002Fdev\u002Fnull \\\n  || echo '{\"error\": \"Could not reach status.supabase.com\"}' > \"$BUNDLE_DIR\u002Fplatform-status.json\"\n\n# 3d — Redact secrets from all collected files\nfind \"$BUNDLE_DIR\" -type f -exec sed -i \\\n  -e 's\u002FeyJ[A-Za-z0-9_-]\\{20,\\}\\(\\.[A-Za-z0-9_-]*\\)*\u002F[JWT_REDACTED]\u002Fg' \\\n  -e 's\u002Fsbp_[A-Za-z0-9]\\{20,\\}\u002F[SBP_KEY_REDACTED]\u002Fg' \\\n  -e 's\u002F[A-Za-z0-9._%+-]\\+@[A-Za-z0-9.-]\\+\\.[A-Za-z]\\{2,\\}\u002F[EMAIL_REDACTED]\u002Fg' {} +\n\n# 3e — Package\ntar czf \"${BUNDLE_DIR}.tar.gz\" \"$BUNDLE_DIR\"\necho \"Debug bundle created: ${BUNDLE_DIR}.tar.gz\"\necho \"Contents:\"\nls -lh \"$BUNDLE_DIR\"\u002F\n```\n\n**What to check:** Review `cache-hit.txt` — index and table hit rates below 99% indicate memory pressure. `bloat.txt` values above 50% on large tables warrant a `VACUUM`. `seq-scans.txt` highlights tables needing indexes.\n\n## Output\n\nThe skill produces `supabase-debug-YYYYMMDD-HHMMSS.tar.gz` containing:\n\n| File | Contents |\n|------|----------|\n| `cli-status.txt` | Local Supabase stack status (services, ports, URLs) |\n| `table-sizes.txt` | All tables with row counts and disk usage |\n| `index-usage.txt` | Index scan frequency — unused indexes are candidates for removal |\n| `cache-hit.txt` | Buffer cache and index cache hit ratios |\n| `seq-scans.txt` | Tables with high sequential scan counts (missing indexes) |\n| `long-queries.txt` | Currently running queries over the duration threshold |\n| `bloat.txt` | Table and index bloat percentages |\n| `replication.txt` | Replication slot status (relevant for Realtime) |\n| `platform-status.json` | Supabase platform health from status.supabase.com |\n\nPlus the TypeScript diagnostics output (connectivity, auth, Realtime, Storage, RLS) printed to stdout.\n\nAll JWT tokens, Supabase project keys (`sbp_*`), and email addresses are automatically redacted before archiving.\n\n## Error Handling\n\n| Symptom | Cause | Fix |\n|---------|-------|-----|\n| REST API returns `401` | Invalid or expired `anon` key | Regenerate key in Dashboard > Settings > API |\n| REST API returns `000` or times out | Wrong `SUPABASE_URL` or project paused | Verify URL; unpause project in Dashboard |\n| Realtime returns `CHANNEL_ERROR` | WebSocket blocked by firewall\u002Fproxy | Check corporate proxy; try from a different network |\n| Realtime times out (5s) | Realtime addon not enabled or quota hit | Enable Realtime on the table in Dashboard > Database > Replication |\n| Storage `listBuckets` returns `403` | RLS enabled on storage without policy | Add a storage policy or use `service_role` key |\n| `supabase inspect db` fails | CLI not linked to remote project | Run `supabase link --project-ref \u003Cref>` first |\n| `cache-hit` below 95% | Database instance too small for workload | Upgrade compute size or optimize queries |\n| RLS shows identical counts | No RLS policies on the table | Add policies via `ALTER TABLE ... ENABLE ROW LEVEL SECURITY` |\n| `pg_stat_statements` not available | Extension not enabled | Enable in Dashboard > Database > Extensions |\n\n## Examples\n\n**Quick connectivity check (no service key needed):**\n\n```typescript\nimport { createClient } from '@supabase\u002Fsupabase-js'\n\nconst supabase = createClient(process.env.SUPABASE_URL!, process.env.SUPABASE_ANON_KEY!)\n\nconst start = Date.now()\nconst { error } = await supabase.from('any_table').select('*').limit(1)\nconsole.log({\n  connected: !error || error.code === '42P01',\n  latency_ms: Date.now() - start,\n  error: error?.message ?? null,\n})\n```\n\n**API endpoint test with curl:**\n\n```bash\ncurl -s -o \u002Fdev\u002Fnull -w \"HTTP %{http_code} in %{time_total}s\\n\" \\\n  \"https:\u002F\u002F\u003Cproject-ref>.supabase.co\u002Frest\u002Fv1\u002F\" \\\n  -H \"apikey: $SUPABASE_ANON_KEY\"\n```\n\n**Check auth session from a running app:**\n\n```typescript\nconst { data, error } = await supabase.auth.getSession()\nif (error) console.error('Auth error:', error.message)\nelse if (!data.session) console.log('No active session (user not logged in)')\nelse console.log('Session valid, expires:', data.session.expires_at)\n```\n\n## Resources\n\n- [Supabase Troubleshooting Guide](https:\u002F\u002Fsupabase.com\u002Fdocs\u002Fguides\u002Fplatform\u002Ftroubleshooting) — official first-stop for common issues\n- [Database Inspect (CLI)](https:\u002F\u002Fsupabase.com\u002Fdocs\u002Fguides\u002Fdatabase\u002Finspect) — `supabase inspect db` command reference\n- [Supabase Status Page](https:\u002F\u002Fstatus.supabase.com) — live platform health\n- [Supabase Support](https:\u002F\u002Fsupabase.com\u002Fsupport) — file a ticket with your debug bundle attached\n- [RLS Guide](https:\u002F\u002Fsupabase.com\u002Fdocs\u002Fguides\u002Fdatabase\u002Fpostgres\u002Frow-level-security) — row-level security policy authoring\n- [Realtime Quotas](https:\u002F\u002Fsupabase.com\u002Fdocs\u002Fguides\u002Frealtime\u002Fquotas) — connection and message limits\n\n## Next Steps\n\n- Run `supabase-common-errors` to match diagnostic output against known issue patterns\n- Run `supabase-rate-limits` if the bundle reveals 429 responses or throttled connections\n- Run `supabase-performance-tuning` if cache hit ratios are below 99% or sequential scans are high\n- Run `supabase-observability` to set up ongoing monitoring so issues surface before they become tickets\n",{"name":5,"tags":24,"author":30,"license":15,"version":31,"description":32,"allowed-tools":33,"compatible-with":34},[25,26,27,28,29],"saas","supabase","debugging","support","diagnostics","Jeremy Longshore \u003Cjeremy@intentsolutions.io>","1.0.0","Collect Supabase diagnostic info for troubleshooting and support tickets.\nUse when debugging connection failures, auth issues, Realtime drops, Storage\nerrors, RLS misconfigurations, or preparing a support escalation.\nTrigger: \"supabase debug\", \"supabase diagnostics\", \"supabase support bundle\",\n\"collect supabase logs\", \"debug supabase connection\".\n","Read, Bash(npx:*), Bash(node:*), Bash(curl:*), Bash(supabase:*), Bash(tar:*), Grep, Glob","claude-code, codex, openclaw","main","99825ad3f3bcc6597ddcc7294a14e6e922f2b67b","skills\u002Fsaas-packs--supabase-pack--supabase-debug-bundle",0,"https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills","https:\u002F\u002Fgithub.com\u002Fjukeyman","https:\u002F\u002FRJBUSINESSSOLUTIONS.ORG","Credit and Finance Expert | Developer\r\n\r\nI'm Rick Jefferson, a seasoned credit and finance expert with over a decade of experience in financial literacy,","2026-07-13 07:03:29",{"source":8,"skillName":5,"commands":45,"prompt":55,"zipAvailable":56},[46,49,52],{"tool":47,"command":48},"npx","npx skills add jukeyman\u002Fjukeyman-skills --skill supabase-debug-bundle",{"tool":50,"command":51},"bunx","bunx skills add jukeyman\u002Fjukeyman-skills --skill supabase-debug-bundle",{"tool":53,"command":54},"pnpm","pnpm dlx skills add jukeyman\u002Fjukeyman-skills --skill supabase-debug-bundle","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsaas-packs--supabase-pack--supabase-debug-bundle\u002FSKILL.md",true,[],[59,66,73,80,87,95],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":19},"01M79ANS2SM329NEP5ZCX106RR","zustand-store-creator","Create zustand store creator operations. Auto-activating skill for Frontend Development.\nTriggers on: zustand store creator, zustand store creator\nPart of the Frontend Development skill category. Use when working with zustand store creator functionality. Trigger with phrases like \"zustand store creator\", \"zustand creator\", \"zustand\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzustand-store-creator\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":19},"01M79AMZKP4YDEZ7EHG1Y7PP74","zero-trust-config-helper","Configure with zero trust config helper operations. Auto-activating skill for Security Advanced.\nTriggers on: zero trust config helper, zero trust config helper\nPart of the Security Advanced skill category. Use when configuring systems or services. Trigger with phrases like \"zero trust config helper\", \"zero helper\", \"zero\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzero-trust-config-helper\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":19},"01M79AMJSBCEJQNBTYNAHYN5HM","zapier-integration-helper","Assist with zapier integration helper operations. Auto-activating skill for Business Automation.\nTriggers on: zapier integration helper, zapier integration helper\nPart of the Business Automation skill category. Use when working with APIs or building integrations. Trigger with phrases like \"zapier integration helper\", \"zapier helper\", \"zapier\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzapier-integration-helper\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M79AHJZGVMARS13VFQYRR1MP","yaml-config-validator","Validate yaml config validator operations. Auto-activating skill for DevOps Basics.\nTriggers on: yaml config validator, yaml config validator\nPart of the DevOps Basics skill category. Use when configuring systems or services. Trigger with phrases like \"yaml config validator\", \"yaml validator\", \"yaml\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fyaml-config-validator\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":91,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":19},"01M79AHGDZRN0020RDQSQDPAM8","xvary-stock-research","Thesis-driven equity analysis from public SEC EDGAR and market data; \u002Fanalyze, \u002Fscore, \u002Fcompare workflows with bundled Python tools (Claude Code, Cursor, Codex).","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxvary-stock-research\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxvary-stock-research\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":19},"01M79AHCYJ9FV9RMHQ24HDRN33","xss-vulnerability-scanner","Scan xss vulnerability scanner operations. Auto-activating skill for Security Fundamentals.\nTriggers on: xss vulnerability scanner, xss vulnerability scanner\nPart of the Security Fundamentals skill category. Use when working with xss vulnerability scanner functionality. Trigger with phrases like \"xss vulnerability scanner\", \"xss scanner\", \"xss\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxss-vulnerability-scanner\u002FSKILL.md",[],[]]